mirror of
https://github.com/deployphp/action.git
synced 2025-06-28 20:24:14 +00:00
Update deps
This commit is contained in:
parent
eed58e3496
commit
363bb1be96
126 changed files with 5743 additions and 2737 deletions
32
node_modules/@types/fs-extra/README.md
generated
vendored
32
node_modules/@types/fs-extra/README.md
generated
vendored
|
@ -1,16 +1,16 @@
|
|||
# Installation
|
||||
> `npm install --save @types/fs-extra`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for fs-extra (https://github.com/jprichardson/node-fs-extra).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 21 Sep 2021 19:02:14 GMT
|
||||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
||||
* Global values: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Alan Agius](https://github.com/alan-agius4), [midknight41](https://github.com/midknight41), [Brendan Forster](https://github.com/shiftkey), [Mees van Dijk](https://github.com/mees-), [Justin Rockwood](https://github.com/jrockwood), [Sang Dang](https://github.com/sangdth), [Florian Keller](https://github.com/ffflorian), [Piotr Błażejewicz](https://github.com/peterblazejewicz), and [Tiger Oakes](https://github.com/NotWoods).
|
||||
# Installation
|
||||
> `npm install --save @types/fs-extra`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for fs-extra (https://github.com/jprichardson/node-fs-extra).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 10 Jan 2023 19:32:54 GMT
|
||||
* Dependencies: [@types/jsonfile](https://npmjs.com/package/@types/jsonfile), [@types/node](https://npmjs.com/package/@types/node)
|
||||
* Global values: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Alan Agius](https://github.com/alan-agius4), [midknight41](https://github.com/midknight41), [Brendan Forster](https://github.com/shiftkey), [Mees van Dijk](https://github.com/mees-), [Justin Rockwood](https://github.com/jrockwood), [Sang Dang](https://github.com/sangdth), [Florian Keller](https://github.com/ffflorian), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Tiger Oakes](https://github.com/NotWoods), and [BendingBender](https://github.com/BendingBender).
|
||||
|
|
111
node_modules/@types/fs-extra/esm.d.mts
generated
vendored
Executable file
111
node_modules/@types/fs-extra/esm.d.mts
generated
vendored
Executable file
|
@ -0,0 +1,111 @@
|
|||
import * as fse from './index.js';
|
||||
|
||||
export {
|
||||
copy,
|
||||
copySync,
|
||||
emptyDirSync,
|
||||
emptydirSync,
|
||||
emptyDir,
|
||||
emptydir,
|
||||
createFile,
|
||||
createFileSync,
|
||||
ensureFile,
|
||||
ensureFileSync,
|
||||
createLink,
|
||||
createLinkSync,
|
||||
ensureLink,
|
||||
ensureLinkSync,
|
||||
createSymlink,
|
||||
createSymlinkSync,
|
||||
ensureSymlink,
|
||||
ensureSymlinkSync,
|
||||
readJson,
|
||||
readJSON,
|
||||
readJsonSync,
|
||||
readJSONSync,
|
||||
writeJson,
|
||||
writeJSON,
|
||||
writeJsonSync,
|
||||
writeJSONSync,
|
||||
outputJson,
|
||||
outputJSON,
|
||||
outputJsonSync,
|
||||
outputJSONSync,
|
||||
mkdirs,
|
||||
mkdirsSync,
|
||||
mkdirp,
|
||||
mkdirpSync,
|
||||
ensureDir,
|
||||
ensureDirSync,
|
||||
move,
|
||||
moveSync,
|
||||
outputFile,
|
||||
outputFileSync,
|
||||
pathExists,
|
||||
pathExistsSync,
|
||||
remove,
|
||||
removeSync,
|
||||
PathLike,
|
||||
NoParamCallback,
|
||||
NoParamCallbackWithUndefined,
|
||||
SymlinkType,
|
||||
CopyFilterSync,
|
||||
CopyFilterAsync,
|
||||
CopyOptions,
|
||||
CopyOptionsSync,
|
||||
EnsureDirOptions,
|
||||
MoveOptions,
|
||||
WriteFileOptions,
|
||||
JsonReadOptions,
|
||||
JsonWriteOptions,
|
||||
JsonOutputOptions,
|
||||
} from './index.js';
|
||||
|
||||
declare const fsExtra: {
|
||||
copy: typeof fse.copy;
|
||||
copySync: typeof fse.copySync;
|
||||
emptyDirSync: typeof fse.emptyDirSync;
|
||||
emptydirSync: typeof fse.emptydirSync;
|
||||
emptyDir: typeof fse.emptyDir;
|
||||
emptydir: typeof fse.emptydir;
|
||||
createFile: typeof fse.createFile;
|
||||
createFileSync: typeof fse.createFileSync;
|
||||
ensureFile: typeof fse.ensureFile;
|
||||
ensureFileSync: typeof fse.ensureFileSync;
|
||||
createLink: typeof fse.createLink;
|
||||
createLinkSync: typeof fse.createLinkSync;
|
||||
ensureLink: typeof fse.ensureLink;
|
||||
ensureLinkSync: typeof fse.ensureLinkSync;
|
||||
createSymlink: typeof fse.createSymlink;
|
||||
createSymlinkSync: typeof fse.createSymlinkSync;
|
||||
ensureSymlink: typeof fse.ensureSymlink;
|
||||
ensureSymlinkSync: typeof fse.ensureSymlinkSync;
|
||||
readJson: typeof fse.readJson;
|
||||
readJSON: typeof fse.readJSON;
|
||||
readJsonSync: typeof fse.readJsonSync;
|
||||
readJSONSync: typeof fse.readJSONSync;
|
||||
writeJson: typeof fse.writeJson;
|
||||
writeJSON: typeof fse.writeJSON;
|
||||
writeJsonSync: typeof fse.writeJsonSync;
|
||||
writeJSONSync: typeof fse.writeJSONSync;
|
||||
outputJson: typeof fse.outputJson;
|
||||
outputJSON: typeof fse.outputJSON;
|
||||
outputJsonSync: typeof fse.outputJsonSync;
|
||||
outputJSONSync: typeof fse.outputJSONSync;
|
||||
mkdirs: typeof fse.mkdirs;
|
||||
mkdirsSync: typeof fse.mkdirsSync;
|
||||
mkdirp: typeof fse.mkdirp;
|
||||
mkdirpSync: typeof fse.mkdirpSync;
|
||||
ensureDir: typeof fse.ensureDir;
|
||||
ensureDirSync: typeof fse.ensureDirSync;
|
||||
move: typeof fse.move;
|
||||
moveSync: typeof fse.moveSync;
|
||||
outputFile: typeof fse.outputFile;
|
||||
outputFileSync: typeof fse.outputFileSync;
|
||||
pathExists: typeof fse.pathExists;
|
||||
pathExistsSync: typeof fse.pathExistsSync;
|
||||
remove: typeof fse.remove;
|
||||
removeSync: typeof fse.removeSync;
|
||||
};
|
||||
|
||||
export default fsExtra;
|
1438
node_modules/@types/fs-extra/index.d.ts
generated
vendored
1438
node_modules/@types/fs-extra/index.d.ts
generated
vendored
File diff suppressed because it is too large
Load diff
23
node_modules/@types/fs-extra/package.json
generated
vendored
23
node_modules/@types/fs-extra/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@types/fs-extra",
|
||||
"version": "9.0.13",
|
||||
"version": "11.0.1",
|
||||
"description": "TypeScript definitions for fs-extra",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra",
|
||||
"license": "MIT",
|
||||
|
@ -49,6 +49,11 @@
|
|||
"name": "Tiger Oakes",
|
||||
"url": "https://github.com/NotWoods",
|
||||
"githubUsername": "NotWoods"
|
||||
},
|
||||
{
|
||||
"name": "BendingBender",
|
||||
"url": "https://github.com/BendingBender",
|
||||
"githubUsername": "BendingBender"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
|
@ -60,8 +65,20 @@
|
|||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/jsonfile": "*",
|
||||
"@types/node": "*"
|
||||
},
|
||||
"typesPublisherContentHash": "75e10d16a18d936a50e54414024604aa9484e8345b37c2027921869f254523ee",
|
||||
"typeScriptVersion": "3.9"
|
||||
"typesPublisherContentHash": "9244941e71bf5edda5456eb8aee9bd3d796ad970d74fb7991788553ac18c5d83",
|
||||
"typeScriptVersion": "4.5",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./index.d.ts"
|
||||
},
|
||||
"./esm": {
|
||||
"types": {
|
||||
"import": "./esm.d.mts"
|
||||
}
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
}
|
||||
}
|
21
node_modules/@types/jsonfile/LICENSE
generated
vendored
Executable file
21
node_modules/@types/jsonfile/LICENSE
generated
vendored
Executable 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/jsonfile/README.md
generated
vendored
Executable file
16
node_modules/@types/jsonfile/README.md
generated
vendored
Executable file
|
@ -0,0 +1,16 @@
|
|||
# Installation
|
||||
> `npm install --save @types/jsonfile`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for jsonfile (https://github.com/jprichardson/node-jsonfile#readme).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsonfile.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 09 Jan 2023 00:02:44 GMT
|
||||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
||||
* Global values: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Daniel Bowring](https://github.com/dbowring), [BendingBender](https://github.com/BendingBender), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
|
78
node_modules/@types/jsonfile/index.d.ts
generated
vendored
Executable file
78
node_modules/@types/jsonfile/index.d.ts
generated
vendored
Executable file
|
@ -0,0 +1,78 @@
|
|||
// Type definitions for jsonfile 6.1
|
||||
// Project: https://github.com/jprichardson/node-jsonfile#readme
|
||||
// Definitions by: Daniel Bowring <https://github.com/dbowring>
|
||||
// BendingBender <https://github.com/BendingBender>
|
||||
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node"/>
|
||||
|
||||
import { Url } from 'url';
|
||||
import {
|
||||
PathLike,
|
||||
readFile as fsReadFile,
|
||||
readFileSync as fsReadFileSync,
|
||||
writeFile as fsWriteFile,
|
||||
writeFileSync as fsWriteFileSync,
|
||||
} from 'fs';
|
||||
|
||||
export type Path = PathLike | Url;
|
||||
|
||||
export interface FS {
|
||||
readFile: typeof fsReadFile;
|
||||
readFileSync: typeof fsReadFileSync;
|
||||
writeFile: typeof fsWriteFile;
|
||||
writeFileSync: typeof fsWriteFileSync;
|
||||
}
|
||||
|
||||
export type JFReadOptions =
|
||||
| {
|
||||
encoding?: string | null | undefined;
|
||||
flag?: string | undefined;
|
||||
throws?: boolean | undefined;
|
||||
fs?: FS | undefined;
|
||||
reviver?: ((key: any, value: any) => any) | undefined;
|
||||
}
|
||||
| string
|
||||
| null
|
||||
| undefined;
|
||||
|
||||
export type JFWriteOptions =
|
||||
| {
|
||||
encoding?: string | null | undefined;
|
||||
mode?: string | number | undefined;
|
||||
flag?: string | undefined;
|
||||
fs?: FS | undefined;
|
||||
EOL?: string | undefined;
|
||||
spaces?: string | number | undefined;
|
||||
replacer?: ((key: string, value: any) => any) | undefined;
|
||||
}
|
||||
| string
|
||||
| null;
|
||||
|
||||
export type ReadCallback = (err: NodeJS.ErrnoException | null, data: any) => void;
|
||||
export type WriteCallback = (err: NodeJS.ErrnoException | null) => void;
|
||||
|
||||
/**
|
||||
* @see {@link https://github.com/jprichardson/node-jsonfile#readfilefilename-options-callback}
|
||||
*/
|
||||
export function readFile(file: Path, options: JFReadOptions, callback: ReadCallback): void;
|
||||
export function readFile(file: Path, callback: ReadCallback): void;
|
||||
export function readFile(file: Path, options?: JFReadOptions): Promise<any>;
|
||||
|
||||
/**
|
||||
* @see {@link https://github.com/jprichardson/node-jsonfile#readfilesyncfilename-options}
|
||||
*/
|
||||
export function readFileSync(file: Path, options?: JFReadOptions): any;
|
||||
|
||||
/**
|
||||
* @see {@link https://github.com/jprichardson/node-jsonfile#writefilefilename-obj-options-callback}
|
||||
*/
|
||||
export function writeFile(file: Path, obj: any, options: JFWriteOptions, callback: WriteCallback): void;
|
||||
export function writeFile(file: Path, obj: any, callback: WriteCallback): void;
|
||||
export function writeFile(file: Path, obj: any, options?: JFWriteOptions): Promise<void>;
|
||||
|
||||
/**
|
||||
* @see {@link https://github.com/jprichardson/node-jsonfile#writefilesyncfilename-obj-options}
|
||||
*/
|
||||
export function writeFileSync(file: Path, obj: any, options?: JFWriteOptions): void;
|
37
node_modules/@types/jsonfile/package.json
generated
vendored
Executable file
37
node_modules/@types/jsonfile/package.json
generated
vendored
Executable file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"name": "@types/jsonfile",
|
||||
"version": "6.1.1",
|
||||
"description": "TypeScript definitions for jsonfile",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsonfile",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Daniel Bowring",
|
||||
"url": "https://github.com/dbowring",
|
||||
"githubUsername": "dbowring"
|
||||
},
|
||||
{
|
||||
"name": "BendingBender",
|
||||
"url": "https://github.com/BendingBender",
|
||||
"githubUsername": "BendingBender"
|
||||
},
|
||||
{
|
||||
"name": "Piotr Błażejewicz",
|
||||
"url": "https://github.com/peterblazejewicz",
|
||||
"githubUsername": "peterblazejewicz"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/jsonfile"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
},
|
||||
"typesPublisherContentHash": "c1cbc44e364fab01fba30bb4617cea593123234baa610c3e5ad34decb6bb6799",
|
||||
"typeScriptVersion": "4.2"
|
||||
}
|
9
node_modules/@types/jsonfile/utils.d.ts
generated
vendored
Executable file
9
node_modules/@types/jsonfile/utils.d.ts
generated
vendored
Executable file
|
@ -0,0 +1,9 @@
|
|||
export function stringify(obj: any, options?: StringifyOptions): string;
|
||||
export function stripBom(content: string): string;
|
||||
|
||||
export interface StringifyOptions {
|
||||
EOL?: string | undefined;
|
||||
finalEOL?: boolean | undefined;
|
||||
replacer?: ((key: string, value: any) => any) | undefined;
|
||||
spaces?: string | number | undefined;
|
||||
}
|
32
node_modules/@types/node/README.md
generated
vendored
32
node_modules/@types/node/README.md
generated
vendored
|
@ -1,16 +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: Mon, 26 Dec 2022 17:32:37 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), [Simon Schick](https://github.com/SimonSchick), [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).
|
||||
# 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: Sat, 25 Mar 2023 22:33:05 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), [Simon Schick](https://github.com/SimonSchick), [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).
|
||||
|
|
12
node_modules/@types/node/async_hooks.d.ts
generated
vendored
12
node_modules/@types/node/async_hooks.d.ts
generated
vendored
|
@ -319,6 +319,16 @@ declare module 'async_hooks' {
|
|||
*/
|
||||
triggerAsyncId(): number;
|
||||
}
|
||||
interface AsyncLocalStorageOptions<T> {
|
||||
/**
|
||||
* Optional callback invoked before a store is propagated to a new async resource.
|
||||
* Returning `true` allows propagation, returning `false` avoids it. Default is to propagate always.
|
||||
* @param type The type of async event.
|
||||
* @param store The current store.
|
||||
* @since v18.13.0
|
||||
*/
|
||||
onPropagate?: ((type: string, store: T) => boolean) | undefined;
|
||||
}
|
||||
/**
|
||||
* This class creates stores that stay coherent through asynchronous operations.
|
||||
*
|
||||
|
@ -368,6 +378,8 @@ declare module 'async_hooks' {
|
|||
* @since v13.10.0, v12.17.0
|
||||
*/
|
||||
class AsyncLocalStorage<T> {
|
||||
constructor(options?: AsyncLocalStorageOptions<T>);
|
||||
|
||||
/**
|
||||
* Disables the instance of `AsyncLocalStorage`. All subsequent calls
|
||||
* to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
|
||||
|
|
68
node_modules/@types/node/buffer.d.ts
generated
vendored
68
node_modules/@types/node/buffer.d.ts
generated
vendored
|
@ -46,6 +46,8 @@
|
|||
declare module 'buffer' {
|
||||
import { BinaryLike } from 'node:crypto';
|
||||
import { ReadableStream as WebReadableStream } from 'node:stream/web';
|
||||
export function isUtf8(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
|
||||
export function isAscii(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
|
||||
export const INSPECT_MAX_BYTES: number;
|
||||
export const kMaxLength: number;
|
||||
export const kStringMaxLength: number;
|
||||
|
@ -163,17 +165,56 @@ declare module 'buffer' {
|
|||
*/
|
||||
stream(): WebReadableStream;
|
||||
}
|
||||
export interface FileOptions {
|
||||
/**
|
||||
* One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be
|
||||
* converted to the platform native line-ending as specified by `require('node:os').EOL`.
|
||||
*/
|
||||
endings?: 'native' | 'transparent';
|
||||
/** The File content-type. */
|
||||
type?: string;
|
||||
/** The last modified date of the file. `Default`: Date.now(). */
|
||||
lastModified?: number;
|
||||
}
|
||||
/**
|
||||
* A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
|
||||
* @experimental
|
||||
* @since v18.13.0
|
||||
*/
|
||||
export class File extends Blob {
|
||||
constructor(sources: Array<BinaryLike | Blob>, fileName: string, options?: FileOptions);
|
||||
/**
|
||||
* The name of the `File`.
|
||||
* @since v18.13.0
|
||||
*/
|
||||
readonly name: string;
|
||||
/**
|
||||
* The last modified date of the `File`.
|
||||
* @since v18.13.0
|
||||
*/
|
||||
readonly lastModified: number;
|
||||
}
|
||||
export import atob = globalThis.atob;
|
||||
export import btoa = globalThis.btoa;
|
||||
|
||||
import { Blob as NodeBlob } from 'buffer';
|
||||
// This conditional type will be the existing global Blob in a browser, or
|
||||
// the copy below in a Node environment.
|
||||
type __Blob = typeof globalThis extends { onmessage: any, Blob: infer T }
|
||||
? T : NodeBlob;
|
||||
type __Blob = typeof globalThis extends { onmessage: any; Blob: infer T } ? T : NodeBlob;
|
||||
global {
|
||||
// Buffer class
|
||||
type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
|
||||
type BufferEncoding =
|
||||
| 'ascii'
|
||||
| 'utf8'
|
||||
| 'utf-8'
|
||||
| 'utf16le'
|
||||
| 'ucs2'
|
||||
| 'ucs-2'
|
||||
| 'base64'
|
||||
| 'base64url'
|
||||
| 'latin1'
|
||||
| 'binary'
|
||||
| 'hex';
|
||||
type WithImplicitCoercion<T> =
|
||||
| T
|
||||
| {
|
||||
|
@ -247,7 +288,11 @@ declare module 'buffer' {
|
|||
* `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does.
|
||||
* @since v5.10.0
|
||||
*/
|
||||
from(arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>, byteOffset?: number, length?: number): Buffer;
|
||||
from(
|
||||
arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>,
|
||||
byteOffset?: number,
|
||||
length?: number,
|
||||
): Buffer;
|
||||
/**
|
||||
* Creates a new Buffer using the passed {data}
|
||||
* @param data data to create a new Buffer
|
||||
|
@ -265,7 +310,7 @@ declare module 'buffer' {
|
|||
| {
|
||||
[Symbol.toPrimitive](hint: 'string'): string;
|
||||
},
|
||||
encoding?: BufferEncoding
|
||||
encoding?: BufferEncoding,
|
||||
): Buffer;
|
||||
/**
|
||||
* Creates a new Buffer using the passed {data}
|
||||
|
@ -339,7 +384,10 @@ declare module 'buffer' {
|
|||
* @param [encoding='utf8'] If `string` is a string, this is its encoding.
|
||||
* @return The number of bytes contained within `string`.
|
||||
*/
|
||||
byteLength(string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer, encoding?: BufferEncoding): number;
|
||||
byteLength(
|
||||
string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
|
||||
encoding?: BufferEncoding,
|
||||
): number;
|
||||
/**
|
||||
* Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together.
|
||||
*
|
||||
|
@ -710,7 +758,13 @@ declare module 'buffer' {
|
|||
* @param [sourceStart=0] The offset within `buf` at which to begin comparison.
|
||||
* @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
|
||||
*/
|
||||
compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): -1 | 0 | 1;
|
||||
compare(
|
||||
target: Uint8Array,
|
||||
targetStart?: number,
|
||||
targetEnd?: number,
|
||||
sourceStart?: number,
|
||||
sourceEnd?: number,
|
||||
): -1 | 0 | 1;
|
||||
/**
|
||||
* Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
|
||||
*
|
||||
|
|
21
node_modules/@types/node/crypto.d.ts
generated
vendored
21
node_modules/@types/node/crypto.d.ts
generated
vendored
|
@ -1190,11 +1190,13 @@ declare module 'crypto' {
|
|||
format?: KeyFormat | undefined;
|
||||
type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
|
||||
passphrase?: string | Buffer | undefined;
|
||||
encoding?: string | undefined;
|
||||
}
|
||||
interface PublicKeyInput {
|
||||
key: string | Buffer;
|
||||
format?: KeyFormat | undefined;
|
||||
type?: 'pkcs1' | 'spki' | undefined;
|
||||
encoding?: string | undefined;
|
||||
}
|
||||
/**
|
||||
* Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
|
||||
|
@ -1305,6 +1307,7 @@ declare module 'crypto' {
|
|||
interface VerifyKeyObjectInput extends SigningOptions {
|
||||
key: KeyObject;
|
||||
}
|
||||
interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {}
|
||||
type KeyLike = string | Buffer | KeyObject;
|
||||
/**
|
||||
* The `Sign` class is a utility for generating signatures. It can be used in one
|
||||
|
@ -1459,8 +1462,8 @@ declare module 'crypto' {
|
|||
* be passed instead of a public key.
|
||||
* @since v0.1.92
|
||||
*/
|
||||
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
|
||||
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean;
|
||||
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, signature: NodeJS.ArrayBufferView): boolean;
|
||||
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean;
|
||||
}
|
||||
/**
|
||||
* Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
|
||||
|
@ -2968,11 +2971,16 @@ declare module 'crypto' {
|
|||
* If the `callback` function is provided this function uses libuv's threadpool.
|
||||
* @since v12.0.0
|
||||
*/
|
||||
function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
|
||||
function verify(
|
||||
algorithm: string | null | undefined,
|
||||
data: NodeJS.ArrayBufferView,
|
||||
key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
|
||||
key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
|
||||
signature: NodeJS.ArrayBufferView
|
||||
): boolean;
|
||||
function verify(
|
||||
algorithm: string | null | undefined,
|
||||
data: NodeJS.ArrayBufferView,
|
||||
key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
|
||||
signature: NodeJS.ArrayBufferView,
|
||||
callback: (error: Error | null, result: boolean) => void
|
||||
): void;
|
||||
|
@ -3121,12 +3129,13 @@ declare module 'crypto' {
|
|||
*/
|
||||
disableEntropyCache?: boolean | undefined;
|
||||
}
|
||||
type UUID = `${string}-${string}-${string}-${string}-${string}`;
|
||||
/**
|
||||
* Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a
|
||||
* cryptographic pseudorandom number generator.
|
||||
* @since v15.6.0, v14.17.0
|
||||
*/
|
||||
function randomUUID(options?: RandomUUIDOptions): string;
|
||||
function randomUUID(options?: RandomUUIDOptions): UUID;
|
||||
interface X509CheckOptions {
|
||||
/**
|
||||
* @default 'always'
|
||||
|
@ -3638,7 +3647,7 @@ declare module 'crypto' {
|
|||
* The UUID is generated using a cryptographic pseudorandom number generator.
|
||||
* @since v16.7.0
|
||||
*/
|
||||
randomUUID(): string;
|
||||
randomUUID(): UUID;
|
||||
CryptoKey: CryptoKeyConstructor;
|
||||
}
|
||||
// This constructor throws ILLEGAL_CONSTRUCTOR so it should not be newable.
|
||||
|
|
39
node_modules/@types/node/diagnostics_channel.d.ts
generated
vendored
39
node_modules/@types/node/diagnostics_channel.d.ts
generated
vendored
|
@ -58,6 +58,45 @@ declare module 'diagnostics_channel' {
|
|||
*/
|
||||
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 '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 diagnostics_channel.subscribe(name, onMessage).
|
||||
*
|
||||
* ```js
|
||||
* import diagnostics_channel from '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
|
||||
* @returns `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 use to track subscribers and to publish messages when there
|
||||
|
|
2
node_modules/@types/node/dns.d.ts
generated
vendored
2
node_modules/@types/node/dns.d.ts
generated
vendored
|
@ -174,7 +174,7 @@ declare module 'dns' {
|
|||
type: 'AAAA';
|
||||
}
|
||||
export interface CaaRecord {
|
||||
critial: number;
|
||||
critical: number;
|
||||
issue?: string | undefined;
|
||||
issuewild?: string | undefined;
|
||||
iodef?: string | undefined;
|
||||
|
|
100
node_modules/@types/node/fs.d.ts
generated
vendored
100
node_modules/@types/node/fs.d.ts
generated
vendored
|
@ -131,6 +131,42 @@ declare module 'fs' {
|
|||
* @since v0.1.21
|
||||
*/
|
||||
export class Stats {}
|
||||
|
||||
export interface StatsFsBase<T> {
|
||||
/** Type of file system. */
|
||||
type: T;
|
||||
/** Optimal transfer block size. */
|
||||
bsize: T;
|
||||
/** Total data blocks in file system. */
|
||||
blocks: T;
|
||||
/** Free blocks in file system. */
|
||||
bfree: T;
|
||||
/** Available blocks for unprivileged users */
|
||||
bavail: T;
|
||||
/** Total file nodes in file system. */
|
||||
files: T;
|
||||
/** Free file nodes in file system. */
|
||||
ffree: T;
|
||||
}
|
||||
|
||||
export interface StatsFs extends StatsFsBase<number> {}
|
||||
|
||||
/**
|
||||
* Provides information about a mounted file system
|
||||
*
|
||||
* Objects returned from {@link statfs} and {@link statfsSync} are of this type.
|
||||
* If `bigint` in the `options` passed to those methods is true, the numeric values
|
||||
* will be `bigint` instead of `number`.
|
||||
* @since v18.15.0
|
||||
*/
|
||||
export class StatsFs {}
|
||||
|
||||
export interface BigIntStatsFs extends StatsFsBase<bigint> {}
|
||||
|
||||
export interface StatFsOptions {
|
||||
bigint?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* A representation of a directory entry, which can be a file or a subdirectory
|
||||
* within the directory, as returned by reading from an `fs.Dir`. The
|
||||
|
@ -1081,6 +1117,70 @@ declare module 'fs' {
|
|||
): Promise<BigIntStats>;
|
||||
function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
|
||||
}
|
||||
/**
|
||||
* Asynchronous statfs(2). Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an <fs.StatFs> object.
|
||||
* In case of an error, the err.code will be one of Common System Errors.
|
||||
* @param path A path to an existing file or directory on the file system to be queried.
|
||||
* @param callback
|
||||
*/
|
||||
export function statfs(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void;
|
||||
export function statfs(
|
||||
path: PathLike,
|
||||
options:
|
||||
| (StatFsOptions & {
|
||||
bigint?: false | undefined;
|
||||
})
|
||||
| undefined,
|
||||
callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void
|
||||
): void;
|
||||
export function statfs(
|
||||
path: PathLike,
|
||||
options: StatFsOptions & {
|
||||
bigint: true;
|
||||
},
|
||||
callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void
|
||||
): void;
|
||||
export function statfs(path: PathLike, options: StatFsOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void): void;
|
||||
export namespace statfs {
|
||||
/**
|
||||
* Asynchronous statfs(2) - Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an <fs.StatFs> object.
|
||||
* @param path A path to an existing file or directory on the file system to be queried.
|
||||
*/
|
||||
function __promisify__(
|
||||
path: PathLike,
|
||||
options?: StatFsOptions & {
|
||||
bigint?: false | undefined;
|
||||
}
|
||||
): Promise<StatsFs>;
|
||||
function __promisify__(
|
||||
path: PathLike,
|
||||
options: StatFsOptions & {
|
||||
bigint: true;
|
||||
}
|
||||
): Promise<BigIntStatsFs>;
|
||||
function __promisify__(path: PathLike, options?: StatFsOptions): Promise<StatsFs | BigIntStatsFs>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Synchronous statfs(2). Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an <fs.StatFs> object.
|
||||
* In case of an error, the err.code will be one of Common System Errors.
|
||||
* @param path A path to an existing file or directory on the file system to be queried.
|
||||
* @param callback
|
||||
*/
|
||||
export function statfsSync(
|
||||
path: PathLike,
|
||||
options?: StatFsOptions & {
|
||||
bigint?: false | undefined;
|
||||
}
|
||||
): StatsFs;
|
||||
export function statfsSync(
|
||||
path: PathLike,
|
||||
options: StatFsOptions & {
|
||||
bigint: true;
|
||||
}
|
||||
): BigIntStatsFs;
|
||||
|
||||
export function statfsSync(path: PathLike, options?: StatFsOptions): StatsFs | BigIntStatsFs;
|
||||
/**
|
||||
* Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
|
||||
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
|
|
21
node_modules/@types/node/fs/promises.d.ts
generated
vendored
21
node_modules/@types/node/fs/promises.d.ts
generated
vendored
|
@ -14,6 +14,7 @@ declare module 'fs/promises' {
|
|||
import { ReadableStream } from 'node:stream/web';
|
||||
import {
|
||||
BigIntStats,
|
||||
BigIntStatsFs,
|
||||
BufferEncodingOption,
|
||||
constants as fsConstants,
|
||||
CopyOptions,
|
||||
|
@ -30,7 +31,9 @@ declare module 'fs/promises' {
|
|||
RmDirOptions,
|
||||
RmOptions,
|
||||
StatOptions,
|
||||
StatFsOptions,
|
||||
Stats,
|
||||
StatsFs,
|
||||
TimeLike,
|
||||
WatchEventType,
|
||||
WatchOptions,
|
||||
|
@ -745,6 +748,24 @@ declare module 'fs/promises' {
|
|||
}
|
||||
): Promise<BigIntStats>;
|
||||
function stat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
|
||||
/**
|
||||
* @since v18.15.0
|
||||
* @return Fulfills with an {fs.StatFs} for the file system.
|
||||
*/
|
||||
function statfs(
|
||||
path: PathLike,
|
||||
opts?: StatFsOptions & {
|
||||
bigint?: false | undefined;
|
||||
}
|
||||
): Promise<StatsFs>;
|
||||
function statfs(
|
||||
path: PathLike,
|
||||
opts: StatFsOptions & {
|
||||
bigint: true;
|
||||
}
|
||||
): Promise<BigIntStatsFs>;
|
||||
function statfs(path: PathLike, opts?: StatFsOptions): Promise<StatsFs | BigIntStatsFs>;
|
||||
|
||||
/**
|
||||
* Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail.
|
||||
* @since v10.0.0
|
||||
|
|
2
node_modules/@types/node/globals.d.ts
generated
vendored
2
node_modules/@types/node/globals.d.ts
generated
vendored
|
@ -53,7 +53,7 @@ interface AbortController {
|
|||
/**
|
||||
* 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(): void;
|
||||
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. */
|
||||
|
|
7
node_modules/@types/node/http.d.ts
generated
vendored
7
node_modules/@types/node/http.d.ts
generated
vendored
|
@ -144,6 +144,7 @@ declare module 'http' {
|
|||
socketPath?: string | undefined;
|
||||
timeout?: number | undefined;
|
||||
uniqueHeaders?: Array<string | string[]> | undefined;
|
||||
joinDuplicateHeaders?: boolean;
|
||||
}
|
||||
interface ServerOptions<
|
||||
Request extends typeof IncomingMessage = typeof IncomingMessage,
|
||||
|
@ -164,6 +165,12 @@ declare module 'http' {
|
|||
* @since v18.0.0
|
||||
*/
|
||||
requestTimeout?: number | undefined;
|
||||
/**
|
||||
* It joins the field line values of multiple headers in a request with `, ` instead of discarding the duplicates.
|
||||
* @default false
|
||||
* @since v18.14.0
|
||||
*/
|
||||
joinDuplicateHeaders?: boolean;
|
||||
/**
|
||||
* The number of milliseconds of inactivity a server needs to wait for additional incoming data,
|
||||
* after it has finished writing the last response, before a socket will be destroyed.
|
||||
|
|
1
node_modules/@types/node/http2.d.ts
generated
vendored
1
node_modules/@types/node/http2.d.ts
generated
vendored
|
@ -1053,7 +1053,6 @@ declare module 'http2' {
|
|||
*/
|
||||
unknownProtocolTimeout?: number | undefined;
|
||||
selectPadding?(frameLen: number, maxFrameLen: number): number;
|
||||
createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex;
|
||||
}
|
||||
export interface ClientSessionOptions extends SessionOptions {
|
||||
maxReservedRemoteStreams?: number | undefined;
|
||||
|
|
2
node_modules/@types/node/index.d.ts
generated
vendored
2
node_modules/@types/node/index.d.ts
generated
vendored
|
@ -1,4 +1,4 @@
|
|||
// Type definitions for non-npm package Node.js 18.11
|
||||
// Type definitions for non-npm package Node.js 18.15
|
||||
// Project: https://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped>
|
||||
|
|
1
node_modules/@types/node/module.d.ts
generated
vendored
1
node_modules/@types/node/module.d.ts
generated
vendored
|
@ -85,6 +85,7 @@ declare module 'module' {
|
|||
static wrap(code: string): string;
|
||||
static createRequire(path: string | URL): NodeRequire;
|
||||
static builtinModules: string[];
|
||||
static isBuiltin(moduleName: string): boolean;
|
||||
static Module: typeof Module;
|
||||
constructor(id: string, parent?: Module);
|
||||
}
|
||||
|
|
14
node_modules/@types/node/net.d.ts
generated
vendored
14
node_modules/@types/node/net.d.ts
generated
vendored
|
@ -57,6 +57,14 @@ declare module 'net' {
|
|||
noDelay?: boolean | undefined;
|
||||
keepAlive?: boolean | undefined;
|
||||
keepAliveInitialDelay?: number | undefined;
|
||||
/**
|
||||
* @since v18.13.0
|
||||
*/
|
||||
autoSelectFamily?: boolean | undefined;
|
||||
/**
|
||||
* @since v18.13.0
|
||||
*/
|
||||
autoSelectFamilyAttemptTimeout?: number | undefined;
|
||||
}
|
||||
interface IpcSocketConnectOpts extends ConnectOpts {
|
||||
path: string;
|
||||
|
@ -261,6 +269,12 @@ declare module 'net' {
|
|||
* @since v6.1.0
|
||||
*/
|
||||
readonly connecting: boolean;
|
||||
/**
|
||||
* This is `true` if the socket is not connected yet, either because `.connect()`
|
||||
* has not yet been called or because it is still in the process of connecting (see `socket.connecting`).
|
||||
* @since v10.16.0
|
||||
*/
|
||||
readonly pending: boolean;
|
||||
/**
|
||||
* See `writable.destroyed` for further details.
|
||||
*/
|
||||
|
|
7
node_modules/@types/node/os.d.ts
generated
vendored
7
node_modules/@types/node/os.d.ts
generated
vendored
|
@ -132,6 +132,13 @@ declare module 'os' {
|
|||
* @since v0.3.3
|
||||
*/
|
||||
function cpus(): CpuInfo[];
|
||||
/**
|
||||
* Returns an estimate of the default amount of parallelism a program should use. Always returns a value greater than zero.
|
||||
*
|
||||
* This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism).
|
||||
* @since 18.4.0
|
||||
*/
|
||||
function availableParallelism(): number;
|
||||
/**
|
||||
* Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it
|
||||
* returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
|
||||
|
|
6
node_modules/@types/node/package.json
generated
vendored
6
node_modules/@types/node/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@types/node",
|
||||
"version": "18.11.18",
|
||||
"version": "18.15.10",
|
||||
"description": "TypeScript definitions for Node.js",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
||||
"license": "MIT",
|
||||
|
@ -232,6 +232,6 @@
|
|||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "540ec74ad976942ed4b12e09fd57842adfd77a63a4ea099f15f0602ad707835c",
|
||||
"typeScriptVersion": "4.2"
|
||||
"typesPublisherContentHash": "d968764271bc711c7d024195dad3ccfa3e82756092d060a8df0f5a57a517c842",
|
||||
"typeScriptVersion": "4.3"
|
||||
}
|
6
node_modules/@types/node/process.d.ts
generated
vendored
6
node_modules/@types/node/process.d.ts
generated
vendored
|
@ -1089,6 +1089,12 @@ declare module 'process' {
|
|||
*/
|
||||
mainModule?: Module | undefined;
|
||||
memoryUsage: MemoryUsageFn;
|
||||
/**
|
||||
* Gets the amount of memory available to the process (in bytes) based on
|
||||
* limits imposed by the OS. If there is no such constraint, or the constraint
|
||||
* is unknown, `undefined` is returned.
|
||||
*/
|
||||
constrainedMemory(): number | undefined;
|
||||
/**
|
||||
* The `process.cpuUsage()` method returns the user and system CPU time usage of
|
||||
* the current process, in an object with properties `user` and `system`, whose
|
||||
|
|
99
node_modules/@types/node/stream.d.ts
generated
vendored
99
node_modules/@types/node/stream.d.ts
generated
vendored
|
@ -912,6 +912,105 @@ declare module 'stream' {
|
|||
end(chunk: any, encoding?: BufferEncoding, cb?: () => void): this;
|
||||
cork(): void;
|
||||
uncork(): void;
|
||||
/**
|
||||
* Event emitter
|
||||
* The defined events on documents including:
|
||||
* 1. close
|
||||
* 2. data
|
||||
* 3. drain
|
||||
* 4. end
|
||||
* 5. error
|
||||
* 6. finish
|
||||
* 7. pause
|
||||
* 8. pipe
|
||||
* 9. readable
|
||||
* 10. resume
|
||||
* 11. unpipe
|
||||
*/
|
||||
addListener(event: 'close', listener: () => void): this;
|
||||
addListener(event: 'data', listener: (chunk: any) => void): this;
|
||||
addListener(event: 'drain', listener: () => void): this;
|
||||
addListener(event: 'end', listener: () => void): this;
|
||||
addListener(event: 'error', listener: (err: Error) => void): this;
|
||||
addListener(event: 'finish', listener: () => void): this;
|
||||
addListener(event: 'pause', listener: () => void): this;
|
||||
addListener(event: 'pipe', listener: (src: Readable) => void): this;
|
||||
addListener(event: 'readable', listener: () => void): this;
|
||||
addListener(event: 'resume', listener: () => void): this;
|
||||
addListener(event: 'unpipe', listener: (src: Readable) => void): this;
|
||||
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit(event: 'close'): boolean;
|
||||
emit(event: 'data', chunk: any): boolean;
|
||||
emit(event: 'drain'): boolean;
|
||||
emit(event: 'end'): boolean;
|
||||
emit(event: 'error', err: Error): boolean;
|
||||
emit(event: 'finish'): boolean;
|
||||
emit(event: 'pause'): boolean;
|
||||
emit(event: 'pipe', src: Readable): boolean;
|
||||
emit(event: 'readable'): boolean;
|
||||
emit(event: 'resume'): boolean;
|
||||
emit(event: 'unpipe', src: Readable): boolean;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
on(event: 'close', listener: () => void): this;
|
||||
on(event: 'data', listener: (chunk: any) => void): this;
|
||||
on(event: 'drain', listener: () => void): this;
|
||||
on(event: 'end', listener: () => void): this;
|
||||
on(event: 'error', listener: (err: Error) => void): this;
|
||||
on(event: 'finish', listener: () => void): this;
|
||||
on(event: 'pause', listener: () => void): this;
|
||||
on(event: 'pipe', listener: (src: Readable) => void): this;
|
||||
on(event: 'readable', listener: () => void): this;
|
||||
on(event: 'resume', listener: () => void): this;
|
||||
on(event: 'unpipe', listener: (src: Readable) => void): this;
|
||||
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once(event: 'close', listener: () => void): this;
|
||||
once(event: 'data', listener: (chunk: any) => void): this;
|
||||
once(event: 'drain', listener: () => void): this;
|
||||
once(event: 'end', listener: () => void): this;
|
||||
once(event: 'error', listener: (err: Error) => void): this;
|
||||
once(event: 'finish', listener: () => void): this;
|
||||
once(event: 'pause', listener: () => void): this;
|
||||
once(event: 'pipe', listener: (src: Readable) => void): this;
|
||||
once(event: 'readable', listener: () => void): this;
|
||||
once(event: 'resume', listener: () => void): this;
|
||||
once(event: 'unpipe', listener: (src: Readable) => void): this;
|
||||
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: 'close', listener: () => void): this;
|
||||
prependListener(event: 'data', listener: (chunk: any) => void): this;
|
||||
prependListener(event: 'drain', listener: () => void): this;
|
||||
prependListener(event: 'end', listener: () => void): this;
|
||||
prependListener(event: 'error', listener: (err: Error) => void): this;
|
||||
prependListener(event: 'finish', listener: () => void): this;
|
||||
prependListener(event: 'pause', listener: () => void): this;
|
||||
prependListener(event: 'pipe', listener: (src: Readable) => void): this;
|
||||
prependListener(event: 'readable', listener: () => void): this;
|
||||
prependListener(event: 'resume', listener: () => void): this;
|
||||
prependListener(event: 'unpipe', listener: (src: Readable) => void): this;
|
||||
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: 'close', listener: () => void): this;
|
||||
prependOnceListener(event: 'data', listener: (chunk: any) => void): this;
|
||||
prependOnceListener(event: 'drain', listener: () => void): this;
|
||||
prependOnceListener(event: 'end', listener: () => void): this;
|
||||
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
|
||||
prependOnceListener(event: 'finish', listener: () => void): this;
|
||||
prependOnceListener(event: 'pause', listener: () => void): this;
|
||||
prependOnceListener(event: 'pipe', listener: (src: Readable) => void): this;
|
||||
prependOnceListener(event: 'readable', listener: () => void): this;
|
||||
prependOnceListener(event: 'resume', listener: () => void): this;
|
||||
prependOnceListener(event: 'unpipe', listener: (src: Readable) => void): this;
|
||||
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
removeListener(event: 'close', listener: () => void): this;
|
||||
removeListener(event: 'data', listener: (chunk: any) => void): this;
|
||||
removeListener(event: 'drain', listener: () => void): this;
|
||||
removeListener(event: 'end', listener: () => void): this;
|
||||
removeListener(event: 'error', listener: (err: Error) => void): this;
|
||||
removeListener(event: 'finish', listener: () => void): this;
|
||||
removeListener(event: 'pause', listener: () => void): this;
|
||||
removeListener(event: 'pipe', listener: (src: Readable) => void): this;
|
||||
removeListener(event: 'readable', listener: () => void): this;
|
||||
removeListener(event: 'resume', listener: () => void): this;
|
||||
removeListener(event: 'unpipe', listener: (src: Readable) => void): this;
|
||||
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
}
|
||||
type TransformCallback = (error?: Error | null, data?: any) => void;
|
||||
interface TransformOptions extends DuplexOptions {
|
||||
|
|
380
node_modules/@types/node/test.d.ts
generated
vendored
380
node_modules/@types/node/test.d.ts
generated
vendored
|
@ -7,16 +7,16 @@ declare module 'node:test' {
|
|||
* Programmatically start the test runner.
|
||||
* @since v18.9.0
|
||||
* @param options Configuration options for running tests.
|
||||
* @returns A {@link TapStream} that emits events about the test execution.
|
||||
* @returns A {@link TestsStream} that emits events about the test execution.
|
||||
*/
|
||||
function run(options?: RunOptions): TapStream;
|
||||
function run(options?: RunOptions): TestsStream;
|
||||
|
||||
/**
|
||||
* The `test()` function is the value imported from the test module. Each invocation of this
|
||||
* function results in the creation of a test point in the TAP output.
|
||||
* function results in reporting the test to the {@link TestsStream}.
|
||||
*
|
||||
* The {@link TestContext} object passed to the fn argument can be used to perform actions
|
||||
* related to the current test. Examples include skipping the test, adding additional TAP
|
||||
* related to the current test. Examples include skipping the test, adding additional
|
||||
* diagnostic information, or creating subtests.
|
||||
*
|
||||
* `test()` returns a {@link Promise} that resolves once the test completes. The return value
|
||||
|
@ -158,54 +158,88 @@ declare module 'node:test' {
|
|||
}
|
||||
|
||||
/**
|
||||
* A successful call of the `run()` method will return a new `TapStream` object,
|
||||
* streaming a [TAP](https://testanything.org/) output.
|
||||
* `TapStream` will emit events in the order of the tests' definitions.
|
||||
* A successful call of the `run()` method will return a new `TestsStream` object,
|
||||
* streaming a series of events representing the execution of the tests.
|
||||
* `TestsStream` will emit events in the order of the tests' definitions.
|
||||
* @since v18.9.0
|
||||
*/
|
||||
interface TapStream extends NodeJS.ReadableStream {
|
||||
addListener(event: 'test:diagnostic', listener: (message: string) => void): this;
|
||||
interface TestsStream extends NodeJS.ReadableStream {
|
||||
addListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
|
||||
addListener(event: 'test:fail', listener: (data: TestFail) => void): this;
|
||||
addListener(event: 'test:pass', listener: (data: TestPass) => void): this;
|
||||
addListener(event: 'test:plan', listener: (data: TestPlan) => void): this;
|
||||
addListener(event: 'test:start', listener: (data: TestStart) => void): this;
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
emit(event: 'test:diagnostic', message: string): boolean;
|
||||
emit(event: 'test:diagnostic', data: DiagnosticData): boolean;
|
||||
emit(event: 'test:fail', data: TestFail): boolean;
|
||||
emit(event: 'test:pass', data: TestPass): boolean;
|
||||
emit(event: 'test:plan', data: TestPlan): boolean;
|
||||
emit(event: 'test:start', data: TestStart): boolean;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
on(event: 'test:diagnostic', listener: (message: string) => void): this;
|
||||
on(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
|
||||
on(event: 'test:fail', listener: (data: TestFail) => void): this;
|
||||
on(event: 'test:pass', listener: (data: TestPass) => void): this;
|
||||
on(event: 'test:plan', listener: (data: TestPlan) => void): this;
|
||||
on(event: 'test:start', listener: (data: TestStart) => void): this;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: 'test:diagnostic', listener: (message: string) => void): this;
|
||||
once(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
|
||||
once(event: 'test:fail', listener: (data: TestFail) => void): this;
|
||||
once(event: 'test:pass', listener: (data: TestPass) => void): this;
|
||||
once(event: 'test:plan', listener: (data: TestPlan) => void): this;
|
||||
once(event: 'test:start', listener: (data: TestStart) => void): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: 'test:diagnostic', listener: (message: string) => void): this;
|
||||
prependListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
|
||||
prependListener(event: 'test:fail', listener: (data: TestFail) => void): this;
|
||||
prependListener(event: 'test:pass', listener: (data: TestPass) => void): this;
|
||||
prependListener(event: 'test:plan', listener: (data: TestPlan) => void): this;
|
||||
prependListener(event: 'test:start', listener: (data: TestStart) => void): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: 'test:diagnostic', listener: (message: string) => void): this;
|
||||
prependOnceListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
|
||||
prependOnceListener(event: 'test:fail', listener: (data: TestFail) => void): this;
|
||||
prependOnceListener(event: 'test:pass', listener: (data: TestPass) => void): this;
|
||||
prependOnceListener(event: 'test:plan', listener: (data: TestPlan) => void): this;
|
||||
prependOnceListener(event: 'test:start', listener: (data: TestStart) => void): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
}
|
||||
|
||||
interface DiagnosticData {
|
||||
/**
|
||||
* The diagnostic message.
|
||||
*/
|
||||
message: string;
|
||||
|
||||
/**
|
||||
* The nesting level of the test.
|
||||
*/
|
||||
nesting: number;
|
||||
}
|
||||
|
||||
interface TestFail {
|
||||
/**
|
||||
* The test duration.
|
||||
* Additional execution metadata.
|
||||
*/
|
||||
duration: number;
|
||||
details: {
|
||||
/**
|
||||
* The duration of the test in milliseconds.
|
||||
*/
|
||||
duration: number;
|
||||
|
||||
/**
|
||||
* The failure casing test to fail.
|
||||
*/
|
||||
error: Error;
|
||||
/**
|
||||
* The error thrown by the test.
|
||||
*/
|
||||
error: Error;
|
||||
};
|
||||
|
||||
/**
|
||||
* The test name.
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* The nesting level of the test.
|
||||
*/
|
||||
nesting: number;
|
||||
|
||||
/**
|
||||
* The ordinal number of the test.
|
||||
*/
|
||||
|
@ -214,25 +248,35 @@ declare module 'node:test' {
|
|||
/**
|
||||
* Present if `context.todo` is called.
|
||||
*/
|
||||
todo?: string;
|
||||
todo?: string | boolean;
|
||||
|
||||
/**
|
||||
* Present if `context.skip` is called.
|
||||
*/
|
||||
skip?: string;
|
||||
skip?: string | boolean;
|
||||
}
|
||||
|
||||
interface TestPass {
|
||||
/**
|
||||
* The test duration.
|
||||
* Additional execution metadata.
|
||||
*/
|
||||
duration: number;
|
||||
details: {
|
||||
/**
|
||||
* The duration of the test in milliseconds.
|
||||
*/
|
||||
duration: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* The test name.
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* The nesting level of the test.
|
||||
*/
|
||||
nesting: number;
|
||||
|
||||
/**
|
||||
* The ordinal number of the test.
|
||||
*/
|
||||
|
@ -241,12 +285,36 @@ declare module 'node:test' {
|
|||
/**
|
||||
* Present if `context.todo` is called.
|
||||
*/
|
||||
todo?: string;
|
||||
todo?: string | boolean;
|
||||
|
||||
/**
|
||||
* Present if `context.skip` is called.
|
||||
*/
|
||||
skip?: string;
|
||||
skip?: string | boolean;
|
||||
}
|
||||
|
||||
interface TestPlan {
|
||||
/**
|
||||
* The nesting level of the test.
|
||||
*/
|
||||
nesting: number;
|
||||
|
||||
/**
|
||||
* The number of subtests that have ran.
|
||||
*/
|
||||
count: number;
|
||||
}
|
||||
|
||||
interface TestStart {
|
||||
/**
|
||||
* The test name.
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* The nesting level of the test.
|
||||
*/
|
||||
nesting: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -264,6 +332,15 @@ declare module 'node:test' {
|
|||
*/
|
||||
beforeEach: typeof beforeEach;
|
||||
|
||||
/**
|
||||
* This function is used to create a hook that runs after the current test finishes.
|
||||
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
||||
* the second argument. Default: A no-op function.
|
||||
* @param options Configuration options for the hook.
|
||||
* @since v18.13.0
|
||||
*/
|
||||
after: typeof after;
|
||||
|
||||
/**
|
||||
* This function is used to create a hook running after each subtest of the current test.
|
||||
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
||||
|
@ -274,9 +351,9 @@ declare module 'node:test' {
|
|||
afterEach: typeof afterEach;
|
||||
|
||||
/**
|
||||
* This function is used to write TAP diagnostics to the output. Any diagnostic information is
|
||||
* This function is used to write diagnostics to the output. Any diagnostic information is
|
||||
* included at the end of the test's results. This function does not return a value.
|
||||
* @param message Message to be displayed as a TAP diagnostic.
|
||||
* @param message Message to be reported.
|
||||
* @since v18.0.0
|
||||
*/
|
||||
diagnostic(message: string): void;
|
||||
|
@ -304,18 +381,18 @@ declare module 'node:test' {
|
|||
|
||||
/**
|
||||
* This function causes the test's output to indicate the test as skipped. If `message` is
|
||||
* provided, it is included in the TAP output. Calling `skip()` does not terminate execution of
|
||||
* provided, it is included in the output. Calling `skip()` does not terminate execution of
|
||||
* the test function. This function does not return a value.
|
||||
* @param message Optional skip message to be displayed in TAP output.
|
||||
* @param message Optional skip message.
|
||||
* @since v18.0.0
|
||||
*/
|
||||
skip(message?: string): void;
|
||||
|
||||
/**
|
||||
* This function adds a `TODO` directive to the test's output. If `message` is provided, it is
|
||||
* included in the TAP output. Calling `todo()` does not terminate execution of the test
|
||||
* included in the output. Calling `todo()` does not terminate execution of the test
|
||||
* function. This function does not return a value.
|
||||
* @param message Optional `TODO` message to be displayed in TAP output.
|
||||
* @param message Optional `TODO` message.
|
||||
* @since v18.0.0
|
||||
*/
|
||||
todo(message?: string): void;
|
||||
|
@ -333,6 +410,10 @@ declare module 'node:test' {
|
|||
* @returns A {@link Promise} resolved with `undefined` once the test completes.
|
||||
*/
|
||||
test: typeof test;
|
||||
/**
|
||||
* Each test provides its own MockTracker instance.
|
||||
*/
|
||||
readonly mock: MockTracker;
|
||||
}
|
||||
|
||||
interface TestOptions {
|
||||
|
@ -442,5 +523,238 @@ declare module 'node:test' {
|
|||
timeout?: number | undefined;
|
||||
}
|
||||
|
||||
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach };
|
||||
interface MockFunctionOptions {
|
||||
/**
|
||||
* The number of times that the mock will use the behavior of `implementation`.
|
||||
* Once the mock function has been called `times` times,
|
||||
* it will automatically restore the behavior of `original`.
|
||||
* This value must be an integer greater than zero.
|
||||
* @default Infinity
|
||||
*/
|
||||
times?: number | undefined;
|
||||
}
|
||||
|
||||
interface MockMethodOptions extends MockFunctionOptions {
|
||||
/**
|
||||
* If `true`, `object[methodName]` is treated as a getter.
|
||||
* This option cannot be used with the `setter` option.
|
||||
*/
|
||||
getter?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* If `true`, `object[methodName]` is treated as a setter.
|
||||
* This option cannot be used with the `getter` option.
|
||||
*/
|
||||
setter?: boolean | undefined;
|
||||
}
|
||||
|
||||
type Mock<F extends Function> = F & {
|
||||
mock: MockFunctionContext<F>;
|
||||
};
|
||||
|
||||
type NoOpFunction = (...args: any[]) => undefined;
|
||||
|
||||
type FunctionPropertyNames<T> = {
|
||||
[K in keyof T]: T[K] extends Function ? K : never;
|
||||
}[keyof T];
|
||||
|
||||
interface MockTracker {
|
||||
/**
|
||||
* This function is used to create a mock function.
|
||||
* @param original An optional function to create a mock on.
|
||||
* @param implementation An optional function used as the mock implementation for `original`.
|
||||
* This is useful for creating mocks that exhibit one behavior for a specified number of calls and then restore the behavior of `original`.
|
||||
* @param options Optional configuration options for the mock function.
|
||||
*/
|
||||
fn<F extends Function = NoOpFunction>(original?: F, options?: MockFunctionOptions): Mock<F>;
|
||||
fn<F extends Function = NoOpFunction, Implementation extends Function = F>(original?: F, implementation?: Implementation, options?: MockFunctionOptions): Mock<F | Implementation>;
|
||||
|
||||
/**
|
||||
* This function is used to create a mock on an existing object method.
|
||||
* @param object The object whose method is being mocked.
|
||||
* @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown.
|
||||
* @param implementation An optional function used as the mock implementation for `object[methodName]`.
|
||||
* @param options Optional configuration options for the mock method.
|
||||
*/
|
||||
method<
|
||||
MockedObject extends object,
|
||||
MethodName extends FunctionPropertyNames<MockedObject>,
|
||||
>(
|
||||
object: MockedObject,
|
||||
methodName: MethodName,
|
||||
options?: MockFunctionOptions,
|
||||
): MockedObject[MethodName] extends Function
|
||||
? Mock<MockedObject[MethodName]>
|
||||
: never;
|
||||
method<
|
||||
MockedObject extends object,
|
||||
MethodName extends FunctionPropertyNames<MockedObject>,
|
||||
Implementation extends Function,
|
||||
>(
|
||||
object: MockedObject,
|
||||
methodName: MethodName,
|
||||
implementation: Implementation,
|
||||
options?: MockFunctionOptions,
|
||||
): MockedObject[MethodName] extends Function
|
||||
? Mock<MockedObject[MethodName] | Implementation>
|
||||
: never;
|
||||
method<MockedObject extends object>(
|
||||
object: MockedObject,
|
||||
methodName: keyof MockedObject,
|
||||
options: MockMethodOptions,
|
||||
): Mock<Function>;
|
||||
method<MockedObject extends object>(
|
||||
object: MockedObject,
|
||||
methodName: keyof MockedObject,
|
||||
implementation: Function,
|
||||
options: MockMethodOptions,
|
||||
): Mock<Function>;
|
||||
|
||||
/**
|
||||
* This function is syntax sugar for {@link MockTracker.method} with `options.getter` set to `true`.
|
||||
*/
|
||||
getter<
|
||||
MockedObject extends object,
|
||||
MethodName extends keyof MockedObject,
|
||||
>(
|
||||
object: MockedObject,
|
||||
methodName: MethodName,
|
||||
options?: MockFunctionOptions,
|
||||
): Mock<() => MockedObject[MethodName]>;
|
||||
getter<
|
||||
MockedObject extends object,
|
||||
MethodName extends keyof MockedObject,
|
||||
Implementation extends Function,
|
||||
>(
|
||||
object: MockedObject,
|
||||
methodName: MethodName,
|
||||
implementation?: Implementation,
|
||||
options?: MockFunctionOptions,
|
||||
): Mock<(() => MockedObject[MethodName]) | Implementation>;
|
||||
|
||||
/**
|
||||
* This function is syntax sugar for {@link MockTracker.method} with `options.setter` set to `true`.
|
||||
*/
|
||||
setter<
|
||||
MockedObject extends object,
|
||||
MethodName extends keyof MockedObject,
|
||||
>(
|
||||
object: MockedObject,
|
||||
methodName: MethodName,
|
||||
options?: MockFunctionOptions,
|
||||
): Mock<(value: MockedObject[MethodName]) => void>;
|
||||
setter<
|
||||
MockedObject extends object,
|
||||
MethodName extends keyof MockedObject,
|
||||
Implementation extends Function,
|
||||
>(
|
||||
object: MockedObject,
|
||||
methodName: MethodName,
|
||||
implementation?: Implementation,
|
||||
options?: MockFunctionOptions,
|
||||
): Mock<((value: MockedObject[MethodName]) => void) | Implementation>;
|
||||
|
||||
/**
|
||||
* This function restores the default behavior of all mocks that were previously created by this `MockTracker`
|
||||
* and disassociates the mocks from the `MockTracker` instance. Once disassociated, the mocks can still be used,
|
||||
* but the `MockTracker` instance can no longer be used to reset their behavior or otherwise interact with them.
|
||||
*
|
||||
* After each test completes, this function is called on the test context's `MockTracker`.
|
||||
* If the global `MockTracker` is used extensively, calling this function manually is recommended.
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
/**
|
||||
* This function restores the default behavior of all mocks that were previously created by this `MockTracker`.
|
||||
* Unlike `mock.reset()`, `mock.restoreAll()` does not disassociate the mocks from the `MockTracker` instance.
|
||||
*/
|
||||
restoreAll(): void;
|
||||
}
|
||||
|
||||
const mock: MockTracker;
|
||||
|
||||
interface MockFunctionCall<
|
||||
F extends Function,
|
||||
ReturnType = F extends (...args: any) => infer T
|
||||
? T
|
||||
: F extends abstract new (...args: any) => infer T
|
||||
? T
|
||||
: unknown,
|
||||
Args = F extends (...args: infer Y) => any
|
||||
? Y
|
||||
: F extends abstract new (...args: infer Y) => any
|
||||
? Y
|
||||
: unknown[],
|
||||
> {
|
||||
/**
|
||||
* An array of the arguments passed to the mock function.
|
||||
*/
|
||||
arguments: Args;
|
||||
/**
|
||||
* If the mocked function threw then this property contains the thrown value.
|
||||
*/
|
||||
error: unknown | undefined;
|
||||
/**
|
||||
* The value returned by the mocked function.
|
||||
*
|
||||
* If the mocked function threw, it will be `undefined`.
|
||||
*/
|
||||
result: ReturnType | undefined;
|
||||
/**
|
||||
* An `Error` object whose stack can be used to determine the callsite of the mocked function invocation.
|
||||
*/
|
||||
stack: Error;
|
||||
/**
|
||||
* If the mocked function is a constructor, this field contains the class being constructed.
|
||||
* Otherwise this will be `undefined`.
|
||||
*/
|
||||
target: F extends abstract new (...args: any) => any ? F : undefined;
|
||||
/**
|
||||
* The mocked function's `this` value.
|
||||
*/
|
||||
this: unknown;
|
||||
}
|
||||
|
||||
interface MockFunctionContext<F extends Function> {
|
||||
/**
|
||||
* A getter that returns a copy of the internal array used to track calls to the mock.
|
||||
*/
|
||||
readonly calls: Array<MockFunctionCall<F>>;
|
||||
|
||||
/**
|
||||
* This function returns the number of times that this mock has been invoked.
|
||||
* This function is more efficient than checking `ctx.calls.length`
|
||||
* because `ctx.calls` is a getter that creates a copy of the internal call tracking array.
|
||||
*/
|
||||
callCount(): number;
|
||||
|
||||
/**
|
||||
* This function is used to change the behavior of an existing mock.
|
||||
* @param implementation The function to be used as the mock's new implementation.
|
||||
*/
|
||||
mockImplementation(implementation: Function): void;
|
||||
|
||||
/**
|
||||
* This function is used to change the behavior of an existing mock for a single invocation.
|
||||
* Once invocation `onCall` has occurred, the mock will revert to whatever behavior
|
||||
* it would have used had `mockImplementationOnce()` not been called.
|
||||
* @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`.
|
||||
* @param onCall The invocation number that will use `implementation`.
|
||||
* If the specified invocation has already occurred then an exception is thrown.
|
||||
*/
|
||||
mockImplementationOnce(implementation: Function, onCall?: number): void;
|
||||
|
||||
/**
|
||||
* Resets the call history of the mock function.
|
||||
*/
|
||||
resetCalls(): void;
|
||||
|
||||
/**
|
||||
* Resets the implementation of the mock function to its original behavior.
|
||||
* The mock can still be used after calling this function.
|
||||
*/
|
||||
restore(): void;
|
||||
}
|
||||
|
||||
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock };
|
||||
}
|
||||
|
|
7
node_modules/@types/node/timers.d.ts
generated
vendored
7
node_modules/@types/node/timers.d.ts
generated
vendored
|
@ -62,6 +62,13 @@ declare module 'timers' {
|
|||
[Symbol.toPrimitive](): number;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Schedules execution of a one-time `callback` after `delay` milliseconds. The `callback` will likely not be invoked in precisely `delay` milliseconds.
|
||||
* Node.js makes no guarantees about the exact timing of when callbacks will fire, nor of their ordering. The callback will be called as close as possible to the time specified.
|
||||
* When `delay` is larger than `2147483647` or less than `1`, the `delay` will be set to `1`. Non-integer delays are truncated to an integer.
|
||||
* If `callback` is not a function, a [TypeError](https://nodejs.org/api/errors.html#class-typeerror) will be thrown.
|
||||
* @since v0.0.1
|
||||
*/
|
||||
function setTimeout<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timeout;
|
||||
// util.promisify no rest args compability
|
||||
// tslint:disable-next-line void-return
|
||||
|
|
103
node_modules/@types/node/tls.d.ts
generated
vendored
103
node_modules/@types/node/tls.d.ts
generated
vendored
|
@ -41,21 +41,100 @@ declare module 'tls' {
|
|||
CN: string;
|
||||
}
|
||||
interface PeerCertificate {
|
||||
subject: Certificate;
|
||||
issuer: Certificate;
|
||||
subjectaltname: string;
|
||||
infoAccess: NodeJS.Dict<string[]>;
|
||||
modulus: string;
|
||||
exponent: string;
|
||||
valid_from: string;
|
||||
valid_to: string;
|
||||
fingerprint: string;
|
||||
fingerprint256: string;
|
||||
ext_key_usage: string[];
|
||||
serialNumber: string;
|
||||
/**
|
||||
* `true` if a Certificate Authority (CA), `false` otherwise.
|
||||
* @since v18.13.0
|
||||
*/
|
||||
ca: boolean;
|
||||
/**
|
||||
* The DER encoded X.509 certificate data.
|
||||
*/
|
||||
raw: Buffer;
|
||||
/**
|
||||
* The certificate subject.
|
||||
*/
|
||||
subject: Certificate;
|
||||
/**
|
||||
* The certificate issuer, described in the same terms as the `subject`.
|
||||
*/
|
||||
issuer: Certificate;
|
||||
/**
|
||||
* The date-time the certificate is valid from.
|
||||
*/
|
||||
valid_from: string;
|
||||
/**
|
||||
* The date-time the certificate is valid to.
|
||||
*/
|
||||
valid_to: string;
|
||||
/**
|
||||
* The certificate serial number, as a hex string.
|
||||
*/
|
||||
serialNumber: string;
|
||||
/**
|
||||
* The SHA-1 digest of the DER encoded certificate.
|
||||
* It is returned as a `:` separated hexadecimal string.
|
||||
*/
|
||||
fingerprint: string;
|
||||
/**
|
||||
* The SHA-256 digest of the DER encoded certificate.
|
||||
* It is returned as a `:` separated hexadecimal string.
|
||||
*/
|
||||
fingerprint256: string;
|
||||
/**
|
||||
* The SHA-512 digest of the DER encoded certificate.
|
||||
* It is returned as a `:` separated hexadecimal string.
|
||||
*/
|
||||
fingerprint512: string;
|
||||
/**
|
||||
* The extended key usage, a set of OIDs.
|
||||
*/
|
||||
ext_key_usage?: string[];
|
||||
/**
|
||||
* A string containing concatenated names for the subject,
|
||||
* an alternative to the `subject` names.
|
||||
*/
|
||||
subjectaltname?: string;
|
||||
/**
|
||||
* An array describing the AuthorityInfoAccess, used with OCSP.
|
||||
*/
|
||||
infoAccess?: NodeJS.Dict<string[]>;
|
||||
/**
|
||||
* For RSA keys: The RSA bit size.
|
||||
*
|
||||
* For EC keys: The key size in bits.
|
||||
*/
|
||||
bits?: number;
|
||||
/**
|
||||
* The RSA exponent, as a string in hexadecimal number notation.
|
||||
*/
|
||||
exponent?: string;
|
||||
/**
|
||||
* The RSA modulus, as a hexadecimal string.
|
||||
*/
|
||||
modulus?: string;
|
||||
/**
|
||||
* The public key.
|
||||
*/
|
||||
pubkey?: Buffer;
|
||||
/**
|
||||
* The ASN.1 name of the OID of the elliptic curve.
|
||||
* Well-known curves are identified by an OID.
|
||||
* While it is unusual, it is possible that the curve
|
||||
* is identified by its mathematical properties,
|
||||
* in which case it will not have an OID.
|
||||
*/
|
||||
asn1Curve?: string;
|
||||
/**
|
||||
* The NIST name for the elliptic curve,if it has one
|
||||
* (not all well-known curves have been assigned names by NIST).
|
||||
*/
|
||||
nistCurve?: string;
|
||||
}
|
||||
interface DetailedPeerCertificate extends PeerCertificate {
|
||||
/**
|
||||
* The issuer certificate object.
|
||||
* For self-signed certificates, this may be a circular reference.
|
||||
*/
|
||||
issuerCertificate: DetailedPeerCertificate;
|
||||
}
|
||||
interface CipherNameAndProtocol {
|
||||
|
|
12
node_modules/@types/node/ts4.8/async_hooks.d.ts
generated
vendored
12
node_modules/@types/node/ts4.8/async_hooks.d.ts
generated
vendored
|
@ -319,6 +319,16 @@ declare module 'async_hooks' {
|
|||
*/
|
||||
triggerAsyncId(): number;
|
||||
}
|
||||
interface AsyncLocalStorageOptions<T> {
|
||||
/**
|
||||
* Optional callback invoked before a store is propagated to a new async resource.
|
||||
* Returning `true` allows propagation, returning `false` avoids it. Default is to propagate always.
|
||||
* @param type The type of async event.
|
||||
* @param store The current store.
|
||||
* @since v18.13.0
|
||||
*/
|
||||
onPropagate?: ((type: string, store: T) => boolean) | undefined;
|
||||
}
|
||||
/**
|
||||
* This class creates stores that stay coherent through asynchronous operations.
|
||||
*
|
||||
|
@ -368,6 +378,8 @@ declare module 'async_hooks' {
|
|||
* @since v13.10.0, v12.17.0
|
||||
*/
|
||||
class AsyncLocalStorage<T> {
|
||||
constructor(options?: AsyncLocalStorageOptions<T>);
|
||||
|
||||
/**
|
||||
* Disables the instance of `AsyncLocalStorage`. All subsequent calls
|
||||
* to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
|
||||
|
|
68
node_modules/@types/node/ts4.8/buffer.d.ts
generated
vendored
68
node_modules/@types/node/ts4.8/buffer.d.ts
generated
vendored
|
@ -46,6 +46,8 @@
|
|||
declare module 'buffer' {
|
||||
import { BinaryLike } from 'node:crypto';
|
||||
import { ReadableStream as WebReadableStream } from 'node:stream/web';
|
||||
export function isUtf8(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
|
||||
export function isAscii(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
|
||||
export const INSPECT_MAX_BYTES: number;
|
||||
export const kMaxLength: number;
|
||||
export const kStringMaxLength: number;
|
||||
|
@ -163,18 +165,57 @@ declare module 'buffer' {
|
|||
*/
|
||||
stream(): WebReadableStream;
|
||||
}
|
||||
export interface FileOptions {
|
||||
/**
|
||||
* One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be
|
||||
* converted to the platform native line-ending as specified by `require('node:os').EOL`.
|
||||
*/
|
||||
endings?: 'native' | 'transparent';
|
||||
/** The File content-type. */
|
||||
type?: string;
|
||||
/** The last modified date of the file. `Default`: Date.now(). */
|
||||
lastModified?: number;
|
||||
}
|
||||
/**
|
||||
* A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
|
||||
* @experimental
|
||||
* @since v18.13.0
|
||||
*/
|
||||
export class File extends Blob {
|
||||
constructor(sources: Array<BinaryLike | Blob>, fileName: string, options?: FileOptions);
|
||||
/**
|
||||
* The name of the `File`.
|
||||
* @since v18.13.0
|
||||
*/
|
||||
readonly name: string;
|
||||
/**
|
||||
* The last modified date of the `File`.
|
||||
* @since v18.13.0
|
||||
*/
|
||||
readonly lastModified: number;
|
||||
}
|
||||
export import atob = globalThis.atob;
|
||||
export import btoa = globalThis.btoa;
|
||||
|
||||
import { Blob as NodeBlob } from 'buffer';
|
||||
// This conditional type will be the existing global Blob in a browser, or
|
||||
// the copy below in a Node environment.
|
||||
type __Blob = typeof globalThis extends { onmessage: any, Blob: any }
|
||||
? {} : NodeBlob;
|
||||
type __Blob = typeof globalThis extends { onmessage: any; Blob: any } ? {} : NodeBlob;
|
||||
|
||||
global {
|
||||
// Buffer class
|
||||
type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
|
||||
type BufferEncoding =
|
||||
| 'ascii'
|
||||
| 'utf8'
|
||||
| 'utf-8'
|
||||
| 'utf16le'
|
||||
| 'ucs2'
|
||||
| 'ucs-2'
|
||||
| 'base64'
|
||||
| 'base64url'
|
||||
| 'latin1'
|
||||
| 'binary'
|
||||
| 'hex';
|
||||
type WithImplicitCoercion<T> =
|
||||
| T
|
||||
| {
|
||||
|
@ -248,7 +289,11 @@ declare module 'buffer' {
|
|||
* `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does.
|
||||
* @since v5.10.0
|
||||
*/
|
||||
from(arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>, byteOffset?: number, length?: number): Buffer;
|
||||
from(
|
||||
arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>,
|
||||
byteOffset?: number,
|
||||
length?: number,
|
||||
): Buffer;
|
||||
/**
|
||||
* Creates a new Buffer using the passed {data}
|
||||
* @param data data to create a new Buffer
|
||||
|
@ -266,7 +311,7 @@ declare module 'buffer' {
|
|||
| {
|
||||
[Symbol.toPrimitive](hint: 'string'): string;
|
||||
},
|
||||
encoding?: BufferEncoding
|
||||
encoding?: BufferEncoding,
|
||||
): Buffer;
|
||||
/**
|
||||
* Creates a new Buffer using the passed {data}
|
||||
|
@ -340,7 +385,10 @@ declare module 'buffer' {
|
|||
* @param [encoding='utf8'] If `string` is a string, this is its encoding.
|
||||
* @return The number of bytes contained within `string`.
|
||||
*/
|
||||
byteLength(string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer, encoding?: BufferEncoding): number;
|
||||
byteLength(
|
||||
string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
|
||||
encoding?: BufferEncoding,
|
||||
): number;
|
||||
/**
|
||||
* Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together.
|
||||
*
|
||||
|
@ -711,7 +759,13 @@ declare module 'buffer' {
|
|||
* @param [sourceStart=0] The offset within `buf` at which to begin comparison.
|
||||
* @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
|
||||
*/
|
||||
compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): -1 | 0 | 1;
|
||||
compare(
|
||||
target: Uint8Array,
|
||||
targetStart?: number,
|
||||
targetEnd?: number,
|
||||
sourceStart?: number,
|
||||
sourceEnd?: number,
|
||||
): -1 | 0 | 1;
|
||||
/**
|
||||
* Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
|
||||
*
|
||||
|
|
16
node_modules/@types/node/ts4.8/crypto.d.ts
generated
vendored
16
node_modules/@types/node/ts4.8/crypto.d.ts
generated
vendored
|
@ -1190,11 +1190,13 @@ declare module 'crypto' {
|
|||
format?: KeyFormat | undefined;
|
||||
type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
|
||||
passphrase?: string | Buffer | undefined;
|
||||
encoding?: string | undefined;
|
||||
}
|
||||
interface PublicKeyInput {
|
||||
key: string | Buffer;
|
||||
format?: KeyFormat | undefined;
|
||||
type?: 'pkcs1' | 'spki' | undefined;
|
||||
encoding?: string | undefined;
|
||||
}
|
||||
/**
|
||||
* Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
|
||||
|
@ -1305,6 +1307,7 @@ declare module 'crypto' {
|
|||
interface VerifyKeyObjectInput extends SigningOptions {
|
||||
key: KeyObject;
|
||||
}
|
||||
interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {}
|
||||
type KeyLike = string | Buffer | KeyObject;
|
||||
/**
|
||||
* The `Sign` class is a utility for generating signatures. It can be used in one
|
||||
|
@ -1459,8 +1462,8 @@ declare module 'crypto' {
|
|||
* be passed instead of a public key.
|
||||
* @since v0.1.92
|
||||
*/
|
||||
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
|
||||
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean;
|
||||
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, signature: NodeJS.ArrayBufferView): boolean;
|
||||
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean;
|
||||
}
|
||||
/**
|
||||
* Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
|
||||
|
@ -2968,11 +2971,16 @@ declare module 'crypto' {
|
|||
* If the `callback` function is provided this function uses libuv's threadpool.
|
||||
* @since v12.0.0
|
||||
*/
|
||||
function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
|
||||
function verify(
|
||||
algorithm: string | null | undefined,
|
||||
data: NodeJS.ArrayBufferView,
|
||||
key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
|
||||
key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
|
||||
signature: NodeJS.ArrayBufferView
|
||||
): boolean;
|
||||
function verify(
|
||||
algorithm: string | null | undefined,
|
||||
data: NodeJS.ArrayBufferView,
|
||||
key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
|
||||
signature: NodeJS.ArrayBufferView,
|
||||
callback: (error: Error | null, result: boolean) => void
|
||||
): void;
|
||||
|
|
41
node_modules/@types/node/ts4.8/diagnostics_channel.d.ts
generated
vendored
41
node_modules/@types/node/ts4.8/diagnostics_channel.d.ts
generated
vendored
|
@ -20,7 +20,7 @@
|
|||
* should generally include the module name to avoid collisions with data from
|
||||
* other modules.
|
||||
* @experimental
|
||||
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/diagnostics_channel.js)
|
||||
* @see [source](https://github.com/nodejs/node/blob/v18.7.0/lib/diagnostics_channel.js)
|
||||
*/
|
||||
declare module 'diagnostics_channel' {
|
||||
/**
|
||||
|
@ -58,6 +58,45 @@ declare module 'diagnostics_channel' {
|
|||
*/
|
||||
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 '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 diagnostics_channel.subscribe(name, onMessage).
|
||||
*
|
||||
* ```js
|
||||
* import diagnostics_channel from '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
|
||||
* @returns `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 use to track subscribers and to publish messages when there
|
||||
|
|
2
node_modules/@types/node/ts4.8/dns.d.ts
generated
vendored
2
node_modules/@types/node/ts4.8/dns.d.ts
generated
vendored
|
@ -174,7 +174,7 @@ declare module 'dns' {
|
|||
type: 'AAAA';
|
||||
}
|
||||
export interface CaaRecord {
|
||||
critial: number;
|
||||
critical: number;
|
||||
issue?: string | undefined;
|
||||
issuewild?: string | undefined;
|
||||
iodef?: string | undefined;
|
||||
|
|
2
node_modules/@types/node/ts4.8/globals.d.ts
generated
vendored
2
node_modules/@types/node/ts4.8/globals.d.ts
generated
vendored
|
@ -53,7 +53,7 @@ interface AbortController {
|
|||
/**
|
||||
* 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(): void;
|
||||
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. */
|
||||
|
|
1
node_modules/@types/node/ts4.8/http2.d.ts
generated
vendored
1
node_modules/@types/node/ts4.8/http2.d.ts
generated
vendored
|
@ -1053,7 +1053,6 @@ declare module 'http2' {
|
|||
*/
|
||||
unknownProtocolTimeout?: number | undefined;
|
||||
selectPadding?(frameLen: number, maxFrameLen: number): number;
|
||||
createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex;
|
||||
}
|
||||
export interface ClientSessionOptions extends SessionOptions {
|
||||
maxReservedRemoteStreams?: number | undefined;
|
||||
|
|
1
node_modules/@types/node/ts4.8/module.d.ts
generated
vendored
1
node_modules/@types/node/ts4.8/module.d.ts
generated
vendored
|
@ -85,6 +85,7 @@ declare module 'module' {
|
|||
static wrap(code: string): string;
|
||||
static createRequire(path: string | URL): NodeRequire;
|
||||
static builtinModules: string[];
|
||||
static isBuiltin(moduleName: string): boolean;
|
||||
static Module: typeof Module;
|
||||
constructor(id: string, parent?: Module);
|
||||
}
|
||||
|
|
16
node_modules/@types/node/ts4.8/net.d.ts
generated
vendored
16
node_modules/@types/node/ts4.8/net.d.ts
generated
vendored
|
@ -57,6 +57,14 @@ declare module 'net' {
|
|||
noDelay?: boolean | undefined;
|
||||
keepAlive?: boolean | undefined;
|
||||
keepAliveInitialDelay?: number | undefined;
|
||||
/**
|
||||
* @since v18.13.0
|
||||
*/
|
||||
autoSelectFamily?: boolean | undefined;
|
||||
/**
|
||||
* @since v18.13.0
|
||||
*/
|
||||
autoSelectFamilyAttemptTimeout?: number | undefined;
|
||||
}
|
||||
interface IpcSocketConnectOpts extends ConnectOpts {
|
||||
path: string;
|
||||
|
@ -281,7 +289,13 @@ declare module 'net' {
|
|||
* The string representation of the local IP family. `'IPv4'` or `'IPv6'`.
|
||||
* @since v18.8.0
|
||||
*/
|
||||
readonly localFamily?: string;
|
||||
readonly localFamily?: string;
|
||||
/**
|
||||
* This is `true` if the socket is not connected yet, either because `.connect()`
|
||||
* has not yet been called or because it is still in the process of connecting (see `socket.connecting`).
|
||||
* @since v10.16.0
|
||||
*/
|
||||
readonly pending: boolean;
|
||||
/**
|
||||
* This property represents the state of the connection as a string.
|
||||
* @see {https://nodejs.org/api/net.html#socketreadystate}
|
||||
|
|
7
node_modules/@types/node/ts4.8/os.d.ts
generated
vendored
7
node_modules/@types/node/ts4.8/os.d.ts
generated
vendored
|
@ -132,6 +132,13 @@ declare module 'os' {
|
|||
* @since v0.3.3
|
||||
*/
|
||||
function cpus(): CpuInfo[];
|
||||
/**
|
||||
* Returns an estimate of the default amount of parallelism a program should use. Always returns a value greater than zero.
|
||||
*
|
||||
* This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism).
|
||||
* @since 18.4.0
|
||||
*/
|
||||
function availableParallelism(): number;
|
||||
/**
|
||||
* Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it
|
||||
* returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
|
||||
|
|
6
node_modules/@types/node/ts4.8/process.d.ts
generated
vendored
6
node_modules/@types/node/ts4.8/process.d.ts
generated
vendored
|
@ -1089,6 +1089,12 @@ declare module 'process' {
|
|||
*/
|
||||
mainModule?: Module | undefined;
|
||||
memoryUsage: MemoryUsageFn;
|
||||
/**
|
||||
* Gets the amount of memory available to the process (in bytes) based on
|
||||
* limits imposed by the OS. If there is no such constraint, or the constraint
|
||||
* is unknown, `undefined` is returned.
|
||||
*/
|
||||
constrainedMemory(): number | undefined;
|
||||
/**
|
||||
* The `process.cpuUsage()` method returns the user and system CPU time usage of
|
||||
* the current process, in an object with properties `user` and `system`, whose
|
||||
|
|
99
node_modules/@types/node/ts4.8/stream.d.ts
generated
vendored
99
node_modules/@types/node/ts4.8/stream.d.ts
generated
vendored
|
@ -912,6 +912,105 @@ declare module 'stream' {
|
|||
end(chunk: any, encoding?: BufferEncoding, cb?: () => void): this;
|
||||
cork(): void;
|
||||
uncork(): void;
|
||||
/**
|
||||
* Event emitter
|
||||
* The defined events on documents including:
|
||||
* 1. close
|
||||
* 2. data
|
||||
* 3. drain
|
||||
* 4. end
|
||||
* 5. error
|
||||
* 6. finish
|
||||
* 7. pause
|
||||
* 8. pipe
|
||||
* 9. readable
|
||||
* 10. resume
|
||||
* 11. unpipe
|
||||
*/
|
||||
addListener(event: 'close', listener: () => void): this;
|
||||
addListener(event: 'data', listener: (chunk: any) => void): this;
|
||||
addListener(event: 'drain', listener: () => void): this;
|
||||
addListener(event: 'end', listener: () => void): this;
|
||||
addListener(event: 'error', listener: (err: Error) => void): this;
|
||||
addListener(event: 'finish', listener: () => void): this;
|
||||
addListener(event: 'pause', listener: () => void): this;
|
||||
addListener(event: 'pipe', listener: (src: Readable) => void): this;
|
||||
addListener(event: 'readable', listener: () => void): this;
|
||||
addListener(event: 'resume', listener: () => void): this;
|
||||
addListener(event: 'unpipe', listener: (src: Readable) => void): this;
|
||||
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit(event: 'close'): boolean;
|
||||
emit(event: 'data', chunk: any): boolean;
|
||||
emit(event: 'drain'): boolean;
|
||||
emit(event: 'end'): boolean;
|
||||
emit(event: 'error', err: Error): boolean;
|
||||
emit(event: 'finish'): boolean;
|
||||
emit(event: 'pause'): boolean;
|
||||
emit(event: 'pipe', src: Readable): boolean;
|
||||
emit(event: 'readable'): boolean;
|
||||
emit(event: 'resume'): boolean;
|
||||
emit(event: 'unpipe', src: Readable): boolean;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
on(event: 'close', listener: () => void): this;
|
||||
on(event: 'data', listener: (chunk: any) => void): this;
|
||||
on(event: 'drain', listener: () => void): this;
|
||||
on(event: 'end', listener: () => void): this;
|
||||
on(event: 'error', listener: (err: Error) => void): this;
|
||||
on(event: 'finish', listener: () => void): this;
|
||||
on(event: 'pause', listener: () => void): this;
|
||||
on(event: 'pipe', listener: (src: Readable) => void): this;
|
||||
on(event: 'readable', listener: () => void): this;
|
||||
on(event: 'resume', listener: () => void): this;
|
||||
on(event: 'unpipe', listener: (src: Readable) => void): this;
|
||||
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once(event: 'close', listener: () => void): this;
|
||||
once(event: 'data', listener: (chunk: any) => void): this;
|
||||
once(event: 'drain', listener: () => void): this;
|
||||
once(event: 'end', listener: () => void): this;
|
||||
once(event: 'error', listener: (err: Error) => void): this;
|
||||
once(event: 'finish', listener: () => void): this;
|
||||
once(event: 'pause', listener: () => void): this;
|
||||
once(event: 'pipe', listener: (src: Readable) => void): this;
|
||||
once(event: 'readable', listener: () => void): this;
|
||||
once(event: 'resume', listener: () => void): this;
|
||||
once(event: 'unpipe', listener: (src: Readable) => void): this;
|
||||
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: 'close', listener: () => void): this;
|
||||
prependListener(event: 'data', listener: (chunk: any) => void): this;
|
||||
prependListener(event: 'drain', listener: () => void): this;
|
||||
prependListener(event: 'end', listener: () => void): this;
|
||||
prependListener(event: 'error', listener: (err: Error) => void): this;
|
||||
prependListener(event: 'finish', listener: () => void): this;
|
||||
prependListener(event: 'pause', listener: () => void): this;
|
||||
prependListener(event: 'pipe', listener: (src: Readable) => void): this;
|
||||
prependListener(event: 'readable', listener: () => void): this;
|
||||
prependListener(event: 'resume', listener: () => void): this;
|
||||
prependListener(event: 'unpipe', listener: (src: Readable) => void): this;
|
||||
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: 'close', listener: () => void): this;
|
||||
prependOnceListener(event: 'data', listener: (chunk: any) => void): this;
|
||||
prependOnceListener(event: 'drain', listener: () => void): this;
|
||||
prependOnceListener(event: 'end', listener: () => void): this;
|
||||
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
|
||||
prependOnceListener(event: 'finish', listener: () => void): this;
|
||||
prependOnceListener(event: 'pause', listener: () => void): this;
|
||||
prependOnceListener(event: 'pipe', listener: (src: Readable) => void): this;
|
||||
prependOnceListener(event: 'readable', listener: () => void): this;
|
||||
prependOnceListener(event: 'resume', listener: () => void): this;
|
||||
prependOnceListener(event: 'unpipe', listener: (src: Readable) => void): this;
|
||||
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
removeListener(event: 'close', listener: () => void): this;
|
||||
removeListener(event: 'data', listener: (chunk: any) => void): this;
|
||||
removeListener(event: 'drain', listener: () => void): this;
|
||||
removeListener(event: 'end', listener: () => void): this;
|
||||
removeListener(event: 'error', listener: (err: Error) => void): this;
|
||||
removeListener(event: 'finish', listener: () => void): this;
|
||||
removeListener(event: 'pause', listener: () => void): this;
|
||||
removeListener(event: 'pipe', listener: (src: Readable) => void): this;
|
||||
removeListener(event: 'readable', listener: () => void): this;
|
||||
removeListener(event: 'resume', listener: () => void): this;
|
||||
removeListener(event: 'unpipe', listener: (src: Readable) => void): this;
|
||||
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
}
|
||||
type TransformCallback = (error?: Error | null, data?: any) => void;
|
||||
interface TransformOptions extends DuplexOptions {
|
||||
|
|
380
node_modules/@types/node/ts4.8/test.d.ts
generated
vendored
380
node_modules/@types/node/ts4.8/test.d.ts
generated
vendored
|
@ -7,16 +7,16 @@ declare module 'node:test' {
|
|||
* Programmatically start the test runner.
|
||||
* @since v18.9.0
|
||||
* @param options Configuration options for running tests.
|
||||
* @returns A {@link TapStream} that emits events about the test execution.
|
||||
* @returns A {@link TestsStream} that emits events about the test execution.
|
||||
*/
|
||||
function run(options?: RunOptions): TapStream;
|
||||
function run(options?: RunOptions): TestsStream;
|
||||
|
||||
/**
|
||||
* The `test()` function is the value imported from the test module. Each invocation of this
|
||||
* function results in the creation of a test point in the TAP output.
|
||||
* function results in reporting the test to the {@link TestsStream}.
|
||||
*
|
||||
* The {@link TestContext} object passed to the fn argument can be used to perform actions
|
||||
* related to the current test. Examples include skipping the test, adding additional TAP
|
||||
* related to the current test. Examples include skipping the test, adding additional
|
||||
* diagnostic information, or creating subtests.
|
||||
*
|
||||
* `test()` returns a {@link Promise} that resolves once the test completes. The return value
|
||||
|
@ -158,54 +158,88 @@ declare module 'node:test' {
|
|||
}
|
||||
|
||||
/**
|
||||
* A successful call of the `run()` method will return a new `TapStream` object,
|
||||
* streaming a [TAP](https://testanything.org/) output.
|
||||
* `TapStream` will emit events in the order of the tests' definitions.
|
||||
* A successful call of the `run()` method will return a new `TestsStream` object,
|
||||
* streaming a series of events representing the execution of the tests.
|
||||
* `TestsStream` will emit events in the order of the tests' definitions.
|
||||
* @since v18.9.0
|
||||
*/
|
||||
interface TapStream extends NodeJS.ReadableStream {
|
||||
addListener(event: 'test:diagnostic', listener: (message: string) => void): this;
|
||||
interface TestsStream extends NodeJS.ReadableStream {
|
||||
addListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
|
||||
addListener(event: 'test:fail', listener: (data: TestFail) => void): this;
|
||||
addListener(event: 'test:pass', listener: (data: TestPass) => void): this;
|
||||
addListener(event: 'test:plan', listener: (data: TestPlan) => void): this;
|
||||
addListener(event: 'test:start', listener: (data: TestStart) => void): this;
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
emit(event: 'test:diagnostic', message: string): boolean;
|
||||
emit(event: 'test:diagnostic', data: DiagnosticData): boolean;
|
||||
emit(event: 'test:fail', data: TestFail): boolean;
|
||||
emit(event: 'test:pass', data: TestPass): boolean;
|
||||
emit(event: 'test:plan', data: TestPlan): boolean;
|
||||
emit(event: 'test:start', data: TestStart): boolean;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
on(event: 'test:diagnostic', listener: (message: string) => void): this;
|
||||
on(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
|
||||
on(event: 'test:fail', listener: (data: TestFail) => void): this;
|
||||
on(event: 'test:pass', listener: (data: TestPass) => void): this;
|
||||
on(event: 'test:plan', listener: (data: TestPlan) => void): this;
|
||||
on(event: 'test:start', listener: (data: TestStart) => void): this;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: 'test:diagnostic', listener: (message: string) => void): this;
|
||||
once(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
|
||||
once(event: 'test:fail', listener: (data: TestFail) => void): this;
|
||||
once(event: 'test:pass', listener: (data: TestPass) => void): this;
|
||||
once(event: 'test:plan', listener: (data: TestPlan) => void): this;
|
||||
once(event: 'test:start', listener: (data: TestStart) => void): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: 'test:diagnostic', listener: (message: string) => void): this;
|
||||
prependListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
|
||||
prependListener(event: 'test:fail', listener: (data: TestFail) => void): this;
|
||||
prependListener(event: 'test:pass', listener: (data: TestPass) => void): this;
|
||||
prependListener(event: 'test:plan', listener: (data: TestPlan) => void): this;
|
||||
prependListener(event: 'test:start', listener: (data: TestStart) => void): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: 'test:diagnostic', listener: (message: string) => void): this;
|
||||
prependOnceListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
|
||||
prependOnceListener(event: 'test:fail', listener: (data: TestFail) => void): this;
|
||||
prependOnceListener(event: 'test:pass', listener: (data: TestPass) => void): this;
|
||||
prependOnceListener(event: 'test:plan', listener: (data: TestPlan) => void): this;
|
||||
prependOnceListener(event: 'test:start', listener: (data: TestStart) => void): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
}
|
||||
|
||||
interface DiagnosticData {
|
||||
/**
|
||||
* The diagnostic message.
|
||||
*/
|
||||
message: string;
|
||||
|
||||
/**
|
||||
* The nesting level of the test.
|
||||
*/
|
||||
nesting: number;
|
||||
}
|
||||
|
||||
interface TestFail {
|
||||
/**
|
||||
* The test duration.
|
||||
* Additional execution metadata.
|
||||
*/
|
||||
duration: number;
|
||||
details: {
|
||||
/**
|
||||
* The duration of the test in milliseconds.
|
||||
*/
|
||||
duration: number;
|
||||
|
||||
/**
|
||||
* The failure casing test to fail.
|
||||
*/
|
||||
error: Error;
|
||||
/**
|
||||
* The error thrown by the test.
|
||||
*/
|
||||
error: Error;
|
||||
};
|
||||
|
||||
/**
|
||||
* The test name.
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* The nesting level of the test.
|
||||
*/
|
||||
nesting: number;
|
||||
|
||||
/**
|
||||
* The ordinal number of the test.
|
||||
*/
|
||||
|
@ -214,25 +248,35 @@ declare module 'node:test' {
|
|||
/**
|
||||
* Present if `context.todo` is called.
|
||||
*/
|
||||
todo?: string;
|
||||
todo?: string | boolean;
|
||||
|
||||
/**
|
||||
* Present if `context.skip` is called.
|
||||
*/
|
||||
skip?: string;
|
||||
skip?: string | boolean;
|
||||
}
|
||||
|
||||
interface TestPass {
|
||||
/**
|
||||
* The test duration.
|
||||
* Additional execution metadata.
|
||||
*/
|
||||
duration: number;
|
||||
details: {
|
||||
/**
|
||||
* The duration of the test in milliseconds.
|
||||
*/
|
||||
duration: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* The test name.
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* The nesting level of the test.
|
||||
*/
|
||||
nesting: number;
|
||||
|
||||
/**
|
||||
* The ordinal number of the test.
|
||||
*/
|
||||
|
@ -241,12 +285,36 @@ declare module 'node:test' {
|
|||
/**
|
||||
* Present if `context.todo` is called.
|
||||
*/
|
||||
todo?: string;
|
||||
todo?: string | boolean;
|
||||
|
||||
/**
|
||||
* Present if `context.skip` is called.
|
||||
*/
|
||||
skip?: string;
|
||||
skip?: string | boolean;
|
||||
}
|
||||
|
||||
interface TestPlan {
|
||||
/**
|
||||
* The nesting level of the test.
|
||||
*/
|
||||
nesting: number;
|
||||
|
||||
/**
|
||||
* The number of subtests that have ran.
|
||||
*/
|
||||
count: number;
|
||||
}
|
||||
|
||||
interface TestStart {
|
||||
/**
|
||||
* The test name.
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* The nesting level of the test.
|
||||
*/
|
||||
nesting: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -264,6 +332,15 @@ declare module 'node:test' {
|
|||
*/
|
||||
beforeEach: typeof beforeEach;
|
||||
|
||||
/**
|
||||
* This function is used to create a hook that runs after the current test finishes.
|
||||
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
||||
* the second argument. Default: A no-op function.
|
||||
* @param options Configuration options for the hook.
|
||||
* @since v18.13.0
|
||||
*/
|
||||
after: typeof after;
|
||||
|
||||
/**
|
||||
* This function is used to create a hook running after each subtest of the current test.
|
||||
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
||||
|
@ -274,9 +351,9 @@ declare module 'node:test' {
|
|||
afterEach: typeof afterEach;
|
||||
|
||||
/**
|
||||
* This function is used to write TAP diagnostics to the output. Any diagnostic information is
|
||||
* This function is used to write diagnostics to the output. Any diagnostic information is
|
||||
* included at the end of the test's results. This function does not return a value.
|
||||
* @param message Message to be displayed as a TAP diagnostic.
|
||||
* @param message Message to be reported.
|
||||
* @since v18.0.0
|
||||
*/
|
||||
diagnostic(message: string): void;
|
||||
|
@ -304,18 +381,18 @@ declare module 'node:test' {
|
|||
|
||||
/**
|
||||
* This function causes the test's output to indicate the test as skipped. If `message` is
|
||||
* provided, it is included in the TAP output. Calling `skip()` does not terminate execution of
|
||||
* provided, it is included in the output. Calling `skip()` does not terminate execution of
|
||||
* the test function. This function does not return a value.
|
||||
* @param message Optional skip message to be displayed in TAP output.
|
||||
* @param message Optional skip message.
|
||||
* @since v18.0.0
|
||||
*/
|
||||
skip(message?: string): void;
|
||||
|
||||
/**
|
||||
* This function adds a `TODO` directive to the test's output. If `message` is provided, it is
|
||||
* included in the TAP output. Calling `todo()` does not terminate execution of the test
|
||||
* included in the output. Calling `todo()` does not terminate execution of the test
|
||||
* function. This function does not return a value.
|
||||
* @param message Optional `TODO` message to be displayed in TAP output.
|
||||
* @param message Optional `TODO` message.
|
||||
* @since v18.0.0
|
||||
*/
|
||||
todo(message?: string): void;
|
||||
|
@ -333,6 +410,10 @@ declare module 'node:test' {
|
|||
* @returns A {@link Promise} resolved with `undefined` once the test completes.
|
||||
*/
|
||||
test: typeof test;
|
||||
/**
|
||||
* Each test provides its own MockTracker instance.
|
||||
*/
|
||||
readonly mock: MockTracker;
|
||||
}
|
||||
|
||||
interface TestOptions {
|
||||
|
@ -442,5 +523,238 @@ declare module 'node:test' {
|
|||
timeout?: number | undefined;
|
||||
}
|
||||
|
||||
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach };
|
||||
interface MockFunctionOptions {
|
||||
/**
|
||||
* The number of times that the mock will use the behavior of `implementation`.
|
||||
* Once the mock function has been called `times` times,
|
||||
* it will automatically restore the behavior of `original`.
|
||||
* This value must be an integer greater than zero.
|
||||
* @default Infinity
|
||||
*/
|
||||
times?: number | undefined;
|
||||
}
|
||||
|
||||
interface MockMethodOptions extends MockFunctionOptions {
|
||||
/**
|
||||
* If `true`, `object[methodName]` is treated as a getter.
|
||||
* This option cannot be used with the `setter` option.
|
||||
*/
|
||||
getter?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* If `true`, `object[methodName]` is treated as a setter.
|
||||
* This option cannot be used with the `getter` option.
|
||||
*/
|
||||
setter?: boolean | undefined;
|
||||
}
|
||||
|
||||
type Mock<F extends Function> = F & {
|
||||
mock: MockFunctionContext<F>;
|
||||
};
|
||||
|
||||
type NoOpFunction = (...args: any[]) => undefined;
|
||||
|
||||
type FunctionPropertyNames<T> = {
|
||||
[K in keyof T]: T[K] extends Function ? K : never;
|
||||
}[keyof T];
|
||||
|
||||
interface MockTracker {
|
||||
/**
|
||||
* This function is used to create a mock function.
|
||||
* @param original An optional function to create a mock on.
|
||||
* @param implementation An optional function used as the mock implementation for `original`.
|
||||
* This is useful for creating mocks that exhibit one behavior for a specified number of calls and then restore the behavior of `original`.
|
||||
* @param options Optional configuration options for the mock function.
|
||||
*/
|
||||
fn<F extends Function = NoOpFunction>(original?: F, options?: MockFunctionOptions): Mock<F>;
|
||||
fn<F extends Function = NoOpFunction, Implementation extends Function = F>(original?: F, implementation?: Implementation, options?: MockFunctionOptions): Mock<F | Implementation>;
|
||||
|
||||
/**
|
||||
* This function is used to create a mock on an existing object method.
|
||||
* @param object The object whose method is being mocked.
|
||||
* @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown.
|
||||
* @param implementation An optional function used as the mock implementation for `object[methodName]`.
|
||||
* @param options Optional configuration options for the mock method.
|
||||
*/
|
||||
method<
|
||||
MockedObject extends object,
|
||||
MethodName extends FunctionPropertyNames<MockedObject>,
|
||||
>(
|
||||
object: MockedObject,
|
||||
methodName: MethodName,
|
||||
options?: MockFunctionOptions,
|
||||
): MockedObject[MethodName] extends Function
|
||||
? Mock<MockedObject[MethodName]>
|
||||
: never;
|
||||
method<
|
||||
MockedObject extends object,
|
||||
MethodName extends FunctionPropertyNames<MockedObject>,
|
||||
Implementation extends Function,
|
||||
>(
|
||||
object: MockedObject,
|
||||
methodName: MethodName,
|
||||
implementation: Implementation,
|
||||
options?: MockFunctionOptions,
|
||||
): MockedObject[MethodName] extends Function
|
||||
? Mock<MockedObject[MethodName] | Implementation>
|
||||
: never;
|
||||
method<MockedObject extends object>(
|
||||
object: MockedObject,
|
||||
methodName: keyof MockedObject,
|
||||
options: MockMethodOptions,
|
||||
): Mock<Function>;
|
||||
method<MockedObject extends object>(
|
||||
object: MockedObject,
|
||||
methodName: keyof MockedObject,
|
||||
implementation: Function,
|
||||
options: MockMethodOptions,
|
||||
): Mock<Function>;
|
||||
|
||||
/**
|
||||
* This function is syntax sugar for {@link MockTracker.method} with `options.getter` set to `true`.
|
||||
*/
|
||||
getter<
|
||||
MockedObject extends object,
|
||||
MethodName extends keyof MockedObject,
|
||||
>(
|
||||
object: MockedObject,
|
||||
methodName: MethodName,
|
||||
options?: MockFunctionOptions,
|
||||
): Mock<() => MockedObject[MethodName]>;
|
||||
getter<
|
||||
MockedObject extends object,
|
||||
MethodName extends keyof MockedObject,
|
||||
Implementation extends Function,
|
||||
>(
|
||||
object: MockedObject,
|
||||
methodName: MethodName,
|
||||
implementation?: Implementation,
|
||||
options?: MockFunctionOptions,
|
||||
): Mock<(() => MockedObject[MethodName]) | Implementation>;
|
||||
|
||||
/**
|
||||
* This function is syntax sugar for {@link MockTracker.method} with `options.setter` set to `true`.
|
||||
*/
|
||||
setter<
|
||||
MockedObject extends object,
|
||||
MethodName extends keyof MockedObject,
|
||||
>(
|
||||
object: MockedObject,
|
||||
methodName: MethodName,
|
||||
options?: MockFunctionOptions,
|
||||
): Mock<(value: MockedObject[MethodName]) => void>;
|
||||
setter<
|
||||
MockedObject extends object,
|
||||
MethodName extends keyof MockedObject,
|
||||
Implementation extends Function,
|
||||
>(
|
||||
object: MockedObject,
|
||||
methodName: MethodName,
|
||||
implementation?: Implementation,
|
||||
options?: MockFunctionOptions,
|
||||
): Mock<((value: MockedObject[MethodName]) => void) | Implementation>;
|
||||
|
||||
/**
|
||||
* This function restores the default behavior of all mocks that were previously created by this `MockTracker`
|
||||
* and disassociates the mocks from the `MockTracker` instance. Once disassociated, the mocks can still be used,
|
||||
* but the `MockTracker` instance can no longer be used to reset their behavior or otherwise interact with them.
|
||||
*
|
||||
* After each test completes, this function is called on the test context's `MockTracker`.
|
||||
* If the global `MockTracker` is used extensively, calling this function manually is recommended.
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
/**
|
||||
* This function restores the default behavior of all mocks that were previously created by this `MockTracker`.
|
||||
* Unlike `mock.reset()`, `mock.restoreAll()` does not disassociate the mocks from the `MockTracker` instance.
|
||||
*/
|
||||
restoreAll(): void;
|
||||
}
|
||||
|
||||
const mock: MockTracker;
|
||||
|
||||
interface MockFunctionCall<
|
||||
F extends Function,
|
||||
ReturnType = F extends (...args: any) => infer T
|
||||
? T
|
||||
: F extends abstract new (...args: any) => infer T
|
||||
? T
|
||||
: unknown,
|
||||
Args = F extends (...args: infer Y) => any
|
||||
? Y
|
||||
: F extends abstract new (...args: infer Y) => any
|
||||
? Y
|
||||
: unknown[],
|
||||
> {
|
||||
/**
|
||||
* An array of the arguments passed to the mock function.
|
||||
*/
|
||||
arguments: Args;
|
||||
/**
|
||||
* If the mocked function threw then this property contains the thrown value.
|
||||
*/
|
||||
error: unknown | undefined;
|
||||
/**
|
||||
* The value returned by the mocked function.
|
||||
*
|
||||
* If the mocked function threw, it will be `undefined`.
|
||||
*/
|
||||
result: ReturnType | undefined;
|
||||
/**
|
||||
* An `Error` object whose stack can be used to determine the callsite of the mocked function invocation.
|
||||
*/
|
||||
stack: Error;
|
||||
/**
|
||||
* If the mocked function is a constructor, this field contains the class being constructed.
|
||||
* Otherwise this will be `undefined`.
|
||||
*/
|
||||
target: F extends abstract new (...args: any) => any ? F : undefined;
|
||||
/**
|
||||
* The mocked function's `this` value.
|
||||
*/
|
||||
this: unknown;
|
||||
}
|
||||
|
||||
interface MockFunctionContext<F extends Function> {
|
||||
/**
|
||||
* A getter that returns a copy of the internal array used to track calls to the mock.
|
||||
*/
|
||||
readonly calls: Array<MockFunctionCall<F>>;
|
||||
|
||||
/**
|
||||
* This function returns the number of times that this mock has been invoked.
|
||||
* This function is more efficient than checking `ctx.calls.length`
|
||||
* because `ctx.calls` is a getter that creates a copy of the internal call tracking array.
|
||||
*/
|
||||
callCount(): number;
|
||||
|
||||
/**
|
||||
* This function is used to change the behavior of an existing mock.
|
||||
* @param implementation The function to be used as the mock's new implementation.
|
||||
*/
|
||||
mockImplementation(implementation: Function): void;
|
||||
|
||||
/**
|
||||
* This function is used to change the behavior of an existing mock for a single invocation.
|
||||
* Once invocation `onCall` has occurred, the mock will revert to whatever behavior
|
||||
* it would have used had `mockImplementationOnce()` not been called.
|
||||
* @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`.
|
||||
* @param onCall The invocation number that will use `implementation`.
|
||||
* If the specified invocation has already occurred then an exception is thrown.
|
||||
*/
|
||||
mockImplementationOnce(implementation: Function, onCall?: number): void;
|
||||
|
||||
/**
|
||||
* Resets the call history of the mock function.
|
||||
*/
|
||||
resetCalls(): void;
|
||||
|
||||
/**
|
||||
* Resets the implementation of the mock function to its original behavior.
|
||||
* The mock can still be used after calling this function.
|
||||
*/
|
||||
restore(): void;
|
||||
}
|
||||
|
||||
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock };
|
||||
}
|
||||
|
|
103
node_modules/@types/node/ts4.8/tls.d.ts
generated
vendored
103
node_modules/@types/node/ts4.8/tls.d.ts
generated
vendored
|
@ -41,21 +41,100 @@ declare module 'tls' {
|
|||
CN: string;
|
||||
}
|
||||
interface PeerCertificate {
|
||||
subject: Certificate;
|
||||
issuer: Certificate;
|
||||
subjectaltname: string;
|
||||
infoAccess: NodeJS.Dict<string[]>;
|
||||
modulus: string;
|
||||
exponent: string;
|
||||
valid_from: string;
|
||||
valid_to: string;
|
||||
fingerprint: string;
|
||||
fingerprint256: string;
|
||||
ext_key_usage: string[];
|
||||
serialNumber: string;
|
||||
/**
|
||||
* `true` if a Certificate Authority (CA), `false` otherwise.
|
||||
* @since v18.13.0
|
||||
*/
|
||||
ca: boolean;
|
||||
/**
|
||||
* The DER encoded X.509 certificate data.
|
||||
*/
|
||||
raw: Buffer;
|
||||
/**
|
||||
* The certificate subject.
|
||||
*/
|
||||
subject: Certificate;
|
||||
/**
|
||||
* The certificate issuer, described in the same terms as the `subject`.
|
||||
*/
|
||||
issuer: Certificate;
|
||||
/**
|
||||
* The date-time the certificate is valid from.
|
||||
*/
|
||||
valid_from: string;
|
||||
/**
|
||||
* The date-time the certificate is valid to.
|
||||
*/
|
||||
valid_to: string;
|
||||
/**
|
||||
* The certificate serial number, as a hex string.
|
||||
*/
|
||||
serialNumber: string;
|
||||
/**
|
||||
* The SHA-1 digest of the DER encoded certificate.
|
||||
* It is returned as a `:` separated hexadecimal string.
|
||||
*/
|
||||
fingerprint: string;
|
||||
/**
|
||||
* The SHA-256 digest of the DER encoded certificate.
|
||||
* It is returned as a `:` separated hexadecimal string.
|
||||
*/
|
||||
fingerprint256: string;
|
||||
/**
|
||||
* The SHA-512 digest of the DER encoded certificate.
|
||||
* It is returned as a `:` separated hexadecimal string.
|
||||
*/
|
||||
fingerprint512: string;
|
||||
/**
|
||||
* The extended key usage, a set of OIDs.
|
||||
*/
|
||||
ext_key_usage?: string[];
|
||||
/**
|
||||
* A string containing concatenated names for the subject,
|
||||
* an alternative to the `subject` names.
|
||||
*/
|
||||
subjectaltname?: string;
|
||||
/**
|
||||
* An array describing the AuthorityInfoAccess, used with OCSP.
|
||||
*/
|
||||
infoAccess?: NodeJS.Dict<string[]>;
|
||||
/**
|
||||
* For RSA keys: The RSA bit size.
|
||||
*
|
||||
* For EC keys: The key size in bits.
|
||||
*/
|
||||
bits?: number;
|
||||
/**
|
||||
* The RSA exponent, as a string in hexadecimal number notation.
|
||||
*/
|
||||
exponent?: string;
|
||||
/**
|
||||
* The RSA modulus, as a hexadecimal string.
|
||||
*/
|
||||
modulus?: string;
|
||||
/**
|
||||
* The public key.
|
||||
*/
|
||||
pubkey?: Buffer;
|
||||
/**
|
||||
* The ASN.1 name of the OID of the elliptic curve.
|
||||
* Well-known curves are identified by an OID.
|
||||
* While it is unusual, it is possible that the curve
|
||||
* is identified by its mathematical properties,
|
||||
* in which case it will not have an OID.
|
||||
*/
|
||||
asn1Curve?: string;
|
||||
/**
|
||||
* The NIST name for the elliptic curve,if it has one
|
||||
* (not all well-known curves have been assigned names by NIST).
|
||||
*/
|
||||
nistCurve?: string;
|
||||
}
|
||||
interface DetailedPeerCertificate extends PeerCertificate {
|
||||
/**
|
||||
* The issuer certificate object.
|
||||
* For self-signed certificates, this may be a circular reference.
|
||||
*/
|
||||
issuerCertificate: DetailedPeerCertificate;
|
||||
}
|
||||
interface CipherNameAndProtocol {
|
||||
|
|
85
node_modules/@types/node/ts4.8/util.d.ts
generated
vendored
85
node_modules/@types/node/ts4.8/util.d.ts
generated
vendored
|
@ -1426,6 +1426,91 @@ declare module 'util' {
|
|||
tokens?: Token[];
|
||||
}
|
||||
: PreciseParsedResults<T>;
|
||||
|
||||
/**
|
||||
* @since v18.13.0
|
||||
*/
|
||||
export class MIMEType {
|
||||
/**
|
||||
* Creates a new MIMEType object by parsing the input.
|
||||
*
|
||||
* A `TypeError` will be thrown if the `input` is not a valid MIME.
|
||||
* Note that an effort will be made to coerce the given values into strings.
|
||||
* @param input The input MIME to parse.
|
||||
*/
|
||||
constructor(input: string | { toString: () => string });
|
||||
|
||||
/**
|
||||
* Gets and sets the type portion of the MIME.
|
||||
*/
|
||||
type: string;
|
||||
|
||||
/**
|
||||
* Gets and sets the subtype portion of the MIME.
|
||||
*/
|
||||
subtype: string;
|
||||
|
||||
/**
|
||||
* Gets the essence of the MIME.
|
||||
*
|
||||
* Use `mime.type` or `mime.subtype` to alter the MIME.
|
||||
*/
|
||||
readonly essence: string;
|
||||
|
||||
/**
|
||||
* Gets the `MIMEParams` object representing the parameters of the MIME.
|
||||
*/
|
||||
readonly params: MIMEParams;
|
||||
|
||||
/**
|
||||
* Returns the serialized MIME.
|
||||
*
|
||||
* Because of the need for standard compliance, this method
|
||||
* does not allow users to customize the serialization process of the MIME.
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since v18.13.0
|
||||
*/
|
||||
export class MIMEParams {
|
||||
/**
|
||||
* Remove all name-value pairs whose name is `name`.
|
||||
*/
|
||||
delete(name: string): void;
|
||||
/**
|
||||
* Returns an iterator over each of the name-value pairs in the parameters.
|
||||
*/
|
||||
entries(): IterableIterator<[string, string]>;
|
||||
/**
|
||||
* Returns the value of the first name-value pair whose name is `name`.
|
||||
* If there are no such pairs, `null` is returned.
|
||||
*/
|
||||
get(name: string): string | null;
|
||||
/**
|
||||
* Returns `true` if there is at least one name-value pair whose name is `name`.
|
||||
*/
|
||||
has(name: string): boolean;
|
||||
/**
|
||||
* Returns an iterator over the names of each name-value pair.
|
||||
*/
|
||||
keys(): IterableIterator<string>;
|
||||
/**
|
||||
* Sets the value in the `MIMEParams` object associated with `name` to `value`.
|
||||
* If there are any pre-existing name-value pairs whose names are `name`,
|
||||
* set the first such pair's value to `value`.
|
||||
*/
|
||||
set(name: string, value: string): void;
|
||||
/**
|
||||
* Returns an iterator over the values of each name-value pair.
|
||||
*/
|
||||
values(): IterableIterator<string>;
|
||||
/**
|
||||
* Returns an iterator over each of the name-value pairs in the parameters.
|
||||
*/
|
||||
[Symbol.iterator]: typeof MIMEParams.prototype.entries;
|
||||
}
|
||||
}
|
||||
declare module 'util/types' {
|
||||
export * from 'util/types';
|
||||
|
|
51
node_modules/@types/node/ts4.8/v8.d.ts
generated
vendored
51
node_modules/@types/node/ts4.8/v8.d.ts
generated
vendored
|
@ -390,6 +390,57 @@ declare module 'v8' {
|
|||
* @since v15.1.0, v14.18.0, v12.22.0
|
||||
*/
|
||||
function stopCoverage(): void;
|
||||
|
||||
/**
|
||||
* This API collects GC data in current thread.
|
||||
*/
|
||||
class GCProfiler {
|
||||
/**
|
||||
* Start collecting GC data.
|
||||
*/
|
||||
start(): void;
|
||||
/**
|
||||
* Stop collecting GC data and return a object.
|
||||
*/
|
||||
stop(): GCProfilerResult;
|
||||
}
|
||||
interface GCProfilerResult {
|
||||
version: number;
|
||||
startTime: number;
|
||||
endTime: number;
|
||||
statistics: Array<{
|
||||
gcType: string;
|
||||
cost: number;
|
||||
beforeGC: {
|
||||
heapStatistics: HeapStatistics;
|
||||
heapSpaceStatistics: HeapSpaceStatistics[];
|
||||
};
|
||||
afterGC: {
|
||||
heapStatistics: HeapStatistics;
|
||||
heapSpaceStatistics: HeapSpaceStatistics[];
|
||||
};
|
||||
}>;
|
||||
}
|
||||
interface HeapStatistics {
|
||||
totalHeapSize: number;
|
||||
totalHeapSizeExecutable: number;
|
||||
totalPhysicalSize: number;
|
||||
totalAvailableSize: number;
|
||||
totalGlobalHandlesSize: number;
|
||||
usedGlobalHandlesSize: number;
|
||||
usedHeapSize: number;
|
||||
heapSizeLimit: number;
|
||||
mallocedMemory: number;
|
||||
externalMemory: number;
|
||||
peakMallocedMemory: number;
|
||||
}
|
||||
interface HeapSpaceStatistics {
|
||||
spaceName: string;
|
||||
spaceSize: number;
|
||||
spaceUsedSize: number;
|
||||
spaceAvailableSize: number;
|
||||
physicalSpaceSize: number;
|
||||
}
|
||||
}
|
||||
declare module 'node:v8' {
|
||||
export * from 'v8';
|
||||
|
|
157
node_modules/@types/node/ts4.8/vm.d.ts
generated
vendored
157
node_modules/@types/node/ts4.8/vm.d.ts
generated
vendored
|
@ -56,11 +56,17 @@ declare module 'vm' {
|
|||
columnOffset?: number | undefined;
|
||||
}
|
||||
interface ScriptOptions extends BaseOptions {
|
||||
displayErrors?: boolean | undefined;
|
||||
timeout?: number | undefined;
|
||||
cachedData?: Buffer | undefined;
|
||||
/**
|
||||
* V8's code cache data for the supplied source.
|
||||
*/
|
||||
cachedData?: Buffer | NodeJS.ArrayBufferView | undefined;
|
||||
/** @deprecated in favor of `script.createCachedData()` */
|
||||
produceCachedData?: boolean | undefined;
|
||||
/**
|
||||
* Called during evaluation of this module when `import()` is called.
|
||||
* If this option is not specified, calls to `import()` will reject with `ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`.
|
||||
*/
|
||||
importModuleDynamically?: ((specifier: string, script: Script, importAssertions: Object) => Module) | undefined;
|
||||
}
|
||||
interface RunningScriptOptions extends BaseOptions {
|
||||
/**
|
||||
|
@ -80,10 +86,31 @@ declare module 'vm' {
|
|||
* Default: `false`.
|
||||
*/
|
||||
breakOnSigint?: boolean | undefined;
|
||||
}
|
||||
interface RunningScriptInNewContextOptions extends RunningScriptOptions {
|
||||
/**
|
||||
* Human-readable name of the newly created context.
|
||||
*/
|
||||
contextName?: CreateContextOptions['name'];
|
||||
/**
|
||||
* Origin corresponding to the newly created context for display purposes. The origin should be formatted like a URL,
|
||||
* but with only the scheme, host, and port (if necessary), like the value of the `url.origin` property of a `URL` object.
|
||||
* Most notably, this string should omit the trailing slash, as that denotes a path.
|
||||
*/
|
||||
contextOrigin?: CreateContextOptions['origin'];
|
||||
contextCodeGeneration?: CreateContextOptions['codeGeneration'];
|
||||
/**
|
||||
* If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
|
||||
*/
|
||||
microtaskMode?: 'afterEvaluate' | undefined;
|
||||
microtaskMode?: CreateContextOptions['microtaskMode'];
|
||||
}
|
||||
interface RunningCodeOptions extends RunningScriptOptions {
|
||||
cachedData?: ScriptOptions['cachedData'];
|
||||
importModuleDynamically?: ScriptOptions['importModuleDynamically'];
|
||||
}
|
||||
interface RunningCodeInNewContextOptions extends RunningScriptInNewContextOptions {
|
||||
cachedData?: ScriptOptions['cachedData'];
|
||||
importModuleDynamically?: ScriptOptions['importModuleDynamically'];
|
||||
}
|
||||
interface CompileFunctionOptions extends BaseOptions {
|
||||
/**
|
||||
|
@ -144,7 +171,10 @@ declare module 'vm' {
|
|||
* @default 'summary'
|
||||
*/
|
||||
mode?: MeasureMemoryMode | undefined;
|
||||
context?: Context | undefined;
|
||||
/**
|
||||
* @default 'default'
|
||||
*/
|
||||
execution?: 'default' | 'eager' | undefined;
|
||||
}
|
||||
interface MemoryMeasurement {
|
||||
total: {
|
||||
|
@ -158,7 +188,7 @@ declare module 'vm' {
|
|||
* @since v0.3.1
|
||||
*/
|
||||
class Script {
|
||||
constructor(code: string, options?: ScriptOptions);
|
||||
constructor(code: string, options?: ScriptOptions | string);
|
||||
/**
|
||||
* Runs the compiled code contained by the `vm.Script` object within the given`contextifiedObject` and returns the result. Running code does not have access
|
||||
* to local scope.
|
||||
|
@ -220,7 +250,7 @@ declare module 'vm' {
|
|||
* @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
|
||||
* @return the result of the very last statement executed in the script.
|
||||
*/
|
||||
runInNewContext(contextObject?: Context, options?: RunningScriptOptions): any;
|
||||
runInNewContext(contextObject?: Context, options?: RunningScriptInNewContextOptions): any;
|
||||
/**
|
||||
* Runs the compiled code contained by the `vm.Script` within the context of the
|
||||
* current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object.
|
||||
|
@ -273,6 +303,10 @@ declare module 'vm' {
|
|||
cachedDataProduced?: boolean | undefined;
|
||||
cachedDataRejected?: boolean | undefined;
|
||||
cachedData?: Buffer | undefined;
|
||||
/**
|
||||
* When the script is compiled from a source that contains a source map magic comment, this property will be set to the URL of the source map.
|
||||
*/
|
||||
sourceMapURL?: string | undefined;
|
||||
}
|
||||
/**
|
||||
* If given a `contextObject`, the `vm.createContext()` method will `prepare
|
||||
|
@ -345,7 +379,7 @@ declare module 'vm' {
|
|||
* @param contextifiedObject The `contextified` object that will be used as the `global` when the `code` is compiled and run.
|
||||
* @return the result of the very last statement executed in the script.
|
||||
*/
|
||||
function runInContext(code: string, contextifiedObject: Context, options?: RunningScriptOptions | string): any;
|
||||
function runInContext(code: string, contextifiedObject: Context, options?: RunningCodeOptions | string): any;
|
||||
/**
|
||||
* The `vm.runInNewContext()` first contextifies the given `contextObject` (or
|
||||
* creates a new `contextObject` if passed as `undefined`), compiles the `code`,
|
||||
|
@ -374,7 +408,7 @@ declare module 'vm' {
|
|||
* @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
|
||||
* @return the result of the very last statement executed in the script.
|
||||
*/
|
||||
function runInNewContext(code: string, contextObject?: Context, options?: RunningScriptOptions | string): any;
|
||||
function runInNewContext(code: string, contextObject?: Context, options?: RunningCodeInNewContextOptions | string): any;
|
||||
/**
|
||||
* `vm.runInThisContext()` compiles `code`, runs it within the context of the
|
||||
* current `global` and returns the result. Running code does not have access to
|
||||
|
@ -437,7 +471,7 @@ declare module 'vm' {
|
|||
* @param code The JavaScript code to compile and run.
|
||||
* @return the result of the very last statement executed in the script.
|
||||
*/
|
||||
function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
|
||||
function runInThisContext(code: string, options?: RunningCodeOptions | string): any;
|
||||
/**
|
||||
* Compiles the given code into the provided context (if no context is
|
||||
* supplied, the current context is used), and returns it wrapped inside a
|
||||
|
@ -446,7 +480,11 @@ declare module 'vm' {
|
|||
* @param code The body of the function to compile.
|
||||
* @param params An array of strings containing all parameters for the function.
|
||||
*/
|
||||
function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
|
||||
function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function & {
|
||||
cachedData?: Script['cachedData'] | undefined;
|
||||
cachedDataProduced?: Script['cachedDataProduced'] | undefined;
|
||||
cachedDataRejected?: Script['cachedDataRejected'] | undefined;
|
||||
};
|
||||
/**
|
||||
* Measure the memory known to V8 and used by all contexts known to the
|
||||
* current V8 isolate, or the main context.
|
||||
|
@ -503,6 +541,103 @@ declare module 'vm' {
|
|||
* @experimental
|
||||
*/
|
||||
function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
|
||||
|
||||
interface ModuleEvaluateOptions {
|
||||
timeout?: RunningScriptOptions['timeout'] | undefined;
|
||||
breakOnSigint?: RunningScriptOptions['breakOnSigint'] | undefined;
|
||||
}
|
||||
type ModuleLinker = (specifier: string, referencingModule: Module, extra: { assert: Object }) => Module | Promise<Module>;
|
||||
type ModuleStatus = 'unlinked' | 'linking' | 'linked' | 'evaluating' | 'evaluated' | 'errored';
|
||||
class Module {
|
||||
/**
|
||||
* The specifiers of all dependencies of this module.
|
||||
*/
|
||||
dependencySpecifiers: readonly string[];
|
||||
/**
|
||||
* If the `module.status` is `'errored'`, this property contains the exception thrown by the module during evaluation.
|
||||
* If the status is anything else, accessing this property will result in a thrown exception.
|
||||
*/
|
||||
error: any;
|
||||
/**
|
||||
* The identifier of the current module, as set in the constructor.
|
||||
*/
|
||||
identifier: string;
|
||||
context: Context;
|
||||
/**
|
||||
* The namespace object of the module. This is only available after linking (`module.link()`) has completed.
|
||||
*/
|
||||
namespace: Object;
|
||||
/**
|
||||
* The current status of the module.
|
||||
*/
|
||||
status: ModuleStatus;
|
||||
/**
|
||||
* Evaluate the module.
|
||||
*
|
||||
* This must be called after the module has been linked; otherwise it will reject
|
||||
* It could be called also when the module has already been evaluated, in which case it will either do nothing
|
||||
* if the initial evaluation ended in success (`module.status` is `'evaluated'`) or it will re-throw the exception
|
||||
* that the initial evaluation resulted in (`module.status` is `'errored'`).
|
||||
*
|
||||
* This method cannot be called while the module is being evaluated (`module.status` is `'evaluating'`).
|
||||
*/
|
||||
evaluate(options?: ModuleEvaluateOptions): Promise<void>;
|
||||
/**
|
||||
* Link module dependencies. This method must be called before evaluation, and can only be called once per module.
|
||||
*/
|
||||
link(linker: ModuleLinker): Promise<void>;
|
||||
}
|
||||
|
||||
interface SourceTextModuleOptions {
|
||||
/**
|
||||
* String used in stack traces.
|
||||
* @default 'vm:module(i)' where i is a context-specific ascending index.
|
||||
*/
|
||||
identifier?: string | undefined;
|
||||
cachedData?: ScriptOptions['cachedData'] | undefined;
|
||||
context?: Context | undefined;
|
||||
lineOffset?: BaseOptions['lineOffset'] | undefined;
|
||||
columnOffset?: BaseOptions['columnOffset'] | undefined;
|
||||
/**
|
||||
* Called during evaluation of this module to initialize the `import.meta`.
|
||||
*/
|
||||
initializeImportMeta?: ((meta: ImportMeta, module: SourceTextModule) => void) | undefined;
|
||||
importModuleDynamically?: ScriptOptions['importModuleDynamically'] | undefined;
|
||||
}
|
||||
class SourceTextModule extends Module {
|
||||
/**
|
||||
* Creates a new `SourceTextModule` instance.
|
||||
* @param code JavaScript Module code to parse
|
||||
*/
|
||||
constructor(code: string, options?: SourceTextModuleOptions);
|
||||
}
|
||||
|
||||
interface SyntheticModuleOptions {
|
||||
/**
|
||||
* String used in stack traces.
|
||||
* @default 'vm:module(i)' where i is a context-specific ascending index.
|
||||
*/
|
||||
identifier?: string | undefined;
|
||||
/**
|
||||
* The contextified object as returned by the `vm.createContext()` method, to compile and evaluate this module in.
|
||||
*/
|
||||
context?: Context | undefined;
|
||||
}
|
||||
class SyntheticModule extends Module {
|
||||
/**
|
||||
* Creates a new `SyntheticModule` instance.
|
||||
* @param exportNames Array of names that will be exported from the module.
|
||||
* @param evaluateCallback Called when the module is evaluated.
|
||||
*/
|
||||
constructor(exportNames: string[], evaluateCallback: (this: SyntheticModule) => void, options?: SyntheticModuleOptions);
|
||||
/**
|
||||
* This method is used after the module is linked to set the values of exports.
|
||||
* If it is called before the module is linked, an `ERR_VM_MODULE_STATUS` error will be thrown.
|
||||
* @param name
|
||||
* @param value
|
||||
*/
|
||||
setExport(name: string, value: any): void;
|
||||
}
|
||||
}
|
||||
declare module 'node:vm' {
|
||||
export * from 'vm';
|
||||
|
|
85
node_modules/@types/node/util.d.ts
generated
vendored
85
node_modules/@types/node/util.d.ts
generated
vendored
|
@ -1426,6 +1426,91 @@ declare module 'util' {
|
|||
tokens?: Token[];
|
||||
}
|
||||
: PreciseParsedResults<T>;
|
||||
|
||||
/**
|
||||
* @since v18.13.0
|
||||
*/
|
||||
export class MIMEType {
|
||||
/**
|
||||
* Creates a new MIMEType object by parsing the input.
|
||||
*
|
||||
* A `TypeError` will be thrown if the `input` is not a valid MIME.
|
||||
* Note that an effort will be made to coerce the given values into strings.
|
||||
* @param input The input MIME to parse.
|
||||
*/
|
||||
constructor(input: string | { toString: () => string });
|
||||
|
||||
/**
|
||||
* Gets and sets the type portion of the MIME.
|
||||
*/
|
||||
type: string;
|
||||
|
||||
/**
|
||||
* Gets and sets the subtype portion of the MIME.
|
||||
*/
|
||||
subtype: string;
|
||||
|
||||
/**
|
||||
* Gets the essence of the MIME.
|
||||
*
|
||||
* Use `mime.type` or `mime.subtype` to alter the MIME.
|
||||
*/
|
||||
readonly essence: string;
|
||||
|
||||
/**
|
||||
* Gets the `MIMEParams` object representing the parameters of the MIME.
|
||||
*/
|
||||
readonly params: MIMEParams;
|
||||
|
||||
/**
|
||||
* Returns the serialized MIME.
|
||||
*
|
||||
* Because of the need for standard compliance, this method
|
||||
* does not allow users to customize the serialization process of the MIME.
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since v18.13.0
|
||||
*/
|
||||
export class MIMEParams {
|
||||
/**
|
||||
* Remove all name-value pairs whose name is `name`.
|
||||
*/
|
||||
delete(name: string): void;
|
||||
/**
|
||||
* Returns an iterator over each of the name-value pairs in the parameters.
|
||||
*/
|
||||
entries(): IterableIterator<[name: string, value: string]>;
|
||||
/**
|
||||
* Returns the value of the first name-value pair whose name is `name`.
|
||||
* If there are no such pairs, `null` is returned.
|
||||
*/
|
||||
get(name: string): string | null;
|
||||
/**
|
||||
* Returns `true` if there is at least one name-value pair whose name is `name`.
|
||||
*/
|
||||
has(name: string): boolean;
|
||||
/**
|
||||
* Returns an iterator over the names of each name-value pair.
|
||||
*/
|
||||
keys(): IterableIterator<string>;
|
||||
/**
|
||||
* Sets the value in the `MIMEParams` object associated with `name` to `value`.
|
||||
* If there are any pre-existing name-value pairs whose names are `name`,
|
||||
* set the first such pair's value to `value`.
|
||||
*/
|
||||
set(name: string, value: string): void;
|
||||
/**
|
||||
* Returns an iterator over the values of each name-value pair.
|
||||
*/
|
||||
values(): IterableIterator<string>;
|
||||
/**
|
||||
* Returns an iterator over each of the name-value pairs in the parameters.
|
||||
*/
|
||||
[Symbol.iterator]: typeof MIMEParams.prototype.entries;
|
||||
}
|
||||
}
|
||||
declare module 'util/types' {
|
||||
export * from 'util/types';
|
||||
|
|
51
node_modules/@types/node/v8.d.ts
generated
vendored
51
node_modules/@types/node/v8.d.ts
generated
vendored
|
@ -390,6 +390,57 @@ declare module 'v8' {
|
|||
* @since v15.1.0, v14.18.0, v12.22.0
|
||||
*/
|
||||
function stopCoverage(): void;
|
||||
|
||||
/**
|
||||
* This API collects GC data in current thread.
|
||||
*/
|
||||
class GCProfiler {
|
||||
/**
|
||||
* Start collecting GC data.
|
||||
*/
|
||||
start(): void;
|
||||
/**
|
||||
* Stop collecting GC data and return a object.
|
||||
*/
|
||||
stop(): GCProfilerResult;
|
||||
}
|
||||
interface GCProfilerResult {
|
||||
version: number;
|
||||
startTime: number;
|
||||
endTime: number;
|
||||
statistics: Array<{
|
||||
gcType: string;
|
||||
cost: number;
|
||||
beforeGC: {
|
||||
heapStatistics: HeapStatistics;
|
||||
heapSpaceStatistics: HeapSpaceStatistics[];
|
||||
};
|
||||
afterGC: {
|
||||
heapStatistics: HeapStatistics;
|
||||
heapSpaceStatistics: HeapSpaceStatistics[];
|
||||
};
|
||||
}>;
|
||||
}
|
||||
interface HeapStatistics {
|
||||
totalHeapSize: number;
|
||||
totalHeapSizeExecutable: number;
|
||||
totalPhysicalSize: number;
|
||||
totalAvailableSize: number;
|
||||
totalGlobalHandlesSize: number;
|
||||
usedGlobalHandlesSize: number;
|
||||
usedHeapSize: number;
|
||||
heapSizeLimit: number;
|
||||
mallocedMemory: number;
|
||||
externalMemory: number;
|
||||
peakMallocedMemory: number;
|
||||
}
|
||||
interface HeapSpaceStatistics {
|
||||
spaceName: string;
|
||||
spaceSize: number;
|
||||
spaceUsedSize: number;
|
||||
spaceAvailableSize: number;
|
||||
physicalSpaceSize: number;
|
||||
}
|
||||
}
|
||||
declare module 'node:v8' {
|
||||
export * from 'v8';
|
||||
|
|
157
node_modules/@types/node/vm.d.ts
generated
vendored
157
node_modules/@types/node/vm.d.ts
generated
vendored
|
@ -56,11 +56,17 @@ declare module 'vm' {
|
|||
columnOffset?: number | undefined;
|
||||
}
|
||||
interface ScriptOptions extends BaseOptions {
|
||||
displayErrors?: boolean | undefined;
|
||||
timeout?: number | undefined;
|
||||
cachedData?: Buffer | undefined;
|
||||
/**
|
||||
* V8's code cache data for the supplied source.
|
||||
*/
|
||||
cachedData?: Buffer | NodeJS.ArrayBufferView | undefined;
|
||||
/** @deprecated in favor of `script.createCachedData()` */
|
||||
produceCachedData?: boolean | undefined;
|
||||
/**
|
||||
* Called during evaluation of this module when `import()` is called.
|
||||
* If this option is not specified, calls to `import()` will reject with `ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`.
|
||||
*/
|
||||
importModuleDynamically?: ((specifier: string, script: Script, importAssertions: Object) => Module) | undefined;
|
||||
}
|
||||
interface RunningScriptOptions extends BaseOptions {
|
||||
/**
|
||||
|
@ -80,10 +86,31 @@ declare module 'vm' {
|
|||
* Default: `false`.
|
||||
*/
|
||||
breakOnSigint?: boolean | undefined;
|
||||
}
|
||||
interface RunningScriptInNewContextOptions extends RunningScriptOptions {
|
||||
/**
|
||||
* Human-readable name of the newly created context.
|
||||
*/
|
||||
contextName?: CreateContextOptions['name'];
|
||||
/**
|
||||
* Origin corresponding to the newly created context for display purposes. The origin should be formatted like a URL,
|
||||
* but with only the scheme, host, and port (if necessary), like the value of the `url.origin` property of a `URL` object.
|
||||
* Most notably, this string should omit the trailing slash, as that denotes a path.
|
||||
*/
|
||||
contextOrigin?: CreateContextOptions['origin'];
|
||||
contextCodeGeneration?: CreateContextOptions['codeGeneration'];
|
||||
/**
|
||||
* If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
|
||||
*/
|
||||
microtaskMode?: 'afterEvaluate' | undefined;
|
||||
microtaskMode?: CreateContextOptions['microtaskMode'];
|
||||
}
|
||||
interface RunningCodeOptions extends RunningScriptOptions {
|
||||
cachedData?: ScriptOptions['cachedData'];
|
||||
importModuleDynamically?: ScriptOptions['importModuleDynamically'];
|
||||
}
|
||||
interface RunningCodeInNewContextOptions extends RunningScriptInNewContextOptions {
|
||||
cachedData?: ScriptOptions['cachedData'];
|
||||
importModuleDynamically?: ScriptOptions['importModuleDynamically'];
|
||||
}
|
||||
interface CompileFunctionOptions extends BaseOptions {
|
||||
/**
|
||||
|
@ -144,7 +171,10 @@ declare module 'vm' {
|
|||
* @default 'summary'
|
||||
*/
|
||||
mode?: MeasureMemoryMode | undefined;
|
||||
context?: Context | undefined;
|
||||
/**
|
||||
* @default 'default'
|
||||
*/
|
||||
execution?: 'default' | 'eager' | undefined;
|
||||
}
|
||||
interface MemoryMeasurement {
|
||||
total: {
|
||||
|
@ -158,7 +188,7 @@ declare module 'vm' {
|
|||
* @since v0.3.1
|
||||
*/
|
||||
class Script {
|
||||
constructor(code: string, options?: ScriptOptions);
|
||||
constructor(code: string, options?: ScriptOptions | string);
|
||||
/**
|
||||
* Runs the compiled code contained by the `vm.Script` object within the given`contextifiedObject` and returns the result. Running code does not have access
|
||||
* to local scope.
|
||||
|
@ -220,7 +250,7 @@ declare module 'vm' {
|
|||
* @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
|
||||
* @return the result of the very last statement executed in the script.
|
||||
*/
|
||||
runInNewContext(contextObject?: Context, options?: RunningScriptOptions): any;
|
||||
runInNewContext(contextObject?: Context, options?: RunningScriptInNewContextOptions): any;
|
||||
/**
|
||||
* Runs the compiled code contained by the `vm.Script` within the context of the
|
||||
* current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object.
|
||||
|
@ -273,6 +303,10 @@ declare module 'vm' {
|
|||
cachedDataProduced?: boolean | undefined;
|
||||
cachedDataRejected?: boolean | undefined;
|
||||
cachedData?: Buffer | undefined;
|
||||
/**
|
||||
* When the script is compiled from a source that contains a source map magic comment, this property will be set to the URL of the source map.
|
||||
*/
|
||||
sourceMapURL?: string | undefined;
|
||||
}
|
||||
/**
|
||||
* If given a `contextObject`, the `vm.createContext()` method will `prepare
|
||||
|
@ -345,7 +379,7 @@ declare module 'vm' {
|
|||
* @param contextifiedObject The `contextified` object that will be used as the `global` when the `code` is compiled and run.
|
||||
* @return the result of the very last statement executed in the script.
|
||||
*/
|
||||
function runInContext(code: string, contextifiedObject: Context, options?: RunningScriptOptions | string): any;
|
||||
function runInContext(code: string, contextifiedObject: Context, options?: RunningCodeOptions | string): any;
|
||||
/**
|
||||
* The `vm.runInNewContext()` first contextifies the given `contextObject` (or
|
||||
* creates a new `contextObject` if passed as `undefined`), compiles the `code`,
|
||||
|
@ -374,7 +408,7 @@ declare module 'vm' {
|
|||
* @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
|
||||
* @return the result of the very last statement executed in the script.
|
||||
*/
|
||||
function runInNewContext(code: string, contextObject?: Context, options?: RunningScriptOptions | string): any;
|
||||
function runInNewContext(code: string, contextObject?: Context, options?: RunningCodeInNewContextOptions | string): any;
|
||||
/**
|
||||
* `vm.runInThisContext()` compiles `code`, runs it within the context of the
|
||||
* current `global` and returns the result. Running code does not have access to
|
||||
|
@ -437,7 +471,7 @@ declare module 'vm' {
|
|||
* @param code The JavaScript code to compile and run.
|
||||
* @return the result of the very last statement executed in the script.
|
||||
*/
|
||||
function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
|
||||
function runInThisContext(code: string, options?: RunningCodeOptions | string): any;
|
||||
/**
|
||||
* Compiles the given code into the provided context (if no context is
|
||||
* supplied, the current context is used), and returns it wrapped inside a
|
||||
|
@ -446,7 +480,11 @@ declare module 'vm' {
|
|||
* @param code The body of the function to compile.
|
||||
* @param params An array of strings containing all parameters for the function.
|
||||
*/
|
||||
function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
|
||||
function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function & {
|
||||
cachedData?: Script['cachedData'] | undefined;
|
||||
cachedDataProduced?: Script['cachedDataProduced'] | undefined;
|
||||
cachedDataRejected?: Script['cachedDataRejected'] | undefined;
|
||||
};
|
||||
/**
|
||||
* Measure the memory known to V8 and used by all contexts known to the
|
||||
* current V8 isolate, or the main context.
|
||||
|
@ -503,6 +541,103 @@ declare module 'vm' {
|
|||
* @experimental
|
||||
*/
|
||||
function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
|
||||
|
||||
interface ModuleEvaluateOptions {
|
||||
timeout?: RunningScriptOptions['timeout'] | undefined;
|
||||
breakOnSigint?: RunningScriptOptions['breakOnSigint'] | undefined;
|
||||
}
|
||||
type ModuleLinker = (specifier: string, referencingModule: Module, extra: { assert: Object }) => Module | Promise<Module>;
|
||||
type ModuleStatus = 'unlinked' | 'linking' | 'linked' | 'evaluating' | 'evaluated' | 'errored';
|
||||
class Module {
|
||||
/**
|
||||
* The specifiers of all dependencies of this module.
|
||||
*/
|
||||
dependencySpecifiers: readonly string[];
|
||||
/**
|
||||
* If the `module.status` is `'errored'`, this property contains the exception thrown by the module during evaluation.
|
||||
* If the status is anything else, accessing this property will result in a thrown exception.
|
||||
*/
|
||||
error: any;
|
||||
/**
|
||||
* The identifier of the current module, as set in the constructor.
|
||||
*/
|
||||
identifier: string;
|
||||
context: Context;
|
||||
/**
|
||||
* The namespace object of the module. This is only available after linking (`module.link()`) has completed.
|
||||
*/
|
||||
namespace: Object;
|
||||
/**
|
||||
* The current status of the module.
|
||||
*/
|
||||
status: ModuleStatus;
|
||||
/**
|
||||
* Evaluate the module.
|
||||
*
|
||||
* This must be called after the module has been linked; otherwise it will reject
|
||||
* It could be called also when the module has already been evaluated, in which case it will either do nothing
|
||||
* if the initial evaluation ended in success (`module.status` is `'evaluated'`) or it will re-throw the exception
|
||||
* that the initial evaluation resulted in (`module.status` is `'errored'`).
|
||||
*
|
||||
* This method cannot be called while the module is being evaluated (`module.status` is `'evaluating'`).
|
||||
*/
|
||||
evaluate(options?: ModuleEvaluateOptions): Promise<void>;
|
||||
/**
|
||||
* Link module dependencies. This method must be called before evaluation, and can only be called once per module.
|
||||
*/
|
||||
link(linker: ModuleLinker): Promise<void>;
|
||||
}
|
||||
|
||||
interface SourceTextModuleOptions {
|
||||
/**
|
||||
* String used in stack traces.
|
||||
* @default 'vm:module(i)' where i is a context-specific ascending index.
|
||||
*/
|
||||
identifier?: string | undefined;
|
||||
cachedData?: ScriptOptions['cachedData'] | undefined;
|
||||
context?: Context | undefined;
|
||||
lineOffset?: BaseOptions['lineOffset'] | undefined;
|
||||
columnOffset?: BaseOptions['columnOffset'] | undefined;
|
||||
/**
|
||||
* Called during evaluation of this module to initialize the `import.meta`.
|
||||
*/
|
||||
initializeImportMeta?: ((meta: ImportMeta, module: SourceTextModule) => void) | undefined;
|
||||
importModuleDynamically?: ScriptOptions['importModuleDynamically'] | undefined;
|
||||
}
|
||||
class SourceTextModule extends Module {
|
||||
/**
|
||||
* Creates a new `SourceTextModule` instance.
|
||||
* @param code JavaScript Module code to parse
|
||||
*/
|
||||
constructor(code: string, options?: SourceTextModuleOptions);
|
||||
}
|
||||
|
||||
interface SyntheticModuleOptions {
|
||||
/**
|
||||
* String used in stack traces.
|
||||
* @default 'vm:module(i)' where i is a context-specific ascending index.
|
||||
*/
|
||||
identifier?: string | undefined;
|
||||
/**
|
||||
* The contextified object as returned by the `vm.createContext()` method, to compile and evaluate this module in.
|
||||
*/
|
||||
context?: Context | undefined;
|
||||
}
|
||||
class SyntheticModule extends Module {
|
||||
/**
|
||||
* Creates a new `SyntheticModule` instance.
|
||||
* @param exportNames Array of names that will be exported from the module.
|
||||
* @param evaluateCallback Called when the module is evaluated.
|
||||
*/
|
||||
constructor(exportNames: string[], evaluateCallback: (this: SyntheticModule) => void, options?: SyntheticModuleOptions);
|
||||
/**
|
||||
* This method is used after the module is linked to set the values of exports.
|
||||
* If it is called before the module is linked, an `ERR_VM_MODULE_STATUS` error will be thrown.
|
||||
* @param name
|
||||
* @param value
|
||||
*/
|
||||
setExport(name: string, value: any): void;
|
||||
}
|
||||
}
|
||||
declare module 'node:vm' {
|
||||
export * from 'vm';
|
||||
|
|
32
node_modules/@types/which/README.md
generated
vendored
32
node_modules/@types/which/README.md
generated
vendored
|
@ -1,16 +1,16 @@
|
|||
# Installation
|
||||
> `npm install --save @types/which`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for which (https://github.com/isaacs/node-which).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/which.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Fri, 02 Jul 2021 18:05:37 GMT
|
||||
* Dependencies: none
|
||||
* Global values: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [vvakame](https://github.com/vvakame), [cspotcode](https://github.com/cspotcode), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
|
||||
# Installation
|
||||
> `npm install --save @types/which`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for which (https://github.com/isaacs/node-which).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/which.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 14 Feb 2023 10:32:35 GMT
|
||||
* Dependencies: none
|
||||
* Global values: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [vvakame](https://github.com/vvakame), [cspotcode](https://github.com/cspotcode), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
|
||||
|
|
10
node_modules/@types/which/index.d.ts
generated
vendored
10
node_modules/@types/which/index.d.ts
generated
vendored
|
@ -8,22 +8,22 @@
|
|||
/** Finds all instances of a specified executable in the PATH environment variable */
|
||||
declare function which(
|
||||
cmd: string,
|
||||
options: which.AsyncOptions & which.OptionsAll,
|
||||
options: which.Options & which.AsyncOptions & which.OptionsAll,
|
||||
cb: (err: Error | null, paths: ReadonlyArray<string> | undefined) => void,
|
||||
): void;
|
||||
declare function which(
|
||||
cmd: string,
|
||||
options: which.AsyncOptions & which.OptionsFirst,
|
||||
options: which.Options & which.AsyncOptions & which.OptionsFirst,
|
||||
cb: (err: Error | null, path: string | undefined) => void,
|
||||
): void;
|
||||
declare function which(
|
||||
cmd: string,
|
||||
options: which.AsyncOptions,
|
||||
options: which.Options & which.AsyncOptions,
|
||||
cb: (err: Error | null, path: string | ReadonlyArray<string> | undefined) => void,
|
||||
): void;
|
||||
declare function which(cmd: string, cb: (err: Error | null, path: string | undefined) => void): void;
|
||||
declare function which(cmd: string, options: which.AsyncOptions & which.OptionsAll): Promise<string[]>;
|
||||
declare function which(cmd: string, options?: which.AsyncOptions & which.OptionsFirst): Promise<string>;
|
||||
declare function which(cmd: string, options: which.Options & which.AsyncOptions & which.OptionsAll): Promise<string[]>;
|
||||
declare function which(cmd: string, options?: which.Options & which.AsyncOptions & which.OptionsFirst): Promise<string>;
|
||||
|
||||
declare namespace which {
|
||||
/** Finds all instances of a specified executable in the PATH environment variable */
|
||||
|
|
6
node_modules/@types/which/package.json
generated
vendored
6
node_modules/@types/which/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@types/which",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"description": "TypeScript definitions for which",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/which",
|
||||
"license": "MIT",
|
||||
|
@ -30,6 +30,6 @@
|
|||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "b70db9efe60b94c4178ccefc342ca6a90ad08c44cb5a3bd77922b2768a452c52",
|
||||
"typeScriptVersion": "3.6"
|
||||
"typesPublisherContentHash": "bb030e810883f6391704f6dba53e9fc0bb1b782bdbd6ba24719d196e92745b1e",
|
||||
"typeScriptVersion": "4.2"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue