mirror of
https://github.com/imranismail/setup-kustomize.git
synced 2026-06-13 01:14:19 +00:00
Update metadata
This commit is contained in:
6
node_modules/@types/babel__core/README.md
generated
vendored
6
node_modules/@types/babel__core/README.md
generated
vendored
@@ -2,15 +2,15 @@
|
||||
> `npm install --save @types/babel__core`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for @babel/core ( https://github.com/babel/babel/tree/master/packages/babel-core ).
|
||||
This package contains type definitions for @babel/core (https://github.com/babel/babel/tree/master/packages/babel-core).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__core
|
||||
|
||||
Additional Details
|
||||
* Last updated: Wed, 15 May 2019 16:25:45 GMT
|
||||
* Last updated: Wed, 04 Sep 2019 17:40:11 GMT
|
||||
* Dependencies: @types/babel__generator, @types/babel__traverse, @types/babel__template, @types/babel__types, @types/babel__parser
|
||||
* Global values: babel
|
||||
|
||||
# Credits
|
||||
These definitions were written by Troy Gerwien <https://github.com/yortus>, Marvin Hagemeister <https://github.com/marvinhagemeister>, Melvin Groenhoff <https://github.com/mgroenhoff>, Jessica Franco <https://github.com/Jessidhia>.
|
||||
These definitions were written by Troy Gerwien <https://github.com/yortus>, Marvin Hagemeister <https://github.com/marvinhagemeister>, Melvin Groenhoff <https://github.com/mgroenhoff>, and Jessica Franco <https://github.com/Jessidhia>.
|
||||
|
||||
3
node_modules/@types/babel__core/index.d.ts
generated
vendored
3
node_modules/@types/babel__core/index.d.ts
generated
vendored
@@ -544,6 +544,9 @@ export type PluginTarget = string | object | ((...args: any[]) => any);
|
||||
|
||||
export type PluginItem = ConfigItem | PluginObj<any> | PluginTarget | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | undefined];
|
||||
|
||||
export function resolvePlugin(name: string, dirname: string): string | null;
|
||||
export function resolvePreset(name: string, dirname: string): string | null;
|
||||
|
||||
export interface CreateConfigItemOptions {
|
||||
dirname?: string;
|
||||
type?: "preset" | "plugin";
|
||||
|
||||
34
node_modules/@types/babel__core/package.json
generated
vendored
34
node_modules/@types/babel__core/package.json
generated
vendored
@@ -1,37 +1,32 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@types/babel__core@7.1.2",
|
||||
"/Users/imranismail/Projects/setup-kustomize"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@types/babel__core@7.1.2",
|
||||
"_id": "@types/babel__core@7.1.2",
|
||||
"_from": "@types/babel__core@^7.1.0",
|
||||
"_id": "@types/babel__core@7.1.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-cfCCrFmiGY/yq0NuKNxIQvZFy9kY/1immpSpTngOnyIbD4+eJOG5mxphhHDv3CHL9GltO4GcKr54kGBg3RNdbg==",
|
||||
"_integrity": "sha512-8fBo0UR2CcwWxeX7WIIgJ7lXjasFxoYgRnFHUj+hRvKkpiBJbxhdAPTCY6/ZKM0uxANFVzt4yObSLuTiTnazDA==",
|
||||
"_location": "/@types/babel__core",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "@types/babel__core@7.1.2",
|
||||
"raw": "@types/babel__core@^7.1.0",
|
||||
"name": "@types/babel__core",
|
||||
"escapedName": "@types%2fbabel__core",
|
||||
"scope": "@types",
|
||||
"rawSpec": "7.1.2",
|
||||
"rawSpec": "^7.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "7.1.2"
|
||||
"fetchSpec": "^7.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/babel-jest"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.2.tgz",
|
||||
"_spec": "7.1.2",
|
||||
"_where": "/Users/imranismail/Projects/setup-kustomize",
|
||||
"_resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.3.tgz",
|
||||
"_shasum": "e441ea7df63cd080dfcd02ab199e6d16a735fc30",
|
||||
"_spec": "@types/babel__core@^7.1.0",
|
||||
"_where": "/Users/imranismail/Projects/setup-kustomize/node_modules/babel-jest",
|
||||
"bugs": {
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Troy Gerwien",
|
||||
@@ -57,6 +52,7 @@
|
||||
"@types/babel__template": "*",
|
||||
"@types/babel__traverse": "*"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "TypeScript definitions for @babel/core",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
|
||||
"license": "MIT",
|
||||
@@ -70,6 +66,6 @@
|
||||
"scripts": {},
|
||||
"typeScriptVersion": "2.9",
|
||||
"types": "index",
|
||||
"typesPublisherContentHash": "8ddbc9ecfefbb1a61ece46d6e48876a63d101c6c5291bb173a929cead248d6a2",
|
||||
"version": "7.1.2"
|
||||
"typesPublisherContentHash": "478fc636b3b91d2d8148bbc98176f96231386926f4af91893dbe95d3812775a5",
|
||||
"version": "7.1.3"
|
||||
}
|
||||
|
||||
6
node_modules/@types/babel__generator/README.md
generated
vendored
6
node_modules/@types/babel__generator/README.md
generated
vendored
@@ -2,15 +2,15 @@
|
||||
> `npm install --save @types/babel__generator`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for @babel/generator ( https://github.com/babel/babel/tree/master/packages/babel-generator ).
|
||||
This package contains type definitions for @babel/generator (https://github.com/babel/babel/tree/master/packages/babel-generator).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__generator
|
||||
|
||||
Additional Details
|
||||
* Last updated: Wed, 13 Feb 2019 21:04:23 GMT
|
||||
* Last updated: Tue, 24 Sep 2019 17:18:01 GMT
|
||||
* Dependencies: @types/babel__types
|
||||
* Global values: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by Troy Gerwien <https://github.com/yortus>, Johnny Estilles <https://github.com/johnnyestilles>, Melvin Groenhoff <https://github.com/mgroenhoff>.
|
||||
These definitions were written by Troy Gerwien <https://github.com/yortus>, Johnny Estilles <https://github.com/johnnyestilles>, Melvin Groenhoff <https://github.com/mgroenhoff>, and Cameron Yan <https://github.com/khell>.
|
||||
|
||||
51
node_modules/@types/babel__generator/index.d.ts
generated
vendored
51
node_modules/@types/babel__generator/index.d.ts
generated
vendored
@@ -1,12 +1,13 @@
|
||||
// Type definitions for @babel/generator 7.0
|
||||
// Type definitions for @babel/generator 7.6
|
||||
// Project: https://github.com/babel/babel/tree/master/packages/babel-generator, https://babeljs.io
|
||||
// Definitions by: Troy Gerwien <https://github.com/yortus>
|
||||
// Johnny Estilles <https://github.com/johnnyestilles>
|
||||
// Melvin Groenhoff <https://github.com/mgroenhoff>
|
||||
// Cameron Yan <https://github.com/khell>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.9
|
||||
|
||||
import * as t from "@babel/types";
|
||||
import * as t from '@babel/types';
|
||||
|
||||
export interface GeneratorOptions {
|
||||
/**
|
||||
@@ -32,6 +33,12 @@ export interface GeneratorOptions {
|
||||
*/
|
||||
retainLines?: boolean;
|
||||
|
||||
/**
|
||||
* Retain parens around function expressions (could be used to change engine parsing behavior)
|
||||
* Defaults to `false`.
|
||||
*/
|
||||
retainFunctionParens?: boolean;
|
||||
|
||||
/**
|
||||
* Should comments be included in output? Defaults to `true`.
|
||||
*/
|
||||
@@ -40,7 +47,7 @@ export interface GeneratorOptions {
|
||||
/**
|
||||
* Set to true to avoid adding whitespace for formatting. Defaults to the value of `opts.minified`.
|
||||
*/
|
||||
compact?: boolean | "auto";
|
||||
compact?: boolean | 'auto';
|
||||
|
||||
/**
|
||||
* Should the output be minified. Defaults to `false`.
|
||||
@@ -52,11 +59,6 @@ export interface GeneratorOptions {
|
||||
*/
|
||||
concise?: boolean;
|
||||
|
||||
/**
|
||||
* The type of quote to use in the output. If omitted, autodetects based on `ast.tokens`.
|
||||
*/
|
||||
quotes?: "single" | "double";
|
||||
|
||||
/**
|
||||
* Used in warning messages
|
||||
*/
|
||||
@@ -67,11 +69,6 @@ export interface GeneratorOptions {
|
||||
*/
|
||||
sourceMaps?: boolean;
|
||||
|
||||
/**
|
||||
* The filename of the generated code that the source map will be associated with.
|
||||
*/
|
||||
sourceMapTarget?: string;
|
||||
|
||||
/**
|
||||
* A root for all relative URLs in the source map.
|
||||
*/
|
||||
@@ -87,6 +84,28 @@ export interface GeneratorOptions {
|
||||
* Set to true to run jsesc with "json": true to print "\u00A9" vs. "©";
|
||||
*/
|
||||
jsonCompatibleStrings?: boolean;
|
||||
|
||||
/**
|
||||
* Set to true to enable support for experimental decorators syntax before module exports.
|
||||
* Defaults to `false`.
|
||||
*/
|
||||
decoratorsBeforeExport?: boolean;
|
||||
|
||||
/**
|
||||
* Options for outputting jsesc representation.
|
||||
*/
|
||||
jsescOption?: {
|
||||
/**
|
||||
* The type of quote to use in the output. If omitted, autodetects based on `ast.tokens`.
|
||||
*/
|
||||
quotes?: 'single' | 'double';
|
||||
|
||||
/**
|
||||
* When enabled, the output is a valid JavaScript string literal wrapped in quotes. The type of quotes can be specified through the quotes setting.
|
||||
* Defaults to `true`.
|
||||
*/
|
||||
wrap?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export class CodeGenerator {
|
||||
@@ -101,7 +120,11 @@ export class CodeGenerator {
|
||||
* @param code - the original source code, used for source maps.
|
||||
* @returns - an object containing the output code and source map.
|
||||
*/
|
||||
export default function generate(ast: t.Node, opts?: GeneratorOptions, code?: string | { [filename: string]: string; }): GeneratorResult;
|
||||
export default function generate(
|
||||
ast: t.Node,
|
||||
opts?: GeneratorOptions,
|
||||
code?: string | { [filename: string]: string },
|
||||
): GeneratorResult;
|
||||
|
||||
export interface GeneratorResult {
|
||||
code: string;
|
||||
|
||||
41
node_modules/@types/babel__generator/package.json
generated
vendored
41
node_modules/@types/babel__generator/package.json
generated
vendored
@@ -1,37 +1,32 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@types/babel__generator@7.0.2",
|
||||
"/Users/imranismail/Projects/setup-kustomize"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@types/babel__generator@7.0.2",
|
||||
"_id": "@types/babel__generator@7.0.2",
|
||||
"_from": "@types/babel__generator@*",
|
||||
"_id": "@types/babel__generator@7.6.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-NHcOfab3Zw4q5sEE2COkpfXjoE7o+PmqD9DQW4koUT3roNxwziUdXGnRndMat/LJNUtePwn1TlP4do3uoe3KZQ==",
|
||||
"_integrity": "sha512-c1mZUu4up5cp9KROs/QAw0gTeHrw/x7m52LcnvMxxOZ03DmLwPV0MlGmlgzV3cnSdjhJOZsj7E7FHeioai+egw==",
|
||||
"_location": "/@types/babel__generator",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "@types/babel__generator@7.0.2",
|
||||
"raw": "@types/babel__generator@*",
|
||||
"name": "@types/babel__generator",
|
||||
"escapedName": "@types%2fbabel__generator",
|
||||
"scope": "@types",
|
||||
"rawSpec": "7.0.2",
|
||||
"rawSpec": "*",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "7.0.2"
|
||||
"fetchSpec": "*"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@types/babel__core"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.0.2.tgz",
|
||||
"_spec": "7.0.2",
|
||||
"_where": "/Users/imranismail/Projects/setup-kustomize",
|
||||
"_resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.0.tgz",
|
||||
"_shasum": "f1ec1c104d1bb463556ecb724018ab788d0c172a",
|
||||
"_spec": "@types/babel__generator@*",
|
||||
"_where": "/Users/imranismail/Projects/setup-kustomize/node_modules/@types/babel__core",
|
||||
"bugs": {
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Troy Gerwien",
|
||||
@@ -44,11 +39,16 @@
|
||||
{
|
||||
"name": "Melvin Groenhoff",
|
||||
"url": "https://github.com/mgroenhoff"
|
||||
},
|
||||
{
|
||||
"name": "Cameron Yan",
|
||||
"url": "https://github.com/khell"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "TypeScript definitions for @babel/generator",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
|
||||
"license": "MIT",
|
||||
@@ -56,11 +56,12 @@
|
||||
"name": "@types/babel__generator",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git"
|
||||
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/babel__generator"
|
||||
},
|
||||
"scripts": {},
|
||||
"typeScriptVersion": "2.9",
|
||||
"types": "index",
|
||||
"typesPublisherContentHash": "12b47650c77333060b8da231a33c95326cb124929b12d19cd41d9c2dae936d80",
|
||||
"version": "7.0.2"
|
||||
"typesPublisherContentHash": "dfa67637cd47499ff534300526632280d98604e8587e28d1e8a38c371a7e33ca",
|
||||
"version": "7.6.0"
|
||||
}
|
||||
|
||||
4
node_modules/@types/jest/README.md
generated
vendored
4
node_modules/@types/jest/README.md
generated
vendored
@@ -8,10 +8,10 @@ This package contains type definitions for Jest (https://jestjs.io/).
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest
|
||||
|
||||
Additional Details
|
||||
* Last updated: Mon, 29 Jul 2019 22:58:09 GMT
|
||||
* Last updated: Tue, 05 Nov 2019 21:34:08 GMT
|
||||
* Dependencies: @types/jest-diff
|
||||
* Global values: afterAll, afterEach, beforeAll, beforeEach, describe, expect, fail, fdescribe, fit, it, jasmine, jest, pending, spyOn, test, xdescribe, xit, xtest
|
||||
|
||||
# Credits
|
||||
These definitions were written by Asana (https://asana.com)
|
||||
// Ivo Stratev <https://github.com/NoHomey>, jwbay <https://github.com/jwbay>, Alexey Svetliakov <https://github.com/asvetliakov>, Alex Jover Morales <https://github.com/alexjoverm>, Allan Lukwago <https://github.com/epicallan>, Ika <https://github.com/ikatyang>, Waseem Dahman <https://github.com/wsmd>, Jamie Mason <https://github.com/JamieMason>, Douglas Duteil <https://github.com/douglasduteil>, Ahn <https://github.com/ahnpnl>, Josh Goldberg <https://github.com/joshuakgoldberg>, Jeff Lau <https://github.com/UselessPickles>, Andrew Makarov <https://github.com/r3nya>, Martin Hochel <https://github.com/hotell>, Sebastian Sebald <https://github.com/sebald>, Andy <https://github.com/andys8>, Antoine Brault <https://github.com/antoinebrault>, Jeroen Claassens <https://github.com/favna>, Gregor Stamać <https://github.com/gstamac>, ExE Boss <https://github.com/ExE-Boss>, and Alex Bolenok <https://github.com/quassnoi>.
|
||||
// Ivo Stratev <https://github.com/NoHomey>, jwbay <https://github.com/jwbay>, Alexey Svetliakov <https://github.com/asvetliakov>, Alex Jover Morales <https://github.com/alexjoverm>, Allan Lukwago <https://github.com/epicallan>, Ika <https://github.com/ikatyang>, Waseem Dahman <https://github.com/wsmd>, Jamie Mason <https://github.com/JamieMason>, Douglas Duteil <https://github.com/douglasduteil>, Ahn <https://github.com/ahnpnl>, Josh Goldberg <https://github.com/joshuakgoldberg>, Jeff Lau <https://github.com/UselessPickles>, Andrew Makarov <https://github.com/r3nya>, Martin Hochel <https://github.com/hotell>, Sebastian Sebald <https://github.com/sebald>, Andy <https://github.com/andys8>, Antoine Brault <https://github.com/antoinebrault>, Jeroen Claassens <https://github.com/favna>, Gregor Stamać <https://github.com/gstamac>, ExE Boss <https://github.com/ExE-Boss>, Alex Bolenok <https://github.com/quassnoi>, Mario Beltrán Alarcón <https://github.com/Belco90>, Tony Hallett <https://github.com/tonyhallett>, and Jason Yu <https://github.com/ycmjason>.
|
||||
|
||||
349
node_modules/@types/jest/index.d.ts
generated
vendored
349
node_modules/@types/jest/index.d.ts
generated
vendored
@@ -22,6 +22,9 @@
|
||||
// Gregor Stamać <https://github.com/gstamac>
|
||||
// ExE Boss <https://github.com/ExE-Boss>
|
||||
// Alex Bolenok <https://github.com/quassnoi>
|
||||
// Mario Beltrán Alarcón <https://github.com/Belco90>
|
||||
// Tony Hallett <https://github.com/tonyhallett>
|
||||
// Jason Yu <https://github.com/ycmjason>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.0
|
||||
|
||||
@@ -42,6 +45,32 @@ declare var xtest: jest.It;
|
||||
|
||||
declare const expect: jest.Expect;
|
||||
|
||||
type ExtractEachCallbackArgs<T extends ReadonlyArray<any>> = {
|
||||
1: [T[0]],
|
||||
2: [T[0], T[1]],
|
||||
3: [T[0], T[1], T[2]],
|
||||
4: [T[0], T[1], T[2], T[3]],
|
||||
5: [T[0], T[1], T[2], T[3], T[4]],
|
||||
6: [T[0], T[1], T[2], T[3], T[4], T[5]],
|
||||
7: [T[0], T[1], T[2], T[3], T[4], T[5], T[6]],
|
||||
8: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7]],
|
||||
9: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7], T[8]],
|
||||
10: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7], T[8], T[9]],
|
||||
'fallback': Array<(T extends ReadonlyArray<infer U>? U: any)>
|
||||
}[
|
||||
T extends Readonly<[any]> ? 1
|
||||
: T extends Readonly<[any, any]> ? 2
|
||||
: T extends Readonly<[any, any, any]> ? 3
|
||||
: T extends Readonly<[any, any, any, any]> ? 4
|
||||
: T extends Readonly<[any, any, any, any, any]> ? 5
|
||||
: T extends Readonly<[any, any, any, any, any, any]> ? 6
|
||||
: T extends Readonly<[any, any, any, any, any, any, any]> ? 7
|
||||
: T extends Readonly<[any, any, any, any, any, any, any, any]> ? 8
|
||||
: T extends Readonly<[any, any, any, any, any, any, any, any, any]> ? 9
|
||||
: T extends Readonly<[any, any, any, any, any, any, any, any, any, any]> ? 10
|
||||
: 'fallback'
|
||||
];
|
||||
|
||||
interface NodeRequire {
|
||||
/**
|
||||
* Returns the actual module instead of a mock, bypassing all checks on
|
||||
@@ -96,6 +125,10 @@ declare namespace jest {
|
||||
* to execute in the future.
|
||||
*/
|
||||
function clearAllTimers(): typeof jest;
|
||||
/**
|
||||
* Returns the number of fake timers still left to run.
|
||||
*/
|
||||
function getTimerCount(): number;
|
||||
/**
|
||||
* Indicates that the module system should never return a mocked version
|
||||
* of the specified module, including all of the specificied module's dependencies.
|
||||
@@ -198,6 +231,12 @@ declare namespace jest {
|
||||
* will be executed.
|
||||
*/
|
||||
function advanceTimersByTime(msToRun: number): typeof jest;
|
||||
/**
|
||||
* Advances all timers by the needed milliseconds so that only the next
|
||||
* timeouts/intervals will run. Optionally, you can provide steps, so it
|
||||
* will run steps amount of next timeouts/intervals.
|
||||
*/
|
||||
function advanceTimersToNextTimer(step?: number): void;
|
||||
/**
|
||||
* Explicitly supplies the mock object that the module system should return
|
||||
* for the specified module.
|
||||
@@ -289,6 +328,7 @@ declare namespace jest {
|
||||
interface Each {
|
||||
// Exclusively arrays.
|
||||
<T extends any[]>(cases: ReadonlyArray<T>): (name: string, fn: (...args: T) => any, timeout?: number) => void;
|
||||
<T extends ReadonlyArray<any>>(cases: ReadonlyArray<T>): (name: string, fn: (...args: ExtractEachCallbackArgs<T>) => any, timeout?: number) => void;
|
||||
// Not arrays.
|
||||
<T>(cases: ReadonlyArray<T>): (name: string, fn: (...args: T[]) => any, timeout?: number) => void;
|
||||
(cases: ReadonlyArray<ReadonlyArray<any>>): (
|
||||
@@ -384,52 +424,107 @@ declare namespace jest {
|
||||
each: Each;
|
||||
}
|
||||
|
||||
type PrintLabel = (string: string) => string;
|
||||
|
||||
type MatcherHintColor = (arg: string) => string;
|
||||
|
||||
interface MatcherHintOptions {
|
||||
comment?: string;
|
||||
expectedColor?: MatcherHintColor;
|
||||
isDirectExpectCall?: boolean;
|
||||
isNot?: boolean;
|
||||
promise?: string;
|
||||
receivedColor?: MatcherHintColor;
|
||||
secondArgument?: string;
|
||||
secondArgumentColor?: MatcherHintColor;
|
||||
}
|
||||
|
||||
interface ChalkFunction {
|
||||
(text: TemplateStringsArray, ...placeholders: any[]): string;
|
||||
(...text: any[]): string;
|
||||
}
|
||||
|
||||
interface ChalkColorSupport {
|
||||
level: 0 | 1 | 2 | 3;
|
||||
hasBasic: boolean;
|
||||
has256: boolean;
|
||||
has16m: boolean;
|
||||
}
|
||||
|
||||
type MatcherColorFn = ChalkFunction & { supportsColor: ChalkColorSupport };
|
||||
|
||||
type EqualityTester = (a: any, b: any) => boolean | undefined;
|
||||
|
||||
interface MatcherUtils {
|
||||
readonly expand: boolean;
|
||||
readonly isNot: boolean;
|
||||
readonly dontThrow: () => void;
|
||||
readonly promise: string;
|
||||
readonly assertionCalls: number;
|
||||
readonly expectedAssertionsNumber: number | null;
|
||||
readonly isExpectingAssertions: boolean;
|
||||
readonly suppressedErrors: any[];
|
||||
readonly expand: boolean;
|
||||
readonly testPath: string;
|
||||
readonly currentTestName: string;
|
||||
utils: {
|
||||
readonly EXPECTED_COLOR: (text: string) => string;
|
||||
readonly RECEIVED_COLOR: (text: string) => string;
|
||||
diff: typeof import('jest-diff');
|
||||
ensureActualIsNumber(actual: any, matcherName?: string): void;
|
||||
ensureExpectedIsNumber(actual: any, matcherName?: string): void;
|
||||
ensureNoExpected(actual: any, matcherName?: string): void;
|
||||
ensureNumbers(actual: any, expected: any, matcherName?: string): void;
|
||||
/**
|
||||
* get the type of a value with handling of edge cases like `typeof []` and `typeof null`
|
||||
*/
|
||||
getType(value: any): string;
|
||||
readonly EXPECTED_COLOR: MatcherColorFn;
|
||||
readonly RECEIVED_COLOR: MatcherColorFn;
|
||||
readonly INVERTED_COLOR: MatcherColorFn;
|
||||
readonly BOLD_WEIGHT: MatcherColorFn;
|
||||
readonly DIM_COLOR: MatcherColorFn;
|
||||
readonly SUGGEST_TO_CONTAIN_EQUAL: string;
|
||||
diff(a: any, b: any, options?: import("jest-diff").DiffOptions): string | null;
|
||||
ensureActualIsNumber(actual: any, matcherName: string, options?: MatcherHintOptions): void;
|
||||
ensureExpectedIsNumber(actual: any, matcherName: string, options?: MatcherHintOptions): void;
|
||||
ensureNoExpected(actual: any, matcherName: string, options?: MatcherHintOptions): void;
|
||||
ensureNumbers(actual: any, expected: any, matcherName: string, options?: MatcherHintOptions): void;
|
||||
ensureExpectedIsNonNegativeInteger(expected: any, matcherName: string, options?: MatcherHintOptions): void;
|
||||
matcherHint(
|
||||
matcherName: string,
|
||||
received?: string,
|
||||
expected?: string,
|
||||
options?: { secondArgument?: string; isDirectExpectCall?: boolean }
|
||||
options?: MatcherHintOptions
|
||||
): string;
|
||||
matcherErrorMessage(
|
||||
hint: string,
|
||||
generic: string,
|
||||
specific: string
|
||||
): string;
|
||||
pluralize(word: string, count: number): string;
|
||||
printReceived(object: any): string;
|
||||
printExpected(value: any): string;
|
||||
printReceived(value: any): string;
|
||||
printWithType(name: string, received: any, print: (value: any) => string): string;
|
||||
printWithType(name: string, value: any, print: (value: any) => string): string;
|
||||
stringify(object: {}, maxDepth?: number): string;
|
||||
highlightTrailingWhitespace(text: string): string;
|
||||
|
||||
printDiffOrStringify(expected: any, received: any, expectedLabel: string, receivedLabel: string, expand: boolean): string;
|
||||
|
||||
getLabelPrinter(...strings: string[]): PrintLabel;
|
||||
|
||||
iterableEquality: EqualityTester;
|
||||
subsetEquality: EqualityTester;
|
||||
};
|
||||
/**
|
||||
* This is a deep-equality function that will return true if two objects have the same values (recursively).
|
||||
*/
|
||||
equals(a: any, b: any): boolean;
|
||||
equals(a: any, b: any, customTesters?: EqualityTester[], strictCheck?: boolean): boolean;
|
||||
[other: string]: any;
|
||||
}
|
||||
|
||||
interface ExpectExtendMap {
|
||||
[key: string]: CustomMatcher;
|
||||
}
|
||||
|
||||
type MatcherContext = MatcherUtils & Readonly<MatcherState>;
|
||||
type CustomMatcher = (
|
||||
this: MatcherUtils,
|
||||
this: MatcherContext,
|
||||
received: any,
|
||||
...actual: any[]
|
||||
) => CustomMatcherResult | Promise<CustomMatcherResult>;
|
||||
|
||||
interface CustomMatcherResult {
|
||||
pass: boolean;
|
||||
message: string | (() => string);
|
||||
message: () => string;
|
||||
}
|
||||
|
||||
interface SnapshotSerializerOptions {
|
||||
@@ -482,16 +577,21 @@ declare namespace jest {
|
||||
* does not contain all of the elements in the expected array. That is,
|
||||
* the expected array is not a subset of the received array. It is the
|
||||
* inverse of `expect.arrayContaining`.
|
||||
*
|
||||
* Optionally, you can provide a type for the elements via a generic.
|
||||
*/
|
||||
arrayContaining(arr: any[]): any;
|
||||
arrayContaining<E = any>(arr: E[]): any;
|
||||
/**
|
||||
* `expect.not.objectContaining(object)` matches any received object
|
||||
* that does not recursively match the expected properties. That is, the
|
||||
* expected object is not a subset of the received object. Therefore,
|
||||
* it matches a received object which contains properties that are not
|
||||
* in the expected object. It is the inverse of `expect.objectContaining`.
|
||||
*
|
||||
* Optionally, you can provide a type for the object via a generic.
|
||||
* This ensures that the object contains the desired structure.
|
||||
*/
|
||||
objectContaining(obj: {}): any;
|
||||
objectContaining<E = {}>(obj: E): any;
|
||||
/**
|
||||
* `expect.not.stringMatching(string | regexp)` matches the received
|
||||
* string that does not match the expected regexp. It is the inverse of
|
||||
@@ -505,7 +605,15 @@ declare namespace jest {
|
||||
*/
|
||||
stringContaining(str: string): any;
|
||||
}
|
||||
|
||||
interface MatcherState {
|
||||
assertionCalls: number;
|
||||
currentTestName: string;
|
||||
expand: boolean;
|
||||
expectedAssertionsNumber: number;
|
||||
isExpectingAssertions?: boolean;
|
||||
suppressedErrors: Error[];
|
||||
testPath: string;
|
||||
}
|
||||
/**
|
||||
* The `expect` function is used every time you want to test a value.
|
||||
* You will rarely call `expect` by itself.
|
||||
@@ -517,7 +625,7 @@ declare namespace jest {
|
||||
*
|
||||
* @param actual The value to apply matchers against.
|
||||
*/
|
||||
<T = any>(actual: T): Matchers<T>;
|
||||
<T = any>(actual: T): JestMatchers<T>;
|
||||
/**
|
||||
* Matches anything but null or undefined. You can use it inside `toEqual` or `toBeCalledWith` instead
|
||||
* of a literal value. For example, if you want to check that a mock function is called with a
|
||||
@@ -553,8 +661,10 @@ declare namespace jest {
|
||||
/**
|
||||
* Matches any array made up entirely of elements in the provided array.
|
||||
* You can use it inside `toEqual` or `toBeCalledWith` instead of a literal value.
|
||||
*
|
||||
* Optionally, you can provide a type for the elements via a generic.
|
||||
*/
|
||||
arrayContaining(arr: any[]): any;
|
||||
arrayContaining<E = any>(arr: E[]): any;
|
||||
/**
|
||||
* Verifies that a certain number of assertions are called during a test.
|
||||
* This is often useful when testing asynchronous code, in order to
|
||||
@@ -578,8 +688,11 @@ declare namespace jest {
|
||||
/**
|
||||
* Matches any object that recursively matches the provided keys.
|
||||
* This is often handy in conjunction with other asymmetric matchers.
|
||||
*
|
||||
* Optionally, you can provide a type for the object via a generic.
|
||||
* This ensures that the object contains the desired structure.
|
||||
*/
|
||||
objectContaining(obj: {}): any;
|
||||
objectContaining<E = {}>(obj: E): any;
|
||||
/**
|
||||
* Matches any string that contains the exact provided string
|
||||
*/
|
||||
@@ -590,44 +703,66 @@ declare namespace jest {
|
||||
stringContaining(str: string): any;
|
||||
|
||||
not: InverseAsymmetricMatchers;
|
||||
|
||||
setState(state: object): void;
|
||||
getState(): MatcherState & Record<string, any>;
|
||||
}
|
||||
|
||||
interface Matchers<R> {
|
||||
/**
|
||||
* Ensures the last call to a mock function was provided specific args.
|
||||
*/
|
||||
lastCalledWith(...args: any[]): R;
|
||||
/**
|
||||
* Ensure that the last call to a mock function has returned a specified value.
|
||||
*/
|
||||
lastReturnedWith(value: any): R;
|
||||
/**
|
||||
* If you know how to test something, `.not` lets you test its opposite.
|
||||
*/
|
||||
not: Matchers<R>;
|
||||
/**
|
||||
* Ensure that a mock function is called with specific arguments on an Nth call.
|
||||
*/
|
||||
nthCalledWith(nthCall: number, ...params: any[]): R;
|
||||
/**
|
||||
* Ensure that the nth call to a mock function has returned a specified value.
|
||||
*/
|
||||
nthReturnedWith(n: number, value: any): R;
|
||||
type JestMatchers<T> = JestMatchersShape<Matchers<void, T>, Matchers<Promise<void>, T>>;
|
||||
|
||||
type JestMatchersShape<TNonPromise extends {} = {}, TPromise extends {} = {}> = {
|
||||
/**
|
||||
* Use resolves to unwrap the value of a fulfilled promise so any other
|
||||
* matcher can be chained. If the promise is rejected the assertion fails.
|
||||
*/
|
||||
resolves: Matchers<Promise<R>>;
|
||||
resolves: AndNot<TPromise>,
|
||||
/**
|
||||
* Unwraps the reason of a rejected promise so any other matcher can be chained.
|
||||
* If the promise is fulfilled the assertion fails.
|
||||
*/
|
||||
rejects: Matchers<Promise<R>>;
|
||||
rejects: AndNot<TPromise>
|
||||
} & AndNot<TNonPromise>;
|
||||
type AndNot<T> = T & {
|
||||
not: T
|
||||
};
|
||||
// should be R extends void|Promise<void> but getting dtslint error
|
||||
interface Matchers<R, T> {
|
||||
/**
|
||||
* Ensures the last call to a mock function was provided specific args.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected arguments via a generic.
|
||||
* Note that the type must be either an array or a tuple.
|
||||
*/
|
||||
lastCalledWith<E extends any[]>(...args: E): R;
|
||||
/**
|
||||
* Ensure that the last call to a mock function has returned a specified value.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected value via a generic.
|
||||
* This is particuarly useful for ensuring expected objects have the right structure.
|
||||
*/
|
||||
lastReturnedWith<E = any>(value: E): R;
|
||||
/**
|
||||
* Ensure that a mock function is called with specific arguments on an Nth call.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected arguments via a generic.
|
||||
* Note that the type must be either an array or a tuple.
|
||||
*/
|
||||
nthCalledWith<E extends any[]>(nthCall: number, ...params: E): R;
|
||||
/**
|
||||
* Ensure that the nth call to a mock function has returned a specified value.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected value via a generic.
|
||||
* This is particuarly useful for ensuring expected objects have the right structure.
|
||||
*/
|
||||
nthReturnedWith<E = any>(n: number, value: E): R;
|
||||
/**
|
||||
* Checks that a value is what you expect. It uses `===` to check strict equality.
|
||||
* Don't use `toBe` with floating-point numbers.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected value via a generic.
|
||||
* This is particuarly useful for ensuring expected objects have the right structure.
|
||||
*/
|
||||
toBe(expected: any): R;
|
||||
toBe<E = any>(expected: E): R;
|
||||
/**
|
||||
* Ensures that a mock function is called.
|
||||
*/
|
||||
@@ -638,8 +773,11 @@ declare namespace jest {
|
||||
toBeCalledTimes(expected: number): R;
|
||||
/**
|
||||
* Ensure that a mock function is called with specific arguments.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected arguments via a generic.
|
||||
* Note that the type must be either an array or a tuple.
|
||||
*/
|
||||
toBeCalledWith(...args: any[]): R;
|
||||
toBeCalledWith<E extends any[]>(...args: E): R;
|
||||
/**
|
||||
* Using exact equality with floating point numbers is a bad idea.
|
||||
* Rounding means that intuitive things fail.
|
||||
@@ -666,8 +804,11 @@ declare namespace jest {
|
||||
/**
|
||||
* Ensure that an object is an instance of a class.
|
||||
* This matcher uses `instanceof` underneath.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected value via a generic.
|
||||
* This is particuarly useful for ensuring expected objects have the right structure.
|
||||
*/
|
||||
toBeInstanceOf(expected: any): R;
|
||||
toBeInstanceOf<E = any>(expected: E): R;
|
||||
/**
|
||||
* For comparing floating point numbers.
|
||||
*/
|
||||
@@ -698,19 +839,28 @@ declare namespace jest {
|
||||
/**
|
||||
* Used when you want to check that an item is in a list.
|
||||
* For testing the items in the list, this uses `===`, a strict equality check.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected value via a generic.
|
||||
* This is particuarly useful for ensuring expected objects have the right structure.
|
||||
*/
|
||||
toContain(expected: any): R;
|
||||
toContain<E = any>(expected: E): R;
|
||||
/**
|
||||
* Used when you want to check that an item is in a list.
|
||||
* For testing the items in the list, this matcher recursively checks the
|
||||
* For testing the items in the list, this matcher recursively checks the
|
||||
* equality of all fields, rather than checking for object identity.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected value via a generic.
|
||||
* This is particuarly useful for ensuring expected objects have the right structure.
|
||||
*/
|
||||
toContainEqual(expected: any): R;
|
||||
toContainEqual<E = any>(expected: E): R;
|
||||
/**
|
||||
* Used when you want to check that two objects have the same value.
|
||||
* This matcher recursively checks the equality of all fields, rather than checking for object identity.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected value via a generic.
|
||||
* This is particuarly useful for ensuring expected objects have the right structure.
|
||||
*/
|
||||
toEqual(expected: any): R;
|
||||
toEqual<E = any>(expected: E): R;
|
||||
/**
|
||||
* Ensures that a mock function is called.
|
||||
*/
|
||||
@@ -721,23 +871,35 @@ declare namespace jest {
|
||||
toHaveBeenCalledTimes(expected: number): R;
|
||||
/**
|
||||
* Ensure that a mock function is called with specific arguments.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected arguments via a generic.
|
||||
* Note that the type must be either an array or a tuple.
|
||||
*/
|
||||
toHaveBeenCalledWith(...params: any[]): R;
|
||||
toHaveBeenCalledWith<E extends any[]>(...params: E): R;
|
||||
/**
|
||||
* Ensure that a mock function is called with specific arguments on an Nth call.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected arguments via a generic.
|
||||
* Note that the type must be either an array or a tuple.
|
||||
*/
|
||||
toHaveBeenNthCalledWith(nthCall: number, ...params: any[]): R;
|
||||
toHaveBeenNthCalledWith<E extends any[]>(nthCall: number, ...params: E): R;
|
||||
/**
|
||||
* If you have a mock function, you can use `.toHaveBeenLastCalledWith`
|
||||
* to test what arguments it was last called with.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected arguments via a generic.
|
||||
* Note that the type must be either an array or a tuple.
|
||||
*/
|
||||
toHaveBeenLastCalledWith(...params: any[]): R;
|
||||
toHaveBeenLastCalledWith<E extends any[]>(...params: E): R;
|
||||
/**
|
||||
* Use to test the specific value that a mock function last returned.
|
||||
* If the last call to the mock function threw an error, then this matcher will fail
|
||||
* no matter what value you provided as the expected return value.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected value via a generic.
|
||||
* This is particuarly useful for ensuring expected objects have the right structure.
|
||||
*/
|
||||
toHaveLastReturnedWith(expected: any): R;
|
||||
toHaveLastReturnedWith<E = any>(expected: E): R;
|
||||
/**
|
||||
* Used to check that an object has a `.length` property
|
||||
* and it is set to a certain numeric value.
|
||||
@@ -747,8 +909,11 @@ declare namespace jest {
|
||||
* Use to test the specific value that a mock function returned for the nth call.
|
||||
* If the nth call to the mock function threw an error, then this matcher will fail
|
||||
* no matter what value you provided as the expected return value.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected value via a generic.
|
||||
* This is particuarly useful for ensuring expected objects have the right structure.
|
||||
*/
|
||||
toHaveNthReturnedWith(nthCall: number, expected: any): R;
|
||||
toHaveNthReturnedWith<E = any>(nthCall: number, expected: E): R;
|
||||
/**
|
||||
* Use to check if property at provided reference keyPath exists for an object.
|
||||
* For checking deeply nested properties in an object you may use dot notation or an array containing
|
||||
@@ -762,7 +927,7 @@ declare namespace jest {
|
||||
*
|
||||
* expect(houseForSale).toHaveProperty('kitchen.area', 20);
|
||||
*/
|
||||
toHaveProperty(propertyPath: string | any[], value?: any): R;
|
||||
toHaveProperty<E = any>(propertyPath: string | any[], value?: E): R;
|
||||
/**
|
||||
* Use to test that the mock function successfully returned (i.e., did not throw an error) at least one time
|
||||
*/
|
||||
@@ -774,8 +939,11 @@ declare namespace jest {
|
||||
toHaveReturnedTimes(expected: number): R;
|
||||
/**
|
||||
* Use to ensure that a mock function returned a specific value.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected value via a generic.
|
||||
* This is particuarly useful for ensuring expected objects have the right structure.
|
||||
*/
|
||||
toHaveReturnedWith(expected: any): R;
|
||||
toHaveReturnedWith<E = any>(expected: E): R;
|
||||
/**
|
||||
* Check that a string matches a regular expression.
|
||||
*/
|
||||
@@ -805,7 +973,7 @@ declare namespace jest {
|
||||
* This ensures that a value matches the most recent snapshot with property matchers.
|
||||
* Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information.
|
||||
*/
|
||||
toMatchSnapshot<T extends { [P in keyof R]: any }>(propertyMatchers: Partial<T>, snapshotName?: string): R;
|
||||
toMatchSnapshot<U extends { [P in keyof T]: any }>(propertyMatchers: Partial<U>, snapshotName?: string): R;
|
||||
/**
|
||||
* This ensures that a value matches the most recent snapshot.
|
||||
* Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information.
|
||||
@@ -816,7 +984,7 @@ declare namespace jest {
|
||||
* Instead of writing the snapshot value to a .snap file, it will be written into the source code automatically.
|
||||
* Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information.
|
||||
*/
|
||||
toMatchInlineSnapshot<T extends { [P in keyof R]: any }>(propertyMatchers: Partial<T>, snapshot?: string): R;
|
||||
toMatchInlineSnapshot<U extends { [P in keyof T]: any }>(propertyMatchers: Partial<U>, snapshot?: string): R;
|
||||
/**
|
||||
* This ensures that a value matches the most recent snapshot with property matchers.
|
||||
* Instead of writing the snapshot value to a .snap file, it will be written into the source code automatically.
|
||||
@@ -833,12 +1001,18 @@ declare namespace jest {
|
||||
toReturnTimes(count: number): R;
|
||||
/**
|
||||
* Ensure that a mock function has returned a specified value at least once.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected value via a generic.
|
||||
* This is particuarly useful for ensuring expected objects have the right structure.
|
||||
*/
|
||||
toReturnWith(value: any): R;
|
||||
toReturnWith<E = any>(value: E): R;
|
||||
/**
|
||||
* Use to test that objects have the same types as well as structure.
|
||||
*
|
||||
* Optionally, you can provide a type for the expected value via a generic.
|
||||
* This is particuarly useful for ensuring expected objects have the right structure.
|
||||
*/
|
||||
toStrictEqual(expected: {}): R;
|
||||
toStrictEqual<E = any>(expected: E): R;
|
||||
/**
|
||||
* Used to test that a function throws when it is called.
|
||||
*/
|
||||
@@ -858,6 +1032,47 @@ declare namespace jest {
|
||||
toThrowErrorMatchingInlineSnapshot(snapshot?: string): R;
|
||||
}
|
||||
|
||||
type RemoveFirstFromTuple<T extends any[]> =
|
||||
T['length'] extends 0 ? [] :
|
||||
(((...b: T) => void) extends (a: any, ...b: infer I) => void ? I : []);
|
||||
|
||||
type Parameters<T extends (...args: any[]) => any> = T extends (...args: infer P) => any ? P : never;
|
||||
|
||||
interface AsymmetricMatcher {
|
||||
asymmetricMatch(other: unknown): boolean;
|
||||
}
|
||||
type NonAsyncMatchers<TMatchers extends ExpectExtendMap> = {
|
||||
[K in keyof TMatchers]: ReturnType<TMatchers[K]> extends Promise<CustomMatcherResult>? never: K
|
||||
}[keyof TMatchers];
|
||||
type CustomAsyncMatchers<TMatchers extends ExpectExtendMap> = {[K in NonAsyncMatchers<TMatchers>]: CustomAsymmetricMatcher<TMatchers[K]>};
|
||||
type CustomAsymmetricMatcher<TMatcher extends (...args: any[]) => any> = (...args: RemoveFirstFromTuple<Parameters<TMatcher>>) => AsymmetricMatcher;
|
||||
|
||||
// should be TMatcherReturn extends void|Promise<void> but getting dtslint error
|
||||
type CustomJestMatcher<TMatcher extends (...args: any[]) => any, TMatcherReturn> = (...args: RemoveFirstFromTuple<Parameters<TMatcher>>) => TMatcherReturn;
|
||||
|
||||
type ExpectProperties= {
|
||||
[K in keyof Expect]: Expect[K]
|
||||
};
|
||||
// should be TMatcherReturn extends void|Promise<void> but getting dtslint error
|
||||
// Use the `void` type for return types only. Otherwise, use `undefined`. See: https://github.com/Microsoft/dtslint/blob/master/docs/void-return.md
|
||||
// have added issue https://github.com/microsoft/dtslint/issues/256 - Cannot have type union containing void ( to be used as return type only
|
||||
type ExtendedMatchers<TMatchers extends ExpectExtendMap, TMatcherReturn, TActual> = Matchers<TMatcherReturn, TActual> & {[K in keyof TMatchers]: CustomJestMatcher<TMatchers[K], TMatcherReturn>};
|
||||
type JestExtendedMatchers<TMatchers extends ExpectExtendMap, TActual> = JestMatchersShape<ExtendedMatchers<TMatchers, void, TActual>, ExtendedMatchers<TMatchers, Promise<void>, TActual>>;
|
||||
|
||||
// when have called expect.extend
|
||||
type ExtendedExpectFunction<TMatchers extends ExpectExtendMap> = <TActual>(actual: TActual) => JestExtendedMatchers<TMatchers, TActual>;
|
||||
|
||||
type ExtendedExpect<TMatchers extends ExpectExtendMap>=
|
||||
ExpectProperties &
|
||||
AndNot<CustomAsyncMatchers<TMatchers>> &
|
||||
ExtendedExpectFunction<TMatchers>;
|
||||
/**
|
||||
* Construct a type with the properties of T except for those in type K.
|
||||
*/
|
||||
type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
|
||||
type NonPromiseMatchers<T extends JestMatchersShape> = Omit<T, 'resolves' | 'rejects' | 'not'>;
|
||||
type PromiseMatchers<T extends JestMatchersShape> = Omit<T['resolves'], 'not'>;
|
||||
|
||||
interface Constructable {
|
||||
new (...args: any[]): any;
|
||||
}
|
||||
@@ -1320,7 +1535,7 @@ declare namespace jest {
|
||||
// https://facebook.github.io/jest/docs/en/configuration.html#testresultsprocessor-string
|
||||
// const testResultsProcessor: TestResultsProcessor;
|
||||
|
||||
// leave above declarations for referening type-dependencies
|
||||
// leave above declarations for referencing type-dependencies
|
||||
// .vscode/settings.json: "typescript.referencesCodeLens.enabled": true
|
||||
|
||||
// custom
|
||||
@@ -1612,11 +1827,13 @@ declare namespace jest {
|
||||
|
||||
interface FakeTimers {
|
||||
clearAllTimers(): void;
|
||||
getTimerCount(): number;
|
||||
runAllImmediates(): void;
|
||||
runAllTicks(): void;
|
||||
runAllTimers(): void;
|
||||
runTimersToTime(msToRun: number): void;
|
||||
advanceTimersByTime(msToRun: number): void;
|
||||
advanceTimersToNextTimer(steps?: number): void;
|
||||
runOnlyPendingTimers(): void;
|
||||
runWithRealTimers(callback: any): void;
|
||||
useFakeTimers(): void;
|
||||
|
||||
45
node_modules/@types/jest/package.json
generated
vendored
45
node_modules/@types/jest/package.json
generated
vendored
@@ -1,37 +1,33 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@types/jest@24.0.16",
|
||||
"/Users/imranismail/Projects/setup-kustomize"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@types/jest@24.0.16",
|
||||
"_id": "@types/jest@24.0.16",
|
||||
"_from": "@types/jest@24.0.22",
|
||||
"_id": "@types/jest@24.0.22",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-JrAiyV+PPGKZzw6uxbI761cHZ0G7QMOHXPhtSpcl08rZH6CswXaaejckn3goFKmF7M3nzEoJ0lwYCbqLMmjziQ==",
|
||||
"_integrity": "sha512-t2OvhNZnrNjlzi2i0/cxbLVM59WN15I2r1Qtb7wDv28PnV9IzrPtagFRey/S9ezdLD0zyh1XGMQIEQND2YEfrw==",
|
||||
"_location": "/@types/jest",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@types/jest@24.0.16",
|
||||
"raw": "@types/jest@24.0.22",
|
||||
"name": "@types/jest",
|
||||
"escapedName": "@types%2fjest",
|
||||
"scope": "@types",
|
||||
"rawSpec": "24.0.16",
|
||||
"rawSpec": "24.0.22",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "24.0.16"
|
||||
"fetchSpec": "24.0.22"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#DEV:/"
|
||||
"#DEV:/",
|
||||
"#USER"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@types/jest/-/jest-24.0.16.tgz",
|
||||
"_spec": "24.0.16",
|
||||
"_resolved": "https://registry.npmjs.org/@types/jest/-/jest-24.0.22.tgz",
|
||||
"_shasum": "08a50be08e78aba850a1185626e71d31e2336145",
|
||||
"_spec": "@types/jest@24.0.22",
|
||||
"_where": "/Users/imranismail/Projects/setup-kustomize",
|
||||
"bugs": {
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Asana",
|
||||
@@ -116,11 +112,24 @@
|
||||
{
|
||||
"name": "Alex Bolenok",
|
||||
"url": "https://github.com/quassnoi"
|
||||
},
|
||||
{
|
||||
"name": "Mario Beltrán Alarcón",
|
||||
"url": "https://github.com/Belco90"
|
||||
},
|
||||
{
|
||||
"name": "Tony Hallett",
|
||||
"url": "https://github.com/tonyhallett"
|
||||
},
|
||||
{
|
||||
"name": "Jason Yu",
|
||||
"url": "https://github.com/ycmjason"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@types/jest-diff": "*"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "TypeScript definitions for Jest",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
|
||||
"license": "MIT",
|
||||
@@ -134,6 +143,6 @@
|
||||
"scripts": {},
|
||||
"typeScriptVersion": "3.0",
|
||||
"types": "index",
|
||||
"typesPublisherContentHash": "ea53461cb3b33ad8bb114a96b0bea8c792ff624c76adbdce52dc4e706559a405",
|
||||
"version": "24.0.16"
|
||||
"typesPublisherContentHash": "de5dedcfb77ec7fe7075d6fbf4aaac32d15385bd64e20937fe33cb64554b3350",
|
||||
"version": "24.0.22"
|
||||
}
|
||||
|
||||
4
node_modules/@types/node/README.md
generated
vendored
4
node_modules/@types/node/README.md
generated
vendored
@@ -8,9 +8,9 @@ This package contains type definitions for Node.js (http://nodejs.org/).
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
|
||||
|
||||
Additional Details
|
||||
* Last updated: Thu, 01 Aug 2019 19:43:21 GMT
|
||||
* Last updated: Fri, 08 Nov 2019 22:57:07 GMT
|
||||
* Dependencies: none
|
||||
* Global values: Buffer, NodeJS, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, queueMicrotask, require, setImmediate, setInterval, setTimeout
|
||||
|
||||
# Credits
|
||||
These definitions were written by Microsoft TypeScript <https://github.com/Microsoft>, DefinitelyTyped <https://github.com/DefinitelyTyped>, Alberto Schiabel <https://github.com/jkomyno>, Alexander T. <https://github.com/a-tarasyuk>, Alvis HT Tang <https://github.com/alvis>, Andrew Makarov <https://github.com/r3nya>, Benjamin Toueg <https://github.com/btoueg>, Bruno Scheufler <https://github.com/brunoscheufler>, Chigozirim C. <https://github.com/smac89>, Christian Vaagland Tellnes <https://github.com/tellnes>, David Junger <https://github.com/touffy>, Deividas Bakanas <https://github.com/DeividasBakanas>, Eugene Y. Q. Shen <https://github.com/eyqs>, Flarna <https://github.com/Flarna>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Hoàng Văn Khải <https://github.com/KSXGitHub>, 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>, Matthieu Sieben <https://github.com/matthieusieben>, Mohsen Azimi <https://github.com/mohsen1>, Nicolas Even <https://github.com/n-e>, Nicolas Voigt <https://github.com/octo-sniffle>, 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>, Zane Hannan AU <https://github.com/ZaneHannanAU>, Samuel Ainsworth <https://github.com/samuela>, Kyle Uehlein <https://github.com/kuehlein>, Jordi Oliveras Rovira <https://github.com/j-oliveras>, Thanik Bhongbhibhat <https://github.com/bhongy>, and Marcin Kopacz <https://github.com/chyzwar>.
|
||||
These definitions were written by Microsoft TypeScript <https://github.com/Microsoft>, DefinitelyTyped <https://github.com/DefinitelyTyped>, Alberto Schiabel <https://github.com/jkomyno>, Alexander T. <https://github.com/a-tarasyuk>, Alvis HT Tang <https://github.com/alvis>, Andrew Makarov <https://github.com/r3nya>, Benjamin Toueg <https://github.com/btoueg>, Bruno Scheufler <https://github.com/brunoscheufler>, Chigozirim C. <https://github.com/smac89>, Christian Vaagland Tellnes <https://github.com/tellnes>, David Junger <https://github.com/touffy>, Deividas Bakanas <https://github.com/DeividasBakanas>, Eugene Y. Q. Shen <https://github.com/eyqs>, Flarna <https://github.com/Flarna>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Hoàng Văn Khải <https://github.com/KSXGitHub>, 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>, Nicolas Voigt <https://github.com/octo-sniffle>, 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>, Zane Hannan AU <https://github.com/ZaneHannanAU>, Samuel Ainsworth <https://github.com/samuela>, Kyle Uehlein <https://github.com/kuehlein>, Jordi Oliveras Rovira <https://github.com/j-oliveras>, Thanik Bhongbhibhat <https://github.com/bhongy>, Marcin Kopacz <https://github.com/chyzwar>, Trivikram Kamat <https://github.com/trivikr>, and Minh Son Nguyen <https://github.com/nguymin4>.
|
||||
|
||||
4
node_modules/@types/node/assert.d.ts
generated
vendored
4
node_modules/@types/node/assert.d.ts
generated
vendored
@@ -20,13 +20,9 @@ declare module "assert" {
|
||||
/** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
|
||||
function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never;
|
||||
function ok(value: any, message?: string | Error): void;
|
||||
/** @deprecated since v9.9.0 - use strictEqual() instead. */
|
||||
function equal(actual: any, expected: any, message?: string | Error): void;
|
||||
/** @deprecated since v9.9.0 - use notStrictEqual() instead. */
|
||||
function notEqual(actual: any, expected: any, message?: string | Error): void;
|
||||
/** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
|
||||
function deepEqual(actual: any, expected: any, message?: string | Error): void;
|
||||
/** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
|
||||
function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
|
||||
function strictEqual(actual: any, expected: any, message?: string | Error): void;
|
||||
function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
|
||||
|
||||
112
node_modules/@types/node/child_process.d.ts
generated
vendored
112
node_modules/@types/node/child_process.d.ts
generated
vendored
@@ -92,6 +92,24 @@ declare module "child_process" {
|
||||
];
|
||||
}
|
||||
|
||||
// return this object when stdio option is a tuple of 3
|
||||
interface ChildProcessByStdio<
|
||||
I extends null | Writable,
|
||||
O extends null | Readable,
|
||||
E extends null | Readable,
|
||||
> extends ChildProcess {
|
||||
stdin: I;
|
||||
stdout: O;
|
||||
stderr: E;
|
||||
readonly stdio: [
|
||||
I,
|
||||
O,
|
||||
E,
|
||||
Readable | Writable | null | undefined, // extra, no modification
|
||||
Readable | Writable | null | undefined // extra, no modification
|
||||
];
|
||||
}
|
||||
|
||||
interface MessageOptions {
|
||||
keepOpen?: boolean;
|
||||
}
|
||||
@@ -128,9 +146,99 @@ declare module "child_process" {
|
||||
stdio?: 'pipe' | Array<null | undefined | 'pipe'>;
|
||||
}
|
||||
|
||||
type StdioNull = 'inherit' | 'ignore' | Stream;
|
||||
type StdioPipe = undefined | null | 'pipe';
|
||||
|
||||
interface SpawnOptionsWithStdioTuple<
|
||||
Stdin extends StdioNull | StdioPipe,
|
||||
Stdout extends StdioNull | StdioPipe,
|
||||
Stderr extends StdioNull | StdioPipe,
|
||||
> extends SpawnOptions {
|
||||
stdio: [Stdin, Stdout, Stderr];
|
||||
}
|
||||
|
||||
// overloads of spawn without 'args'
|
||||
function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
|
||||
|
||||
function spawn(
|
||||
command: string,
|
||||
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
|
||||
): ChildProcessByStdio<Writable, Readable, Readable>;
|
||||
function spawn(
|
||||
command: string,
|
||||
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
|
||||
): ChildProcessByStdio<Writable, Readable, null>;
|
||||
function spawn(
|
||||
command: string,
|
||||
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
|
||||
): ChildProcessByStdio<Writable, null, Readable>;
|
||||
function spawn(
|
||||
command: string,
|
||||
options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
|
||||
): ChildProcessByStdio<null, Readable, Readable>;
|
||||
function spawn(
|
||||
command: string,
|
||||
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
|
||||
): ChildProcessByStdio<Writable, null, null>;
|
||||
function spawn(
|
||||
command: string,
|
||||
options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
|
||||
): ChildProcessByStdio<null, Readable, null>;
|
||||
function spawn(
|
||||
command: string,
|
||||
options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
|
||||
): ChildProcessByStdio<null, null, Readable>;
|
||||
function spawn(
|
||||
command: string,
|
||||
options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
|
||||
): ChildProcessByStdio<null, null, null>;
|
||||
|
||||
function spawn(command: string, options: SpawnOptions): ChildProcess;
|
||||
|
||||
// overloads of spawn with 'args'
|
||||
function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
|
||||
|
||||
function spawn(
|
||||
command: string,
|
||||
args: ReadonlyArray<string>,
|
||||
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
|
||||
): ChildProcessByStdio<Writable, Readable, Readable>;
|
||||
function spawn(
|
||||
command: string,
|
||||
args: ReadonlyArray<string>,
|
||||
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
|
||||
): ChildProcessByStdio<Writable, Readable, null>;
|
||||
function spawn(
|
||||
command: string,
|
||||
args: ReadonlyArray<string>,
|
||||
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
|
||||
): ChildProcessByStdio<Writable, null, Readable>;
|
||||
function spawn(
|
||||
command: string,
|
||||
args: ReadonlyArray<string>,
|
||||
options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
|
||||
): ChildProcessByStdio<null, Readable, Readable>;
|
||||
function spawn(
|
||||
command: string,
|
||||
args: ReadonlyArray<string>,
|
||||
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
|
||||
): ChildProcessByStdio<Writable, null, null>;
|
||||
function spawn(
|
||||
command: string,
|
||||
args: ReadonlyArray<string>,
|
||||
options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
|
||||
): ChildProcessByStdio<null, Readable, null>;
|
||||
function spawn(
|
||||
command: string,
|
||||
args: ReadonlyArray<string>,
|
||||
options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
|
||||
): ChildProcessByStdio<null, null, Readable>;
|
||||
function spawn(
|
||||
command: string,
|
||||
args: ReadonlyArray<string>,
|
||||
options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
|
||||
): ChildProcessByStdio<null, null, null>;
|
||||
|
||||
function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
|
||||
|
||||
interface ExecOptions extends CommonOptions {
|
||||
@@ -296,7 +404,7 @@ declare module "child_process" {
|
||||
|
||||
interface SpawnSyncOptions extends CommonOptions {
|
||||
argv0?: string; // Not specified in the docs
|
||||
input?: string | NodeJS.TypedArray | DataView;
|
||||
input?: string | NodeJS.ArrayBufferView;
|
||||
stdio?: StdioOptions;
|
||||
killSignal?: string | number;
|
||||
maxBuffer?: number;
|
||||
@@ -347,7 +455,7 @@ declare module "child_process" {
|
||||
function execSync(command: string, options?: ExecSyncOptions): Buffer;
|
||||
|
||||
interface ExecFileSyncOptions extends CommonOptions {
|
||||
input?: string | NodeJS.TypedArray | DataView;
|
||||
input?: string | NodeJS.ArrayBufferView;
|
||||
stdio?: StdioOptions;
|
||||
killSignal?: string | number;
|
||||
maxBuffer?: number;
|
||||
|
||||
170
node_modules/@types/node/constants.d.ts
generated
vendored
170
node_modules/@types/node/constants.d.ts
generated
vendored
@@ -1,147 +1,292 @@
|
||||
/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
|
||||
declare module "constants" {
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.E2BIG` instead. */
|
||||
const E2BIG: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EACCES` instead. */
|
||||
const EACCES: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EADDRINUSE` instead. */
|
||||
const EADDRINUSE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EADDRNOTAVAIL` instead. */
|
||||
const EADDRNOTAVAIL: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EAFNOSUPPORT` instead. */
|
||||
const EAFNOSUPPORT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EAGAIN` instead. */
|
||||
const EAGAIN: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EALREADY` instead. */
|
||||
const EALREADY: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EBADF` instead. */
|
||||
const EBADF: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EBADMSG` instead. */
|
||||
const EBADMSG: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EBUSY` instead. */
|
||||
const EBUSY: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ECANCELED` instead. */
|
||||
const ECANCELED: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ECHILD` instead. */
|
||||
const ECHILD: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ECONNABORTED` instead. */
|
||||
const ECONNABORTED: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ECONNREFUSED` instead. */
|
||||
const ECONNREFUSED: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ECONNRESET` instead. */
|
||||
const ECONNRESET: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EDEADLK` instead. */
|
||||
const EDEADLK: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EDESTADDRREQ` instead. */
|
||||
const EDESTADDRREQ: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EDOM` instead. */
|
||||
const EDOM: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EEXIST` instead. */
|
||||
const EEXIST: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EFAULT` instead. */
|
||||
const EFAULT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EFBIG` instead. */
|
||||
const EFBIG: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EHOSTUNREACH` instead. */
|
||||
const EHOSTUNREACH: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EIDRM` instead. */
|
||||
const EIDRM: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EILSEQ` instead. */
|
||||
const EILSEQ: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EINPROGRESS` instead. */
|
||||
const EINPROGRESS: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EINTR` instead. */
|
||||
const EINTR: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EINVAL` instead. */
|
||||
const EINVAL: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EIO` instead. */
|
||||
const EIO: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EISCONN` instead. */
|
||||
const EISCONN: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EISDIR` instead. */
|
||||
const EISDIR: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ELOOP` instead. */
|
||||
const ELOOP: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EMFILE` instead. */
|
||||
const EMFILE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EMLINK` instead. */
|
||||
const EMLINK: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EMSGSIZE` instead. */
|
||||
const EMSGSIZE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENAMETOOLONG` instead. */
|
||||
const ENAMETOOLONG: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENETDOWN` instead. */
|
||||
const ENETDOWN: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENETRESET` instead. */
|
||||
const ENETRESET: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENETUNREACH` instead. */
|
||||
const ENETUNREACH: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENFILE` instead. */
|
||||
const ENFILE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOBUFS` instead. */
|
||||
const ENOBUFS: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENODATA` instead. */
|
||||
const ENODATA: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENODEV` instead. */
|
||||
const ENODEV: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOENT` instead. */
|
||||
const ENOENT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOEXEC` instead. */
|
||||
const ENOEXEC: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOLCK` instead. */
|
||||
const ENOLCK: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOLINK` instead. */
|
||||
const ENOLINK: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOMEM` instead. */
|
||||
const ENOMEM: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOMSG` instead. */
|
||||
const ENOMSG: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOPROTOOPT` instead. */
|
||||
const ENOPROTOOPT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOSPC` instead. */
|
||||
const ENOSPC: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOSR` instead. */
|
||||
const ENOSR: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOSTR` instead. */
|
||||
const ENOSTR: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOSYS` instead. */
|
||||
const ENOSYS: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOTCONN` instead. */
|
||||
const ENOTCONN: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOTDIR` instead. */
|
||||
const ENOTDIR: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOTEMPTY` instead. */
|
||||
const ENOTEMPTY: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOTSOCK` instead. */
|
||||
const ENOTSOCK: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOTSUP` instead. */
|
||||
const ENOTSUP: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENOTTY` instead. */
|
||||
const ENOTTY: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ENXIO` instead. */
|
||||
const ENXIO: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EOPNOTSUPP` instead. */
|
||||
const EOPNOTSUPP: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EOVERFLOW` instead. */
|
||||
const EOVERFLOW: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EPERM` instead. */
|
||||
const EPERM: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EPIPE` instead. */
|
||||
const EPIPE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EPROTO` instead. */
|
||||
const EPROTO: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EPROTONOSUPPORT` instead. */
|
||||
const EPROTONOSUPPORT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EPROTOTYPE` instead. */
|
||||
const EPROTOTYPE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ERANGE` instead. */
|
||||
const ERANGE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EROFS` instead. */
|
||||
const EROFS: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ESPIPE` instead. */
|
||||
const ESPIPE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ESRCH` instead. */
|
||||
const ESRCH: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ETIME` instead. */
|
||||
const ETIME: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ETIMEDOUT` instead. */
|
||||
const ETIMEDOUT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.ETXTBSY` instead. */
|
||||
const ETXTBSY: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EWOULDBLOCK` instead. */
|
||||
const EWOULDBLOCK: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.EXDEV` instead. */
|
||||
const EXDEV: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEINTR` instead. */
|
||||
const WSAEINTR: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEBADF` instead. */
|
||||
const WSAEBADF: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEACCES` instead. */
|
||||
const WSAEACCES: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEFAULT` instead. */
|
||||
const WSAEFAULT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEINVAL` instead. */
|
||||
const WSAEINVAL: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEMFILE` instead. */
|
||||
const WSAEMFILE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEWOULDBLOCK` instead. */
|
||||
const WSAEWOULDBLOCK: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEINPROGRESS` instead. */
|
||||
const WSAEINPROGRESS: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEALREADY` instead. */
|
||||
const WSAEALREADY: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOTSOCK` instead. */
|
||||
const WSAENOTSOCK: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEDESTADDRREQ` instead. */
|
||||
const WSAEDESTADDRREQ: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEMSGSIZE` instead. */
|
||||
const WSAEMSGSIZE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEPROTOTYPE` instead. */
|
||||
const WSAEPROTOTYPE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOPROTOOPT` instead. */
|
||||
const WSAENOPROTOOPT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEPROTONOSUPPORT` instead. */
|
||||
const WSAEPROTONOSUPPORT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAESOCKTNOSUPPORT` instead. */
|
||||
const WSAESOCKTNOSUPPORT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEOPNOTSUPP` instead. */
|
||||
const WSAEOPNOTSUPP: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEPFNOSUPPORT` instead. */
|
||||
const WSAEPFNOSUPPORT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEAFNOSUPPORT` instead. */
|
||||
const WSAEAFNOSUPPORT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEADDRINUSE` instead. */
|
||||
const WSAEADDRINUSE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEADDRNOTAVAIL` instead. */
|
||||
const WSAEADDRNOTAVAIL: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAENETDOWN` instead. */
|
||||
const WSAENETDOWN: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAENETUNREACH` instead. */
|
||||
const WSAENETUNREACH: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAENETRESET` instead. */
|
||||
const WSAENETRESET: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAECONNABORTED` instead. */
|
||||
const WSAECONNABORTED: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAECONNRESET` instead. */
|
||||
const WSAECONNRESET: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOBUFS` instead. */
|
||||
const WSAENOBUFS: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEISCONN` instead. */
|
||||
const WSAEISCONN: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOTCONN` instead. */
|
||||
const WSAENOTCONN: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAESHUTDOWN` instead. */
|
||||
const WSAESHUTDOWN: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAETOOMANYREFS` instead. */
|
||||
const WSAETOOMANYREFS: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAETIMEDOUT` instead. */
|
||||
const WSAETIMEDOUT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAECONNREFUSED` instead. */
|
||||
const WSAECONNREFUSED: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAELOOP` instead. */
|
||||
const WSAELOOP: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAENAMETOOLONG` instead. */
|
||||
const WSAENAMETOOLONG: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEHOSTDOWN` instead. */
|
||||
const WSAEHOSTDOWN: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEHOSTUNREACH` instead. */
|
||||
const WSAEHOSTUNREACH: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOTEMPTY` instead. */
|
||||
const WSAENOTEMPTY: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEPROCLIM` instead. */
|
||||
const WSAEPROCLIM: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEUSERS` instead. */
|
||||
const WSAEUSERS: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEDQUOT` instead. */
|
||||
const WSAEDQUOT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAESTALE` instead. */
|
||||
const WSAESTALE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEREMOTE` instead. */
|
||||
const WSAEREMOTE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSASYSNOTREADY` instead. */
|
||||
const WSASYSNOTREADY: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAVERNOTSUPPORTED` instead. */
|
||||
const WSAVERNOTSUPPORTED: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSANOTINITIALISED` instead. */
|
||||
const WSANOTINITIALISED: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEDISCON` instead. */
|
||||
const WSAEDISCON: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOMORE` instead. */
|
||||
const WSAENOMORE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAECANCELLED` instead. */
|
||||
const WSAECANCELLED: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEINVALIDPROCTABLE` instead. */
|
||||
const WSAEINVALIDPROCTABLE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEINVALIDPROVIDER` instead. */
|
||||
const WSAEINVALIDPROVIDER: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEPROVIDERFAILEDINIT` instead. */
|
||||
const WSAEPROVIDERFAILEDINIT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSASYSCALLFAILURE` instead. */
|
||||
const WSASYSCALLFAILURE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSASERVICE_NOT_FOUND` instead. */
|
||||
const WSASERVICE_NOT_FOUND: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSATYPE_NOT_FOUND` instead. */
|
||||
const WSATYPE_NOT_FOUND: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSA_E_NO_MORE` instead. */
|
||||
const WSA_E_NO_MORE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSA_E_CANCELLED` instead. */
|
||||
const WSA_E_CANCELLED: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.errno.WSAEREFUSED` instead. */
|
||||
const WSAEREFUSED: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGHUP` instead. */
|
||||
const SIGHUP: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGINT` instead. */
|
||||
const SIGINT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGILL` instead. */
|
||||
const SIGILL: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGABRT` instead. */
|
||||
const SIGABRT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGFPE` instead. */
|
||||
const SIGFPE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGKILL` instead. */
|
||||
const SIGKILL: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGSEGV` instead. */
|
||||
const SIGSEGV: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGTERM` instead. */
|
||||
const SIGTERM: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGBREAK` instead. */
|
||||
const SIGBREAK: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGWINCH` instead. */
|
||||
const SIGWINCH: number;
|
||||
const SSL_OP_ALL: number;
|
||||
const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
|
||||
@@ -246,30 +391,55 @@ declare module "constants" {
|
||||
const COPYFILE_FICLONE: number;
|
||||
const COPYFILE_FICLONE_FORCE: number;
|
||||
const UV_UDP_REUSEADDR: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGQUIT` instead. */
|
||||
const SIGQUIT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGTRAP` instead. */
|
||||
const SIGTRAP: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGIOT` instead. */
|
||||
const SIGIOT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGBUS` instead. */
|
||||
const SIGBUS: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGUSR1` instead. */
|
||||
const SIGUSR1: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGUSR2` instead. */
|
||||
const SIGUSR2: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGPIPE` instead. */
|
||||
const SIGPIPE: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGALRM` instead. */
|
||||
const SIGALRM: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGCHLD` instead. */
|
||||
const SIGCHLD: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGSTKFLT` instead. */
|
||||
const SIGSTKFLT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGCONT` instead. */
|
||||
const SIGCONT: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGSTOP` instead. */
|
||||
const SIGSTOP: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGTSTP` instead. */
|
||||
const SIGTSTP: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGTTIN` instead. */
|
||||
const SIGTTIN: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGTTOU` instead. */
|
||||
const SIGTTOU: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGURG` instead. */
|
||||
const SIGURG: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGXCPU` instead. */
|
||||
const SIGXCPU: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGXFSZ` instead. */
|
||||
const SIGXFSZ: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGVTALRM` instead. */
|
||||
const SIGVTALRM: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGPROF` instead. */
|
||||
const SIGPROF: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGIO` instead. */
|
||||
const SIGIO: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGPOLL` instead. */
|
||||
const SIGPOLL: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGPWR` instead. */
|
||||
const SIGPWR: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGSYS` instead. */
|
||||
const SIGSYS: number;
|
||||
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGUNUSED` instead. */
|
||||
const SIGUNUSED: number;
|
||||
const defaultCoreCipherList: string;
|
||||
const defaultCipherList: string;
|
||||
|
||||
96
node_modules/@types/node/crypto.d.ts
generated
vendored
96
node_modules/@types/node/crypto.d.ts
generated
vendored
@@ -4,7 +4,7 @@ declare module "crypto" {
|
||||
interface Certificate {
|
||||
exportChallenge(spkac: BinaryLike): Buffer;
|
||||
exportPublicKey(spkac: BinaryLike): Buffer;
|
||||
verifySpkac(spkac: Binary): boolean;
|
||||
verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
|
||||
}
|
||||
const Certificate: {
|
||||
new(): Certificate;
|
||||
@@ -106,10 +106,18 @@ declare module "crypto" {
|
||||
const defaultCipherList: string;
|
||||
}
|
||||
|
||||
interface HashOptions extends stream.TransformOptions {
|
||||
/**
|
||||
* For XOF hash functions such as `shake256`, the
|
||||
* outputLength option can be used to specify the desired output length in bytes.
|
||||
*/
|
||||
outputLength?: number;
|
||||
}
|
||||
|
||||
/** @deprecated since v10.0.0 */
|
||||
const fips: boolean;
|
||||
|
||||
function createHash(algorithm: string, options?: stream.TransformOptions): Hash;
|
||||
function createHash(algorithm: string, options?: HashOptions): Hash;
|
||||
function createHmac(algorithm: string, key: BinaryLike, options?: stream.TransformOptions): Hmac;
|
||||
|
||||
type Utf8AsciiLatin1Encoding = "utf8" | "ascii" | "latin1";
|
||||
@@ -118,14 +126,14 @@ declare module "crypto" {
|
||||
type HexBase64BinaryEncoding = "binary" | "base64" | "hex";
|
||||
type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";
|
||||
|
||||
class Hash extends stream.Duplex {
|
||||
class Hash extends stream.Transform {
|
||||
private constructor();
|
||||
update(data: BinaryLike): Hash;
|
||||
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hash;
|
||||
digest(): Buffer;
|
||||
digest(encoding: HexBase64Latin1Encoding): string;
|
||||
}
|
||||
class Hmac extends stream.Duplex {
|
||||
class Hmac extends stream.Transform {
|
||||
private constructor();
|
||||
update(data: BinaryLike): Hmac;
|
||||
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hmac;
|
||||
@@ -133,7 +141,7 @@ declare module "crypto" {
|
||||
digest(encoding: HexBase64Latin1Encoding): string;
|
||||
}
|
||||
|
||||
export type KeyObjectType = 'secret' | 'public' | 'private';
|
||||
type KeyObjectType = 'secret' | 'public' | 'private';
|
||||
|
||||
interface KeyExportOptions<T extends KeyFormat> {
|
||||
type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
|
||||
@@ -159,8 +167,7 @@ declare module "crypto" {
|
||||
type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm';
|
||||
type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
|
||||
|
||||
type Binary = NodeJS.TypedArray | DataView;
|
||||
type BinaryLike = string | Binary;
|
||||
type BinaryLike = string | NodeJS.ArrayBufferView;
|
||||
|
||||
type CipherKey = BinaryLike | KeyObject;
|
||||
|
||||
@@ -193,11 +200,11 @@ declare module "crypto" {
|
||||
algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions
|
||||
): Cipher;
|
||||
|
||||
class Cipher extends stream.Duplex {
|
||||
class Cipher extends stream.Transform {
|
||||
private constructor();
|
||||
update(data: BinaryLike): Buffer;
|
||||
update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer;
|
||||
update(data: Binary, input_encoding: undefined, output_encoding: HexBase64BinaryEncoding): string;
|
||||
update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: HexBase64BinaryEncoding): string;
|
||||
update(data: string, input_encoding: Utf8AsciiBinaryEncoding | undefined, output_encoding: HexBase64BinaryEncoding): string;
|
||||
final(): Buffer;
|
||||
final(output_encoding: string): string;
|
||||
@@ -234,25 +241,25 @@ declare module "crypto" {
|
||||
): DecipherGCM;
|
||||
function createDecipheriv(algorithm: string, key: BinaryLike, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
|
||||
|
||||
class Decipher extends stream.Duplex {
|
||||
class Decipher extends stream.Transform {
|
||||
private constructor();
|
||||
update(data: Binary): Buffer;
|
||||
update(data: NodeJS.ArrayBufferView): Buffer;
|
||||
update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer;
|
||||
update(data: Binary, input_encoding: undefined, output_encoding: Utf8AsciiBinaryEncoding): string;
|
||||
update(data: NodeJS.ArrayBufferView, input_encoding: HexBase64BinaryEncoding | undefined, output_encoding: Utf8AsciiBinaryEncoding): string;
|
||||
update(data: string, input_encoding: HexBase64BinaryEncoding | undefined, output_encoding: Utf8AsciiBinaryEncoding): string;
|
||||
final(): Buffer;
|
||||
final(output_encoding: string): string;
|
||||
setAutoPadding(auto_padding?: boolean): this;
|
||||
// setAuthTag(tag: Binary): this;
|
||||
// setAAD(buffer: Binary): this;
|
||||
// setAuthTag(tag: NodeJS.ArrayBufferView): this;
|
||||
// setAAD(buffer: NodeJS.ArrayBufferView): this;
|
||||
}
|
||||
interface DecipherCCM extends Decipher {
|
||||
setAuthTag(buffer: Binary): this;
|
||||
setAAD(buffer: Binary, options: { plaintextLength: number }): this;
|
||||
setAuthTag(buffer: NodeJS.ArrayBufferView): this;
|
||||
setAAD(buffer: NodeJS.ArrayBufferView, options: { plaintextLength: number }): this;
|
||||
}
|
||||
interface DecipherGCM extends Decipher {
|
||||
setAuthTag(buffer: Binary): this;
|
||||
setAAD(buffer: Binary, options?: { plaintextLength: number }): this;
|
||||
setAuthTag(buffer: NodeJS.ArrayBufferView): this;
|
||||
setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this;
|
||||
}
|
||||
|
||||
interface PrivateKeyInput {
|
||||
@@ -302,23 +309,23 @@ declare module "crypto" {
|
||||
|
||||
update(data: BinaryLike): Verify;
|
||||
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Verify;
|
||||
verify(object: Object | KeyLike, signature: Binary): boolean;
|
||||
verify(object: Object | KeyLike, signature: NodeJS.ArrayBufferView): boolean;
|
||||
verify(object: Object | KeyLike, signature: string, signature_format?: HexBase64Latin1Encoding): boolean;
|
||||
// https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format
|
||||
// The signature field accepts a TypedArray type, but it is only available starting ES2017
|
||||
}
|
||||
function createDiffieHellman(prime_length: number, generator?: number | Binary): DiffieHellman;
|
||||
function createDiffieHellman(prime: Binary): DiffieHellman;
|
||||
function createDiffieHellman(prime_length: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman;
|
||||
function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman;
|
||||
function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman;
|
||||
function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | Binary): DiffieHellman;
|
||||
function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | NodeJS.ArrayBufferView): DiffieHellman;
|
||||
function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman;
|
||||
class DiffieHellman {
|
||||
private constructor();
|
||||
generateKeys(): Buffer;
|
||||
generateKeys(encoding: HexBase64Latin1Encoding): string;
|
||||
computeSecret(other_public_key: Binary): Buffer;
|
||||
computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
|
||||
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
|
||||
computeSecret(other_public_key: Binary, output_encoding: HexBase64Latin1Encoding): string;
|
||||
computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: HexBase64Latin1Encoding): string;
|
||||
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string;
|
||||
getPrime(): Buffer;
|
||||
getPrime(encoding: HexBase64Latin1Encoding): string;
|
||||
@@ -328,9 +335,9 @@ declare module "crypto" {
|
||||
getPublicKey(encoding: HexBase64Latin1Encoding): string;
|
||||
getPrivateKey(): Buffer;
|
||||
getPrivateKey(encoding: HexBase64Latin1Encoding): string;
|
||||
setPublicKey(public_key: Binary): void;
|
||||
setPublicKey(public_key: NodeJS.ArrayBufferView): void;
|
||||
setPublicKey(public_key: string, encoding: string): void;
|
||||
setPrivateKey(private_key: Binary): void;
|
||||
setPrivateKey(private_key: NodeJS.ArrayBufferView): void;
|
||||
setPrivateKey(private_key: string, encoding: string): void;
|
||||
verifyError: number;
|
||||
}
|
||||
@@ -350,10 +357,10 @@ declare module "crypto" {
|
||||
function pseudoRandomBytes(size: number): Buffer;
|
||||
function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
|
||||
|
||||
function randomFillSync<T extends Binary>(buffer: T, offset?: number, size?: number): T;
|
||||
function randomFill<T extends Binary>(buffer: T, callback: (err: Error | null, buf: T) => void): void;
|
||||
function randomFill<T extends Binary>(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
|
||||
function randomFill<T extends Binary>(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void;
|
||||
function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
|
||||
function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, callback: (err: Error | null, buf: T) => void): void;
|
||||
function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
|
||||
function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void;
|
||||
|
||||
interface ScryptOptions {
|
||||
N?: number;
|
||||
@@ -382,12 +389,17 @@ declare module "crypto" {
|
||||
interface RsaPrivateKey {
|
||||
key: KeyLike;
|
||||
passphrase?: string;
|
||||
/**
|
||||
* @default 'sha1'
|
||||
*/
|
||||
oaepHash?: string;
|
||||
oaepLabel?: NodeJS.TypedArray;
|
||||
padding?: number;
|
||||
}
|
||||
function publicEncrypt(public_key: RsaPublicKey | KeyLike, buffer: Binary): Buffer;
|
||||
function privateDecrypt(private_key: RsaPrivateKey | KeyLike, buffer: Binary): Buffer;
|
||||
function privateEncrypt(private_key: RsaPrivateKey | KeyLike, buffer: Binary): Buffer;
|
||||
function publicDecrypt(public_key: RsaPublicKey | KeyLike, buffer: Binary): Buffer;
|
||||
function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
|
||||
function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
|
||||
function privateDecrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
|
||||
function privateEncrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
|
||||
function getCiphers(): string[];
|
||||
function getCurves(): string[];
|
||||
function getHashes(): string[];
|
||||
@@ -402,24 +414,24 @@ declare module "crypto" {
|
||||
): Buffer | string;
|
||||
generateKeys(): Buffer;
|
||||
generateKeys(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string;
|
||||
computeSecret(other_public_key: Binary): Buffer;
|
||||
computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
|
||||
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
|
||||
computeSecret(other_public_key: Binary, output_encoding: HexBase64Latin1Encoding): string;
|
||||
computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: HexBase64Latin1Encoding): string;
|
||||
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string;
|
||||
getPrivateKey(): Buffer;
|
||||
getPrivateKey(encoding: HexBase64Latin1Encoding): string;
|
||||
getPublicKey(): Buffer;
|
||||
getPublicKey(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string;
|
||||
setPrivateKey(private_key: Binary): void;
|
||||
setPrivateKey(private_key: NodeJS.ArrayBufferView): void;
|
||||
setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void;
|
||||
}
|
||||
function createECDH(curve_name: string): ECDH;
|
||||
function timingSafeEqual(a: Binary, b: Binary): boolean;
|
||||
function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
|
||||
/** @deprecated since v10.0.0 */
|
||||
const DEFAULT_ENCODING: string;
|
||||
|
||||
export type KeyType = 'rsa' | 'dsa' | 'ec';
|
||||
export type KeyFormat = 'pem' | 'der';
|
||||
type KeyType = 'rsa' | 'dsa' | 'ec';
|
||||
type KeyFormat = 'pem' | 'der';
|
||||
|
||||
interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
|
||||
format: T;
|
||||
@@ -585,7 +597,7 @@ declare module "crypto" {
|
||||
* If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
|
||||
* passed to [`crypto.createPrivateKey()`][].
|
||||
*/
|
||||
function sign(algorithm: string | null | undefined, data: Binary, key: KeyLike | SignPrivateKeyInput): Buffer;
|
||||
function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignPrivateKeyInput): Buffer;
|
||||
|
||||
interface VerifyKeyWithOptions extends KeyObject, SigningOptions {
|
||||
}
|
||||
@@ -598,5 +610,5 @@ declare module "crypto" {
|
||||
* If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
|
||||
* passed to [`crypto.createPublicKey()`][].
|
||||
*/
|
||||
function verify(algorithm: string | null | undefined, data: Binary, key: KeyLike | VerifyKeyWithOptions, signature: Binary): Buffer;
|
||||
function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyWithOptions, signature: NodeJS.ArrayBufferView): Buffer;
|
||||
}
|
||||
|
||||
6
node_modules/@types/node/dns.d.ts
generated
vendored
6
node_modules/@types/node/dns.d.ts
generated
vendored
@@ -31,9 +31,9 @@ declare module "dns" {
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace lookup {
|
||||
function __promisify__(hostname: string, options: LookupAllOptions): Promise<{ address: LookupAddress[] }>;
|
||||
function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<{ address: string, family: number }>;
|
||||
function __promisify__(hostname: string, options?: LookupOptions | number): Promise<{ address: string | LookupAddress[], family?: number }>;
|
||||
function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
|
||||
function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
|
||||
function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
|
||||
}
|
||||
|
||||
function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
|
||||
|
||||
11
node_modules/@types/node/events.d.ts
generated
vendored
11
node_modules/@types/node/events.d.ts
generated
vendored
@@ -1,8 +1,17 @@
|
||||
declare module "events" {
|
||||
class internal extends NodeJS.EventEmitter { }
|
||||
|
||||
interface NodeEventTarget {
|
||||
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
}
|
||||
|
||||
interface DOMEventTarget {
|
||||
addEventListener(event: string, listener: (...args: any[]) => void, opts?: { once: boolean }): any;
|
||||
}
|
||||
|
||||
namespace internal {
|
||||
function once(emitter: EventEmitter, event: string | symbol): Promise<any[]>;
|
||||
function once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>;
|
||||
function once(emitter: DOMEventTarget, event: string): Promise<any[]>;
|
||||
class EventEmitter extends internal {
|
||||
/** @deprecated since v4.0.0 */
|
||||
static listenerCount(emitter: EventEmitter, event: string | symbol): number;
|
||||
|
||||
243
node_modules/@types/node/fs.d.ts
generated
vendored
243
node_modules/@types/node/fs.d.ts
generated
vendored
@@ -8,8 +8,9 @@ declare module "fs" {
|
||||
*/
|
||||
type PathLike = string | Buffer | URL;
|
||||
|
||||
type BinaryData = DataView | NodeJS.TypedArray;
|
||||
class Stats {
|
||||
type NoParamCallback = (err: NodeJS.ErrnoException | null) => void;
|
||||
|
||||
interface StatsBase<T> {
|
||||
isFile(): boolean;
|
||||
isDirectory(): boolean;
|
||||
isBlockDevice(): boolean;
|
||||
@@ -17,6 +18,7 @@ declare module "fs" {
|
||||
isSymbolicLink(): boolean;
|
||||
isFIFO(): boolean;
|
||||
isSocket(): boolean;
|
||||
|
||||
dev: number;
|
||||
ino: number;
|
||||
mode: number;
|
||||
@@ -37,6 +39,12 @@ declare module "fs" {
|
||||
birthtime: Date;
|
||||
}
|
||||
|
||||
interface Stats extends StatsBase<number> {
|
||||
}
|
||||
|
||||
class Stats {
|
||||
}
|
||||
|
||||
class Dirent {
|
||||
isFile(): boolean;
|
||||
isDirectory(): boolean;
|
||||
@@ -48,6 +56,46 @@ declare module "fs" {
|
||||
name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* A class representing a directory stream.
|
||||
*/
|
||||
class Dir {
|
||||
readonly path: string;
|
||||
|
||||
/**
|
||||
* Asynchronously iterates over the directory via `readdir(3)` until all entries have been read.
|
||||
*/
|
||||
[Symbol.asyncIterator](): AsyncIterableIterator<Dirent>;
|
||||
|
||||
/**
|
||||
* Asynchronously close the directory's underlying resource handle.
|
||||
* Subsequent reads will result in errors.
|
||||
*/
|
||||
close(): Promise<void>;
|
||||
close(cb: NoParamCallback): void;
|
||||
|
||||
/**
|
||||
* Synchronously close the directory's underlying resource handle.
|
||||
* Subsequent reads will result in errors.
|
||||
*/
|
||||
closeSync(): void;
|
||||
|
||||
/**
|
||||
* Asynchronously read the next directory entry via `readdir(3)` as an `Dirent`.
|
||||
* After the read is completed, a value is returned that will be resolved with an `Dirent`, or `null` if there are no more directory entries to read.
|
||||
* Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms.
|
||||
*/
|
||||
read(): Promise<Dirent | null>;
|
||||
read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void;
|
||||
|
||||
/**
|
||||
* Synchronously read the next directory entry via `readdir(3)` as a `Dirent`.
|
||||
* If there are no more directory entries to read, null will be returned.
|
||||
* Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms.
|
||||
*/
|
||||
readSync(): Dirent;
|
||||
}
|
||||
|
||||
interface FSWatcher extends events.EventEmitter {
|
||||
close(): void;
|
||||
|
||||
@@ -146,7 +194,7 @@ declare module "fs" {
|
||||
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
* URL support is _experimental_.
|
||||
*/
|
||||
function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace rename {
|
||||
@@ -174,14 +222,14 @@ declare module "fs" {
|
||||
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
* @param len If not specified, defaults to `0`.
|
||||
*/
|
||||
function truncate(path: PathLike, len: number | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function truncate(path: PathLike, len: number | undefined | null, callback: NoParamCallback): void;
|
||||
|
||||
/**
|
||||
* Asynchronous truncate(2) - Truncate a file to a specified length.
|
||||
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
* URL support is _experimental_.
|
||||
*/
|
||||
function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function truncate(path: PathLike, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace truncate {
|
||||
@@ -205,13 +253,13 @@ declare module "fs" {
|
||||
* @param fd A file descriptor.
|
||||
* @param len If not specified, defaults to `0`.
|
||||
*/
|
||||
function ftruncate(fd: number, len: number | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function ftruncate(fd: number, len: number | undefined | null, callback: NoParamCallback): void;
|
||||
|
||||
/**
|
||||
* Asynchronous ftruncate(2) - Truncate a file to a specified length.
|
||||
* @param fd A file descriptor.
|
||||
*/
|
||||
function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function ftruncate(fd: number, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace ftruncate {
|
||||
@@ -234,7 +282,7 @@ declare module "fs" {
|
||||
* Asynchronous chown(2) - Change ownership of a file.
|
||||
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
*/
|
||||
function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace chown {
|
||||
@@ -255,7 +303,7 @@ declare module "fs" {
|
||||
* Asynchronous fchown(2) - Change ownership of a file.
|
||||
* @param fd A file descriptor.
|
||||
*/
|
||||
function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace fchown {
|
||||
@@ -276,7 +324,7 @@ declare module "fs" {
|
||||
* Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
|
||||
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
*/
|
||||
function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace lchown {
|
||||
@@ -298,7 +346,7 @@ declare module "fs" {
|
||||
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
||||
*/
|
||||
function chmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function chmod(path: PathLike, mode: string | number, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace chmod {
|
||||
@@ -322,7 +370,7 @@ declare module "fs" {
|
||||
* @param fd A file descriptor.
|
||||
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
||||
*/
|
||||
function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function fchmod(fd: number, mode: string | number, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace fchmod {
|
||||
@@ -346,7 +394,7 @@ declare module "fs" {
|
||||
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
||||
*/
|
||||
function lchmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function lchmod(path: PathLike, mode: string | number, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace lchmod {
|
||||
@@ -433,7 +481,7 @@ declare module "fs" {
|
||||
* @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
*/
|
||||
function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace link {
|
||||
@@ -442,7 +490,7 @@ declare module "fs" {
|
||||
* @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
*/
|
||||
function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
|
||||
function __promisify__(existingPath: PathLike, newPath: PathLike): Promise<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -459,14 +507,14 @@ declare module "fs" {
|
||||
* @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
|
||||
* When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
|
||||
*/
|
||||
function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: NoParamCallback): void;
|
||||
|
||||
/**
|
||||
* Asynchronous symlink(2) - Create a new symbolic link to an existing file.
|
||||
* @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
|
||||
* @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
|
||||
*/
|
||||
function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace symlink {
|
||||
@@ -662,7 +710,7 @@ declare module "fs" {
|
||||
* Asynchronous unlink(2) - delete a name and possibly the file it refers to.
|
||||
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
*/
|
||||
function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function unlink(path: PathLike, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace unlink {
|
||||
@@ -679,11 +727,42 @@ declare module "fs" {
|
||||
*/
|
||||
function unlinkSync(path: PathLike): void;
|
||||
|
||||
interface RmDirOptions {
|
||||
/**
|
||||
* If `true`, perform a recursive directory removal. In
|
||||
* recursive mode, errors are not reported if `path` does not exist, and
|
||||
* operations are retried on failure.
|
||||
* @experimental
|
||||
* @default false
|
||||
*/
|
||||
recursive?: boolean;
|
||||
}
|
||||
|
||||
interface RmDirAsyncOptions extends RmDirOptions {
|
||||
/**
|
||||
* If an `EMFILE` error is encountered, Node.js will
|
||||
* retry the operation with a linear backoff of 1ms longer on each try until the
|
||||
* timeout duration passes this limit. This option is ignored if the `recursive`
|
||||
* option is not `true`.
|
||||
* @default 1000
|
||||
*/
|
||||
emfileWait?: number;
|
||||
/**
|
||||
* If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error is
|
||||
* encountered, Node.js will retry the operation with a linear backoff wait of
|
||||
* 100ms longer on each try. This option represents the number of retries. This
|
||||
* option is ignored if the `recursive` option is not `true`.
|
||||
* @default 3
|
||||
*/
|
||||
maxBusyTries?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Asynchronous rmdir(2) - delete a directory.
|
||||
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
*/
|
||||
function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function rmdir(path: PathLike, callback: NoParamCallback): void;
|
||||
function rmdir(path: PathLike, options: RmDirAsyncOptions, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace rmdir {
|
||||
@@ -691,16 +770,16 @@ declare module "fs" {
|
||||
* Asynchronous rmdir(2) - delete a directory.
|
||||
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
*/
|
||||
function __promisify__(path: PathLike): Promise<void>;
|
||||
function __promisify__(path: PathLike, options?: RmDirAsyncOptions): Promise<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Synchronous rmdir(2) - delete a directory.
|
||||
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
*/
|
||||
function rmdirSync(path: PathLike): void;
|
||||
function rmdirSync(path: PathLike, options?: RmDirOptions): void;
|
||||
|
||||
export interface MakeDirectoryOptions {
|
||||
interface MakeDirectoryOptions {
|
||||
/**
|
||||
* Indicates whether parent folders should be created.
|
||||
* @default false
|
||||
@@ -719,13 +798,13 @@ declare module "fs" {
|
||||
* @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
|
||||
* should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
|
||||
*/
|
||||
function mkdir(path: PathLike, options: number | string | MakeDirectoryOptions | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function mkdir(path: PathLike, options: number | string | MakeDirectoryOptions | undefined | null, callback: NoParamCallback): void;
|
||||
|
||||
/**
|
||||
* Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
|
||||
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
*/
|
||||
function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function mkdir(path: PathLike, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace mkdir {
|
||||
@@ -923,7 +1002,7 @@ declare module "fs" {
|
||||
* Asynchronous close(2) - close a file descriptor.
|
||||
* @param fd A file descriptor.
|
||||
*/
|
||||
function close(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function close(fd: number, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace close {
|
||||
@@ -976,7 +1055,7 @@ declare module "fs" {
|
||||
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
||||
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
||||
*/
|
||||
function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace utimes {
|
||||
@@ -1003,7 +1082,7 @@ declare module "fs" {
|
||||
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
||||
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
||||
*/
|
||||
function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace futimes {
|
||||
@@ -1028,7 +1107,7 @@ declare module "fs" {
|
||||
* Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
|
||||
* @param fd A file descriptor.
|
||||
*/
|
||||
function fsync(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function fsync(fd: number, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace fsync {
|
||||
@@ -1052,7 +1131,7 @@ declare module "fs" {
|
||||
* @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
||||
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
||||
*/
|
||||
function write<TBuffer extends BinaryData>(
|
||||
function write<TBuffer extends NodeJS.ArrayBufferView>(
|
||||
fd: number,
|
||||
buffer: TBuffer,
|
||||
offset: number | undefined | null,
|
||||
@@ -1067,7 +1146,7 @@ declare module "fs" {
|
||||
* @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
|
||||
* @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
||||
*/
|
||||
function write<TBuffer extends BinaryData>(
|
||||
function write<TBuffer extends NodeJS.ArrayBufferView>(
|
||||
fd: number,
|
||||
buffer: TBuffer,
|
||||
offset: number | undefined | null,
|
||||
@@ -1080,7 +1159,7 @@ declare module "fs" {
|
||||
* @param fd A file descriptor.
|
||||
* @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
|
||||
*/
|
||||
function write<TBuffer extends BinaryData>(
|
||||
function write<TBuffer extends NodeJS.ArrayBufferView>(
|
||||
fd: number,
|
||||
buffer: TBuffer,
|
||||
offset: number | undefined | null,
|
||||
@@ -1091,7 +1170,7 @@ declare module "fs" {
|
||||
* Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
|
||||
* @param fd A file descriptor.
|
||||
*/
|
||||
function write<TBuffer extends BinaryData>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
|
||||
function write<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
|
||||
|
||||
/**
|
||||
* Asynchronously writes `string` to the file referenced by the supplied file descriptor.
|
||||
@@ -1132,7 +1211,7 @@ declare module "fs" {
|
||||
* @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
||||
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
||||
*/
|
||||
function __promisify__<TBuffer extends BinaryData>(
|
||||
function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
|
||||
fd: number,
|
||||
buffer?: TBuffer,
|
||||
offset?: number,
|
||||
@@ -1157,7 +1236,7 @@ declare module "fs" {
|
||||
* @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
||||
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
||||
*/
|
||||
function writeSync(fd: number, buffer: BinaryData, offset?: number | null, length?: number | null, position?: number | null): number;
|
||||
function writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number | null, length?: number | null, position?: number | null): number;
|
||||
|
||||
/**
|
||||
* Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written.
|
||||
@@ -1176,7 +1255,7 @@ declare module "fs" {
|
||||
* @param length The number of bytes to read.
|
||||
* @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
|
||||
*/
|
||||
function read<TBuffer extends BinaryData>(
|
||||
function read<TBuffer extends NodeJS.ArrayBufferView>(
|
||||
fd: number,
|
||||
buffer: TBuffer,
|
||||
offset: number,
|
||||
@@ -1194,7 +1273,13 @@ declare module "fs" {
|
||||
* @param length The number of bytes to read.
|
||||
* @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
|
||||
*/
|
||||
function __promisify__<TBuffer extends BinaryData>(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>;
|
||||
function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
|
||||
fd: number,
|
||||
buffer: TBuffer,
|
||||
offset: number,
|
||||
length: number,
|
||||
position: number | null
|
||||
): Promise<{ bytesRead: number, buffer: TBuffer }>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1205,7 +1290,7 @@ declare module "fs" {
|
||||
* @param length The number of bytes to read.
|
||||
* @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
|
||||
*/
|
||||
function readSync(fd: number, buffer: BinaryData, offset: number, length: number, position: number | null): number;
|
||||
function readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: number | null): number;
|
||||
|
||||
/**
|
||||
* Asynchronously reads the entire contents of a file.
|
||||
@@ -1322,7 +1407,7 @@ declare module "fs" {
|
||||
* If `mode` is a string, it is parsed as an octal integer.
|
||||
* If `flag` is not supplied, the default of `'w'` is used.
|
||||
*/
|
||||
function writeFile(path: PathLike | number, data: any, options: WriteFileOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function writeFile(path: PathLike | number, data: any, options: WriteFileOptions, callback: NoParamCallback): void;
|
||||
|
||||
/**
|
||||
* Asynchronously writes data to a file, replacing the file if it already exists.
|
||||
@@ -1331,7 +1416,7 @@ declare module "fs" {
|
||||
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
||||
* @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
|
||||
*/
|
||||
function writeFile(path: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function writeFile(path: PathLike | number, data: any, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace writeFile {
|
||||
@@ -1376,7 +1461,7 @@ declare module "fs" {
|
||||
* If `mode` is a string, it is parsed as an octal integer.
|
||||
* If `flag` is not supplied, the default of `'a'` is used.
|
||||
*/
|
||||
function appendFile(file: PathLike | number, data: any, options: WriteFileOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function appendFile(file: PathLike | number, data: any, options: WriteFileOptions, callback: NoParamCallback): void;
|
||||
|
||||
/**
|
||||
* Asynchronously append data to a file, creating the file if it does not exist.
|
||||
@@ -1385,7 +1470,7 @@ declare module "fs" {
|
||||
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
||||
* @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
|
||||
*/
|
||||
function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function appendFile(file: PathLike | number, data: any, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace appendFile {
|
||||
@@ -1663,6 +1748,13 @@ declare module "fs" {
|
||||
|
||||
/** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */
|
||||
const S_IXOTH: number;
|
||||
|
||||
/**
|
||||
* When set, a memory file mapping is used to access the file. This flag
|
||||
* is available on Windows operating systems only. On other operating systems,
|
||||
* this flag is ignored.
|
||||
*/
|
||||
const UV_FS_O_FILEMAP: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1670,14 +1762,14 @@ declare module "fs" {
|
||||
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
||||
* URL support is _experimental_.
|
||||
*/
|
||||
function access(path: PathLike, mode: number | undefined, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void;
|
||||
|
||||
/**
|
||||
* Asynchronously tests a user's permissions for the file specified by path.
|
||||
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
||||
* URL support is _experimental_.
|
||||
*/
|
||||
function access(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function access(path: PathLike, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace access {
|
||||
@@ -1707,6 +1799,10 @@ declare module "fs" {
|
||||
fd?: number;
|
||||
mode?: number;
|
||||
autoClose?: boolean;
|
||||
/**
|
||||
* @default false
|
||||
*/
|
||||
emitClose?: boolean;
|
||||
start?: number;
|
||||
end?: number;
|
||||
highWaterMark?: number;
|
||||
@@ -1731,7 +1827,7 @@ declare module "fs" {
|
||||
* Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
|
||||
* @param fd A file descriptor.
|
||||
*/
|
||||
function fdatasync(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function fdatasync(fd: number, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace fdatasync {
|
||||
@@ -1757,7 +1853,7 @@ declare module "fs" {
|
||||
* @param src A path to the source file.
|
||||
* @param dest A path to the destination file.
|
||||
*/
|
||||
function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void;
|
||||
/**
|
||||
* Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
|
||||
* No arguments other than a possible exception are given to the callback function.
|
||||
@@ -1768,7 +1864,7 @@ declare module "fs" {
|
||||
* @param dest A path to the destination file.
|
||||
* @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.
|
||||
*/
|
||||
function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
||||
function copyFile(src: PathLike, dest: PathLike, flags: number, callback: NoParamCallback): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
namespace copyFile {
|
||||
@@ -1799,6 +1895,52 @@ declare module "fs" {
|
||||
*/
|
||||
function copyFileSync(src: PathLike, dest: PathLike, flags?: number): void;
|
||||
|
||||
/**
|
||||
* Write an array of ArrayBufferViews to the file specified by fd using writev().
|
||||
* position is the offset from the beginning of the file where this data should be written.
|
||||
* It is unsafe to use fs.writev() multiple times on the same file without waiting for the callback. For this scenario, use fs.createWriteStream().
|
||||
* On Linux, positional writes don't work when the file is opened in append mode.
|
||||
* The kernel ignores the position argument and always appends the data to the end of the file.
|
||||
*/
|
||||
function writev(
|
||||
fd: number,
|
||||
buffers: NodeJS.ArrayBufferView[],
|
||||
cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
|
||||
): void;
|
||||
function writev(
|
||||
fd: number,
|
||||
buffers: NodeJS.ArrayBufferView[],
|
||||
position: number,
|
||||
cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
|
||||
): void;
|
||||
|
||||
interface WriteVResult {
|
||||
bytesWritten: number;
|
||||
buffers: NodeJS.ArrayBufferView[];
|
||||
}
|
||||
|
||||
namespace writev {
|
||||
function __promisify__(fd: number, buffers: NodeJS.ArrayBufferView[], position?: number): Promise<WriteVResult>;
|
||||
}
|
||||
|
||||
/**
|
||||
* See `writev`.
|
||||
*/
|
||||
function writevSync(fd: number, buffers: NodeJS.ArrayBufferView[], position?: number): number;
|
||||
|
||||
interface OpenDirOptions {
|
||||
encoding?: BufferEncoding;
|
||||
}
|
||||
|
||||
function opendirSync(path: string, options?: OpenDirOptions): Dir;
|
||||
|
||||
function opendir(path: string, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
|
||||
function opendir(path: string, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
|
||||
|
||||
namespace opendir {
|
||||
function __promisify__(path: string, options?: OpenDirOptions): Promise<Dir>;
|
||||
}
|
||||
|
||||
namespace promises {
|
||||
interface FileHandle {
|
||||
/**
|
||||
@@ -1925,6 +2067,11 @@ declare module "fs" {
|
||||
*/
|
||||
writeFile(data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise<void>;
|
||||
|
||||
/**
|
||||
* See `fs.writev` promisified version.
|
||||
*/
|
||||
writev(buffers: NodeJS.ArrayBufferView[], position?: number): Promise<WriteVResult>;
|
||||
|
||||
/**
|
||||
* Asynchronous close(2) - close a `FileHandle`.
|
||||
*/
|
||||
@@ -2030,7 +2177,7 @@ declare module "fs" {
|
||||
* Asynchronous rmdir(2) - delete a directory.
|
||||
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
||||
*/
|
||||
function rmdir(path: PathLike): Promise<void>;
|
||||
function rmdir(path: PathLike, options?: RmDirAsyncOptions): Promise<void>;
|
||||
|
||||
/**
|
||||
* Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
|
||||
@@ -2293,5 +2440,7 @@ declare module "fs" {
|
||||
* If a flag is not provided, it defaults to `'r'`.
|
||||
*/
|
||||
function readFile(path: PathLike | FileHandle, options?: { encoding?: string | null, flag?: string | number } | string | null): Promise<string | Buffer>;
|
||||
|
||||
function opendir(path: string, options?: OpenDirOptions): Promise<Dir>;
|
||||
}
|
||||
}
|
||||
|
||||
49
node_modules/@types/node/globals.d.ts
generated
vendored
49
node_modules/@types/node/globals.d.ts
generated
vendored
@@ -185,9 +185,6 @@ declare namespace setImmediate {
|
||||
}
|
||||
declare function clearImmediate(immediateId: NodeJS.Immediate): void;
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
declare function queueMicrotask(callback: () => void): void;
|
||||
|
||||
// TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version.
|
||||
@@ -341,7 +338,7 @@ declare class Buffer extends Uint8Array {
|
||||
* @param encoding encoding used to evaluate (defaults to 'utf8')
|
||||
*/
|
||||
static byteLength(
|
||||
string: string | NodeJS.TypedArray | DataView | ArrayBuffer | SharedArrayBuffer,
|
||||
string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
|
||||
encoding?: BufferEncoding
|
||||
): number;
|
||||
/**
|
||||
@@ -651,9 +648,7 @@ declare namespace NodeJS {
|
||||
|
||||
interface ReadWriteStream extends ReadableStream, WritableStream { }
|
||||
|
||||
interface Events extends EventEmitter { }
|
||||
|
||||
interface Domain extends Events {
|
||||
interface Domain extends EventEmitter {
|
||||
run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
|
||||
add(emitter: EventEmitter | Timer): void;
|
||||
remove(emitter: EventEmitter | Timer): void;
|
||||
@@ -706,7 +701,8 @@ declare namespace NodeJS {
|
||||
| 'openbsd'
|
||||
| 'sunos'
|
||||
| 'win32'
|
||||
| 'cygwin';
|
||||
| 'cygwin'
|
||||
| 'netbsd';
|
||||
|
||||
type Signals =
|
||||
"SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" |
|
||||
@@ -737,31 +733,6 @@ declare namespace NodeJS {
|
||||
[key: string]: string | undefined;
|
||||
}
|
||||
|
||||
interface WriteStream extends Socket {
|
||||
readonly writableFinished: boolean;
|
||||
readonly writableHighWaterMark: number;
|
||||
readonly writableLength: number;
|
||||
columns?: number;
|
||||
rows?: number;
|
||||
_write(chunk: any, encoding: string, callback: (err?: null | Error) => void): void;
|
||||
_destroy(err: Error | null, callback: (err?: null | Error) => void): void;
|
||||
_final(callback: (err?: null | Error) => void): void;
|
||||
setDefaultEncoding(encoding: string): this;
|
||||
cork(): void;
|
||||
uncork(): void;
|
||||
destroy(error?: Error): void;
|
||||
}
|
||||
interface ReadStream extends Socket {
|
||||
readonly readableHighWaterMark: number;
|
||||
readonly readableLength: number;
|
||||
isRaw?: boolean;
|
||||
setRawMode?(mode: boolean): void;
|
||||
_read(size: number): void;
|
||||
_destroy(err: Error | null, callback: (err?: null | Error) => void): void;
|
||||
push(chunk: any, encoding?: string): boolean;
|
||||
destroy(error?: Error): void;
|
||||
}
|
||||
|
||||
interface HRTime {
|
||||
(time?: [number, number]): [number, number];
|
||||
}
|
||||
@@ -1159,7 +1130,12 @@ declare namespace NodeJS {
|
||||
class Module {
|
||||
static runMain(): void;
|
||||
static wrap(code: string): string;
|
||||
static createRequireFromPath(path: string): (path: string) => any;
|
||||
|
||||
/**
|
||||
* @deprecated Deprecated since: v12.2.0. Please use createRequire() instead.
|
||||
*/
|
||||
static createRequireFromPath(path: string): NodeRequireFunction;
|
||||
static createRequire(path: string): NodeRequireFunction;
|
||||
static builtinModules: string[];
|
||||
|
||||
static Module: typeof Module;
|
||||
@@ -1177,4 +1153,9 @@ declare namespace NodeJS {
|
||||
}
|
||||
|
||||
type TypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array;
|
||||
type ArrayBufferView = TypedArray | DataView;
|
||||
|
||||
// The value type here is a "poor man's `unknown`". When these types support TypeScript
|
||||
// 3.0+, we can replace this with `unknown`.
|
||||
type PoorMansUnknown = {} | null | undefined;
|
||||
}
|
||||
|
||||
93
node_modules/@types/node/http.d.ts
generated
vendored
93
node_modules/@types/node/http.d.ts
generated
vendored
@@ -146,6 +146,7 @@ declare module "http" {
|
||||
class ServerResponse extends OutgoingMessage {
|
||||
statusCode: number;
|
||||
statusMessage: string;
|
||||
writableFinished: boolean;
|
||||
|
||||
constructor(req: IncomingMessage);
|
||||
|
||||
@@ -158,6 +159,16 @@ declare module "http" {
|
||||
writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
|
||||
}
|
||||
|
||||
interface InformationEvent {
|
||||
statusCode: number;
|
||||
statusMessage: string;
|
||||
httpVersion: string;
|
||||
httpVersionMajor: number;
|
||||
httpVersionMinor: number;
|
||||
headers: IncomingHttpHeaders;
|
||||
rawHeaders: string[];
|
||||
}
|
||||
|
||||
// https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77
|
||||
class ClientRequest extends OutgoingMessage {
|
||||
connection: Socket;
|
||||
@@ -172,6 +183,86 @@ declare module "http" {
|
||||
setTimeout(timeout: number, callback?: () => void): this;
|
||||
setNoDelay(noDelay?: boolean): void;
|
||||
setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
|
||||
|
||||
addListener(event: 'abort', listener: () => void): this;
|
||||
addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
||||
addListener(event: 'continue', listener: () => void): this;
|
||||
addListener(event: 'information', listener: (info: InformationEvent) => void): this;
|
||||
addListener(event: 'response', listener: (response: IncomingMessage) => void): this;
|
||||
addListener(event: 'socket', listener: (socket: Socket) => void): this;
|
||||
addListener(event: 'timeout', listener: () => void): this;
|
||||
addListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
||||
addListener(event: 'close', listener: () => void): this;
|
||||
addListener(event: 'drain', listener: () => void): this;
|
||||
addListener(event: 'error', listener: (err: Error) => void): this;
|
||||
addListener(event: 'finish', listener: () => void): this;
|
||||
addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
|
||||
addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
|
||||
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
|
||||
on(event: 'abort', listener: () => void): this;
|
||||
on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
||||
on(event: 'continue', listener: () => void): this;
|
||||
on(event: 'information', listener: (info: InformationEvent) => void): this;
|
||||
on(event: 'response', listener: (response: IncomingMessage) => void): this;
|
||||
on(event: 'socket', listener: (socket: Socket) => void): this;
|
||||
on(event: 'timeout', listener: () => void): this;
|
||||
on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
||||
on(event: 'close', listener: () => void): this;
|
||||
on(event: 'drain', listener: () => void): this;
|
||||
on(event: 'error', listener: (err: Error) => void): this;
|
||||
on(event: 'finish', listener: () => void): this;
|
||||
on(event: 'pipe', listener: (src: stream.Readable) => void): this;
|
||||
on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
|
||||
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
|
||||
once(event: 'abort', listener: () => void): this;
|
||||
once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
||||
once(event: 'continue', listener: () => void): this;
|
||||
once(event: 'information', listener: (info: InformationEvent) => void): this;
|
||||
once(event: 'response', listener: (response: IncomingMessage) => void): this;
|
||||
once(event: 'socket', listener: (socket: Socket) => void): this;
|
||||
once(event: 'timeout', listener: () => void): this;
|
||||
once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
||||
once(event: 'close', listener: () => void): this;
|
||||
once(event: 'drain', listener: () => void): this;
|
||||
once(event: 'error', listener: (err: Error) => void): this;
|
||||
once(event: 'finish', listener: () => void): this;
|
||||
once(event: 'pipe', listener: (src: stream.Readable) => void): this;
|
||||
once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
|
||||
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
|
||||
prependListener(event: 'abort', listener: () => void): this;
|
||||
prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
||||
prependListener(event: 'continue', listener: () => void): this;
|
||||
prependListener(event: 'information', listener: (info: InformationEvent) => void): this;
|
||||
prependListener(event: 'response', listener: (response: IncomingMessage) => void): this;
|
||||
prependListener(event: 'socket', listener: (socket: Socket) => void): this;
|
||||
prependListener(event: 'timeout', listener: () => void): this;
|
||||
prependListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
||||
prependListener(event: 'close', listener: () => void): this;
|
||||
prependListener(event: 'drain', listener: () => void): this;
|
||||
prependListener(event: 'error', listener: (err: Error) => void): this;
|
||||
prependListener(event: 'finish', listener: () => void): this;
|
||||
prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
|
||||
prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
|
||||
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
|
||||
prependOnceListener(event: 'abort', listener: () => void): this;
|
||||
prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
||||
prependOnceListener(event: 'continue', listener: () => void): this;
|
||||
prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this;
|
||||
prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this;
|
||||
prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this;
|
||||
prependOnceListener(event: 'timeout', listener: () => void): this;
|
||||
prependOnceListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
||||
prependOnceListener(event: 'close', listener: () => void): this;
|
||||
prependOnceListener(event: 'drain', listener: () => void): this;
|
||||
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
|
||||
prependOnceListener(event: 'finish', listener: () => void): this;
|
||||
prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
|
||||
prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
|
||||
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
}
|
||||
|
||||
class IncomingMessage extends stream.Readable {
|
||||
@@ -186,7 +277,7 @@ declare module "http" {
|
||||
rawHeaders: string[];
|
||||
trailers: { [key: string]: string | undefined };
|
||||
rawTrailers: string[];
|
||||
setTimeout(msecs: number, callback: () => void): this;
|
||||
setTimeout(msecs: number, callback?: () => void): this;
|
||||
/**
|
||||
* Only valid for request obtained from http.Server.
|
||||
*/
|
||||
|
||||
85
node_modules/@types/node/http2.d.ts
generated
vendored
85
node_modules/@types/node/http2.d.ts
generated
vendored
@@ -49,19 +49,17 @@ declare module "http2" {
|
||||
}
|
||||
|
||||
export interface ServerStreamFileResponseOptions {
|
||||
statCheck?: (stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void | boolean;
|
||||
statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean;
|
||||
waitForTrailers?: boolean;
|
||||
offset?: number;
|
||||
length?: number;
|
||||
}
|
||||
|
||||
export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions {
|
||||
onError?: (err: NodeJS.ErrnoException) => void;
|
||||
onError?(err: NodeJS.ErrnoException): void;
|
||||
}
|
||||
|
||||
export class Http2Stream extends stream.Duplex {
|
||||
protected constructor();
|
||||
|
||||
export interface Http2Stream extends stream.Duplex {
|
||||
readonly aborted: boolean;
|
||||
readonly bufferSize: number;
|
||||
readonly closed: boolean;
|
||||
@@ -182,9 +180,7 @@ declare module "http2" {
|
||||
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
}
|
||||
|
||||
export class ClientHttp2Stream extends Http2Stream {
|
||||
private constructor();
|
||||
|
||||
export interface ClientHttp2Stream extends Http2Stream {
|
||||
addListener(event: "continue", listener: () => {}): this;
|
||||
addListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
|
||||
addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
|
||||
@@ -222,16 +218,14 @@ declare module "http2" {
|
||||
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
}
|
||||
|
||||
export class ServerHttp2Stream extends Http2Stream {
|
||||
private constructor();
|
||||
|
||||
additionalHeaders(headers: OutgoingHttpHeaders): void;
|
||||
export interface ServerHttp2Stream extends Http2Stream {
|
||||
readonly headersSent: boolean;
|
||||
readonly pushAllowed: boolean;
|
||||
additionalHeaders(headers: OutgoingHttpHeaders): void;
|
||||
pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
|
||||
pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
|
||||
respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void;
|
||||
respondWithFD(fd: number, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void;
|
||||
respondWithFD(fd: number | fs.promises.FileHandle, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void;
|
||||
respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void;
|
||||
}
|
||||
|
||||
@@ -267,29 +261,28 @@ declare module "http2" {
|
||||
inflateDynamicTableSize?: number;
|
||||
}
|
||||
|
||||
export class Http2Session extends events.EventEmitter {
|
||||
protected constructor();
|
||||
|
||||
export interface Http2Session extends events.EventEmitter {
|
||||
readonly alpnProtocol?: string;
|
||||
close(callback?: () => void): void;
|
||||
readonly closed: boolean;
|
||||
readonly connecting: boolean;
|
||||
destroy(error?: Error, code?: number): void;
|
||||
readonly destroyed: boolean;
|
||||
readonly encrypted?: boolean;
|
||||
goaway(code?: number, lastStreamID?: number, opaqueData?: Buffer | DataView | NodeJS.TypedArray): void;
|
||||
readonly localSettings: Settings;
|
||||
readonly originSet?: string[];
|
||||
readonly pendingSettingsAck: boolean;
|
||||
ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
|
||||
ping(payload: Buffer | DataView | NodeJS.TypedArray , callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
|
||||
ref(): void;
|
||||
readonly remoteSettings: Settings;
|
||||
setTimeout(msecs: number, callback?: () => void): void;
|
||||
readonly socket: net.Socket | tls.TLSSocket;
|
||||
readonly state: SessionState;
|
||||
settings(settings: Settings): void;
|
||||
readonly type: number;
|
||||
|
||||
close(callback?: () => void): void;
|
||||
destroy(error?: Error, code?: number): void;
|
||||
goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void;
|
||||
ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
|
||||
ping(payload: NodeJS.ArrayBufferView, callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
|
||||
ref(): void;
|
||||
setTimeout(msecs: number, callback?: () => void): void;
|
||||
settings(settings: Settings): void;
|
||||
unref(): void;
|
||||
|
||||
addListener(event: "close", listener: () => void): this;
|
||||
@@ -353,9 +346,7 @@ declare module "http2" {
|
||||
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
}
|
||||
|
||||
export class ClientHttp2Session extends Http2Session {
|
||||
private constructor();
|
||||
|
||||
export interface ClientHttp2Session extends Http2Session {
|
||||
request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream;
|
||||
|
||||
addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
|
||||
@@ -399,12 +390,11 @@ declare module "http2" {
|
||||
origin: number | string | url.URL;
|
||||
}
|
||||
|
||||
export class ServerHttp2Session extends Http2Session {
|
||||
private constructor();
|
||||
export interface ServerHttp2Session extends Http2Session {
|
||||
readonly server: Http2Server | Http2SecureServer;
|
||||
|
||||
altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void;
|
||||
origin(...args: Array<string | url.URL | { origin: string }>): void;
|
||||
readonly server: Http2Server | Http2SecureServer;
|
||||
|
||||
addListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
|
||||
addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
|
||||
@@ -441,9 +431,10 @@ declare module "http2" {
|
||||
maxSendHeaderBlockLength?: number;
|
||||
paddingStrategy?: number;
|
||||
peerMaxConcurrentStreams?: number;
|
||||
selectPadding?: (frameLen: number, maxFrameLen: number) => number;
|
||||
settings?: Settings;
|
||||
createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex;
|
||||
|
||||
selectPadding?(frameLen: number, maxFrameLen: number): number;
|
||||
createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex;
|
||||
}
|
||||
|
||||
export interface ClientSessionOptions extends SessionOptions {
|
||||
@@ -468,9 +459,7 @@ declare module "http2" {
|
||||
origins?: string[];
|
||||
}
|
||||
|
||||
export class Http2Server extends net.Server {
|
||||
private constructor();
|
||||
|
||||
export interface Http2Server extends net.Server {
|
||||
addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
|
||||
addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
|
||||
addListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
|
||||
@@ -522,9 +511,7 @@ declare module "http2" {
|
||||
setTimeout(msec?: number, callback?: () => void): this;
|
||||
}
|
||||
|
||||
export class Http2SecureServer extends tls.Server {
|
||||
private constructor();
|
||||
|
||||
export interface Http2SecureServer extends tls.Server {
|
||||
addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
|
||||
addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
|
||||
addListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
|
||||
@@ -593,12 +580,12 @@ declare module "http2" {
|
||||
readonly rawHeaders: string[];
|
||||
readonly rawTrailers: string[];
|
||||
readonly scheme: string;
|
||||
setTimeout(msecs: number, callback?: () => void): void;
|
||||
readonly socket: net.Socket | tls.TLSSocket;
|
||||
readonly stream: ServerHttp2Stream;
|
||||
readonly trailers: IncomingHttpHeaders;
|
||||
readonly url: string;
|
||||
|
||||
setTimeout(msecs: number, callback?: () => void): void;
|
||||
read(size?: number): Buffer | string | null;
|
||||
|
||||
addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
|
||||
@@ -653,25 +640,25 @@ declare module "http2" {
|
||||
export class Http2ServerResponse extends stream.Stream {
|
||||
constructor(stream: ServerHttp2Stream);
|
||||
|
||||
addTrailers(trailers: OutgoingHttpHeaders): void;
|
||||
readonly connection: net.Socket | tls.TLSSocket;
|
||||
readonly finished: boolean;
|
||||
readonly headersSent: boolean;
|
||||
readonly socket: net.Socket | tls.TLSSocket;
|
||||
readonly stream: ServerHttp2Stream;
|
||||
sendDate: boolean;
|
||||
statusCode: number;
|
||||
statusMessage: '';
|
||||
addTrailers(trailers: OutgoingHttpHeaders): void;
|
||||
end(callback?: () => void): void;
|
||||
end(data: string | Uint8Array, callback?: () => void): void;
|
||||
end(data: string | Uint8Array, encoding: string, callback?: () => void): void;
|
||||
readonly finished: boolean;
|
||||
getHeader(name: string): string;
|
||||
getHeaderNames(): string[];
|
||||
getHeaders(): OutgoingHttpHeaders;
|
||||
hasHeader(name: string): boolean;
|
||||
readonly headersSent: boolean;
|
||||
removeHeader(name: string): void;
|
||||
sendDate: boolean;
|
||||
setHeader(name: string, value: number | string | string[]): void;
|
||||
setTimeout(msecs: number, callback?: () => void): void;
|
||||
readonly socket: net.Socket | tls.TLSSocket;
|
||||
statusCode: number;
|
||||
statusMessage: '';
|
||||
readonly stream: ServerHttp2Stream;
|
||||
write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean;
|
||||
write(chunk: string | Uint8Array, encoding: string, callback?: (err: Error) => void): boolean;
|
||||
writeContinue(): void;
|
||||
@@ -951,10 +938,10 @@ declare module "http2" {
|
||||
export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
|
||||
export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
|
||||
|
||||
export function connect(authority: string | url.URL, listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session;
|
||||
export function connect(authority: string | url.URL, listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session;
|
||||
export function connect(
|
||||
authority: string | url.URL,
|
||||
options?: ClientSessionOptions | SecureClientSessionOptions,
|
||||
listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
|
||||
listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void
|
||||
): ClientHttp2Session;
|
||||
}
|
||||
|
||||
8
node_modules/@types/node/index.d.ts
generated
vendored
8
node_modules/@types/node/index.d.ts
generated
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for non-npm package Node.js 12.6
|
||||
// Type definitions for non-npm package Node.js 12.12
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped>
|
||||
@@ -21,10 +21,10 @@
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// Matthieu Sieben <https://github.com/matthieusieben>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Nikita Galkin <https://github.com/galkin>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Simon Schick <https://github.com/SimonSchick>
|
||||
@@ -37,6 +37,8 @@
|
||||
// Jordi Oliveras Rovira <https://github.com/j-oliveras>
|
||||
// Thanik Bhongbhibhat <https://github.com/bhongy>
|
||||
// Marcin Kopacz <https://github.com/chyzwar>
|
||||
// Trivikram Kamat <https://github.com/trivikr>
|
||||
// Minh Son Nguyen <https://github.com/nguymin4>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// NOTE: These definitions support NodeJS and TypeScript 3.2.
|
||||
@@ -66,8 +68,8 @@ interface WeakSetConstructor { }
|
||||
interface Set<T> {}
|
||||
interface Map<K, V> {}
|
||||
interface ReadonlySet<T> {}
|
||||
interface IteratorResult<T> { }
|
||||
interface Iterable<T> { }
|
||||
interface IteratorResult<T> { }
|
||||
interface AsyncIterable<T> { }
|
||||
interface Iterator<T> {
|
||||
next(value?: any): IteratorResult<T>;
|
||||
|
||||
3839
node_modules/@types/node/inspector.d.ts
generated
vendored
3839
node_modules/@types/node/inspector.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
23
node_modules/@types/node/net.d.ts
generated
vendored
23
node_modules/@types/node/net.d.ts
generated
vendored
@@ -18,7 +18,26 @@ declare module "net" {
|
||||
writable?: boolean;
|
||||
}
|
||||
|
||||
interface TcpSocketConnectOpts {
|
||||
interface OnReadOpts {
|
||||
buffer: Uint8Array | (() => Uint8Array);
|
||||
/**
|
||||
* This function is called for every chunk of incoming data.
|
||||
* Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer.
|
||||
* Return false from this function to implicitly pause() the socket.
|
||||
*/
|
||||
callback(bytesWritten: number, buf: Uint8Array): boolean;
|
||||
}
|
||||
|
||||
interface ConnectOpts {
|
||||
/**
|
||||
* If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket.
|
||||
* Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will
|
||||
* still be emitted as normal and methods like pause() and resume() will also behave as expected.
|
||||
*/
|
||||
onread?: OnReadOpts;
|
||||
}
|
||||
|
||||
interface TcpSocketConnectOpts extends ConnectOpts {
|
||||
port: number;
|
||||
host?: string;
|
||||
localAddress?: string;
|
||||
@@ -28,7 +47,7 @@ declare module "net" {
|
||||
lookup?: LookupFunction;
|
||||
}
|
||||
|
||||
interface IpcSocketConnectOpts {
|
||||
interface IpcSocketConnectOpts extends ConnectOpts {
|
||||
path: string;
|
||||
}
|
||||
|
||||
|
||||
62
node_modules/@types/node/os.d.ts
generated
vendored
62
node_modules/@types/node/os.d.ts
generated
vendored
@@ -52,6 +52,7 @@ declare module "os" {
|
||||
function userInfo(options?: { encoding: string }): UserInfo<string>;
|
||||
const constants: {
|
||||
UV_UDP_REUSEADDR: number;
|
||||
// signals: { [key in NodeJS.Signals]: number; }; @todo: change after migration to typescript 2.1
|
||||
signals: {
|
||||
SIGHUP: number;
|
||||
SIGINT: number;
|
||||
@@ -74,6 +75,7 @@ declare module "os" {
|
||||
SIGCONT: number;
|
||||
SIGSTOP: number;
|
||||
SIGTSTP: number;
|
||||
SIGBREAK: number;
|
||||
SIGTTIN: number;
|
||||
SIGTTOU: number;
|
||||
SIGURG: number;
|
||||
@@ -84,7 +86,9 @@ declare module "os" {
|
||||
SIGWINCH: number;
|
||||
SIGIO: number;
|
||||
SIGPOLL: number;
|
||||
SIGLOST: number;
|
||||
SIGPWR: number;
|
||||
SIGINFO: number;
|
||||
SIGSYS: number;
|
||||
SIGUNUSED: number;
|
||||
};
|
||||
@@ -168,6 +172,64 @@ declare module "os" {
|
||||
ETXTBSY: number;
|
||||
EWOULDBLOCK: number;
|
||||
EXDEV: number;
|
||||
WSAEINTR: number;
|
||||
WSAEBADF: number;
|
||||
WSAEACCES: number;
|
||||
WSAEFAULT: number;
|
||||
WSAEINVAL: number;
|
||||
WSAEMFILE: number;
|
||||
WSAEWOULDBLOCK: number;
|
||||
WSAEINPROGRESS: number;
|
||||
WSAEALREADY: number;
|
||||
WSAENOTSOCK: number;
|
||||
WSAEDESTADDRREQ: number;
|
||||
WSAEMSGSIZE: number;
|
||||
WSAEPROTOTYPE: number;
|
||||
WSAENOPROTOOPT: number;
|
||||
WSAEPROTONOSUPPORT: number;
|
||||
WSAESOCKTNOSUPPORT: number;
|
||||
WSAEOPNOTSUPP: number;
|
||||
WSAEPFNOSUPPORT: number;
|
||||
WSAEAFNOSUPPORT: number;
|
||||
WSAEADDRINUSE: number;
|
||||
WSAEADDRNOTAVAIL: number;
|
||||
WSAENETDOWN: number;
|
||||
WSAENETUNREACH: number;
|
||||
WSAENETRESET: number;
|
||||
WSAECONNABORTED: number;
|
||||
WSAECONNRESET: number;
|
||||
WSAENOBUFS: number;
|
||||
WSAEISCONN: number;
|
||||
WSAENOTCONN: number;
|
||||
WSAESHUTDOWN: number;
|
||||
WSAETOOMANYREFS: number;
|
||||
WSAETIMEDOUT: number;
|
||||
WSAECONNREFUSED: number;
|
||||
WSAELOOP: number;
|
||||
WSAENAMETOOLONG: number;
|
||||
WSAEHOSTDOWN: number;
|
||||
WSAEHOSTUNREACH: number;
|
||||
WSAENOTEMPTY: number;
|
||||
WSAEPROCLIM: number;
|
||||
WSAEUSERS: number;
|
||||
WSAEDQUOT: number;
|
||||
WSAESTALE: number;
|
||||
WSAEREMOTE: number;
|
||||
WSASYSNOTREADY: number;
|
||||
WSAVERNOTSUPPORTED: number;
|
||||
WSANOTINITIALISED: number;
|
||||
WSAEDISCON: number;
|
||||
WSAENOMORE: number;
|
||||
WSAECANCELLED: number;
|
||||
WSAEINVALIDPROCTABLE: number;
|
||||
WSAEINVALIDPROVIDER: number;
|
||||
WSAEPROVIDERFAILEDINIT: number;
|
||||
WSASYSCALLFAILURE: number;
|
||||
WSASERVICE_NOT_FOUND: number;
|
||||
WSATYPE_NOT_FOUND: number;
|
||||
WSA_E_NO_MORE: number;
|
||||
WSA_E_CANCELLED: number;
|
||||
WSAEREFUSED: number;
|
||||
};
|
||||
priority: {
|
||||
PRIORITY_LOW: number;
|
||||
|
||||
53
node_modules/@types/node/package.json
generated
vendored
53
node_modules/@types/node/package.json
generated
vendored
@@ -1,37 +1,33 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@types/node@12.6.9",
|
||||
"/Users/imranismail/Projects/setup-kustomize"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@types/node@12.6.9",
|
||||
"_id": "@types/node@12.6.9",
|
||||
"_from": "@types/node@12.12.7",
|
||||
"_id": "@types/node@12.12.7",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-+YB9FtyxXGyD54p8rXwWaN1EWEyar5L58GlGWgtH2I9rGmLGBQcw63+0jw+ujqVavNuO47S1ByAjm9zdHMnskw==",
|
||||
"_integrity": "sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==",
|
||||
"_location": "/@types/node",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@types/node@12.6.9",
|
||||
"raw": "@types/node@12.12.7",
|
||||
"name": "@types/node",
|
||||
"escapedName": "@types%2fnode",
|
||||
"scope": "@types",
|
||||
"rawSpec": "12.6.9",
|
||||
"rawSpec": "12.12.7",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "12.6.9"
|
||||
"fetchSpec": "12.12.7"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#DEV:/"
|
||||
"#DEV:/",
|
||||
"#USER"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@types/node/-/node-12.6.9.tgz",
|
||||
"_spec": "12.6.9",
|
||||
"_resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.7.tgz",
|
||||
"_shasum": "01e4ea724d9e3bd50d90c11fd5980ba317d8fa11",
|
||||
"_spec": "@types/node@12.12.7",
|
||||
"_where": "/Users/imranismail/Projects/setup-kustomize",
|
||||
"bugs": {
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Microsoft TypeScript",
|
||||
@@ -117,10 +113,6 @@
|
||||
"name": "Mariusz Wiktorczyk",
|
||||
"url": "https://github.com/mwiktorczyk"
|
||||
},
|
||||
{
|
||||
"name": "Matthieu Sieben",
|
||||
"url": "https://github.com/matthieusieben"
|
||||
},
|
||||
{
|
||||
"name": "Mohsen Azimi",
|
||||
"url": "https://github.com/mohsen1"
|
||||
@@ -133,6 +125,10 @@
|
||||
"name": "Nicolas Voigt",
|
||||
"url": "https://github.com/octo-sniffle"
|
||||
},
|
||||
{
|
||||
"name": "Nikita Galkin",
|
||||
"url": "https://github.com/galkin"
|
||||
},
|
||||
{
|
||||
"name": "Parambir Singh",
|
||||
"url": "https://github.com/parambirs"
|
||||
@@ -180,9 +176,18 @@
|
||||
{
|
||||
"name": "Marcin Kopacz",
|
||||
"url": "https://github.com/chyzwar"
|
||||
},
|
||||
{
|
||||
"name": "Trivikram Kamat",
|
||||
"url": "https://github.com/trivikr"
|
||||
},
|
||||
{
|
||||
"name": "Minh Son Nguyen",
|
||||
"url": "https://github.com/nguymin4"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "TypeScript definitions for Node.js",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
|
||||
"license": "MIT",
|
||||
@@ -194,9 +199,9 @@
|
||||
"directory": "types/node"
|
||||
},
|
||||
"scripts": {},
|
||||
"typeScriptVersion": "2.0",
|
||||
"types": "index",
|
||||
"typesPublisherContentHash": "5953833094f8f12d251b73b7eeb9158bcd2af53e785ba1b8709b994c2694f76c",
|
||||
"typeScriptVersion": "2.8",
|
||||
"types": "index.d.ts",
|
||||
"typesPublisherContentHash": "a02ca3410df572421b5c3f9cb42feca6989e17002defcbd3d03e36d8e38e54c2",
|
||||
"typesVersions": {
|
||||
">=3.2.0-0": {
|
||||
"*": [
|
||||
@@ -204,5 +209,5 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": "12.6.9"
|
||||
"version": "12.12.7"
|
||||
}
|
||||
|
||||
12
node_modules/@types/node/process.d.ts
generated
vendored
12
node_modules/@types/node/process.d.ts
generated
vendored
@@ -1,3 +1,15 @@
|
||||
declare module "process" {
|
||||
import * as tty from "tty";
|
||||
|
||||
global {
|
||||
namespace NodeJS {
|
||||
// this namespace merge is here because these are specifically used
|
||||
// as the type for process.stdin, process.stdout, and process.stderr.
|
||||
// they can't live in tty.d.ts because we need to disambiguate the imported name.
|
||||
interface ReadStream extends tty.ReadStream {}
|
||||
interface WriteStream extends tty.WriteStream {}
|
||||
}
|
||||
}
|
||||
|
||||
export = process;
|
||||
}
|
||||
|
||||
5
node_modules/@types/node/querystring.d.ts
generated
vendored
5
node_modules/@types/node/querystring.d.ts
generated
vendored
@@ -11,10 +11,7 @@ declare module "querystring" {
|
||||
interface ParsedUrlQuery { [key: string]: string | string[]; }
|
||||
|
||||
interface ParsedUrlQueryInput {
|
||||
[key: string]:
|
||||
// The value type here is a "poor man's `unknown`". When these types support TypeScript
|
||||
// 3.0+, we can replace this with `unknown`.
|
||||
{} | null | undefined;
|
||||
[key: string]: NodeJS.PoorMansUnknown;
|
||||
}
|
||||
|
||||
function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string;
|
||||
|
||||
24
node_modules/@types/node/readline.d.ts
generated
vendored
24
node_modules/@types/node/readline.d.ts
generated
vendored
@@ -127,10 +127,24 @@ declare module "readline" {
|
||||
|
||||
function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
|
||||
function createInterface(options: ReadLineOptions): Interface;
|
||||
function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
|
||||
|
||||
function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number): void;
|
||||
function emitKeypressEvents(stream: NodeJS.ReadableStream, interface?: Interface): void;
|
||||
function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void;
|
||||
function clearLine(stream: NodeJS.WritableStream, dir: number): void;
|
||||
function clearScreenDown(stream: NodeJS.WritableStream): void;
|
||||
type Direction = -1 | 0 | 1;
|
||||
|
||||
/**
|
||||
* Clears the current line of this WriteStream in a direction identified by `dir`.
|
||||
*/
|
||||
function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
|
||||
/**
|
||||
* Clears this `WriteStream` from the current cursor down.
|
||||
*/
|
||||
function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
|
||||
/**
|
||||
* Moves this WriteStream's cursor to the specified position.
|
||||
*/
|
||||
function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
|
||||
/**
|
||||
* Moves this WriteStream's cursor relative to its current position.
|
||||
*/
|
||||
function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
|
||||
}
|
||||
|
||||
4
node_modules/@types/node/repl.d.ts
generated
vendored
4
node_modules/@types/node/repl.d.ts
generated
vendored
@@ -353,13 +353,13 @@ declare module "repl" {
|
||||
/**
|
||||
* A flag passed in the REPL options. Evaluates expressions in sloppy mode.
|
||||
*/
|
||||
export const REPL_MODE_SLOPPY: symbol; // TODO: unique symbol
|
||||
const REPL_MODE_SLOPPY: symbol; // TODO: unique symbol
|
||||
|
||||
/**
|
||||
* A flag passed in the REPL options. Evaluates expressions in strict mode.
|
||||
* This is equivalent to prefacing every repl statement with `'use strict'`.
|
||||
*/
|
||||
export const REPL_MODE_STRICT: symbol; // TODO: unique symbol
|
||||
const REPL_MODE_STRICT: symbol; // TODO: unique symbol
|
||||
|
||||
/**
|
||||
* Creates and starts a `repl.REPLServer` instance.
|
||||
|
||||
14
node_modules/@types/node/stream.d.ts
generated
vendored
14
node_modules/@types/node/stream.d.ts
generated
vendored
@@ -26,6 +26,8 @@ declare module "stream" {
|
||||
readable: boolean;
|
||||
readonly readableHighWaterMark: number;
|
||||
readonly readableLength: number;
|
||||
readonly readableObjectMode: boolean;
|
||||
destroyed: boolean;
|
||||
constructor(opts?: ReadableOptions);
|
||||
_read(size: number): void;
|
||||
read(size?: number): any;
|
||||
@@ -116,9 +118,12 @@ declare module "stream" {
|
||||
|
||||
class Writable extends Stream implements NodeJS.WritableStream {
|
||||
readonly writable: boolean;
|
||||
readonly writableEnded: boolean;
|
||||
readonly writableFinished: boolean;
|
||||
readonly writableHighWaterMark: number;
|
||||
readonly writableLength: number;
|
||||
readonly writableObjectMode: boolean;
|
||||
destroyed: boolean;
|
||||
constructor(opts?: WritableOptions);
|
||||
_write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
|
||||
_writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void;
|
||||
@@ -215,9 +220,11 @@ declare module "stream" {
|
||||
// Note: Duplex extends both Readable and Writable.
|
||||
class Duplex extends Readable implements Writable {
|
||||
readonly writable: boolean;
|
||||
readonly writableEnded: boolean;
|
||||
readonly writableFinished: boolean;
|
||||
readonly writableHighWaterMark: number;
|
||||
readonly writableLength: number;
|
||||
readonly writableObjectMode: boolean;
|
||||
constructor(opts?: DuplexOptions);
|
||||
_write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
|
||||
_writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void;
|
||||
@@ -300,7 +307,12 @@ declare module "stream" {
|
||||
): Promise<void>;
|
||||
}
|
||||
|
||||
interface Pipe { }
|
||||
interface Pipe {
|
||||
close(): void;
|
||||
hasRef(): boolean;
|
||||
ref(): void;
|
||||
unref(): void;
|
||||
}
|
||||
}
|
||||
|
||||
export = internal;
|
||||
|
||||
2
node_modules/@types/node/tls.d.ts
generated
vendored
2
node_modules/@types/node/tls.d.ts
generated
vendored
@@ -64,7 +64,7 @@ declare module "tls" {
|
||||
version: string;
|
||||
}
|
||||
|
||||
export interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions {
|
||||
interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions {
|
||||
/**
|
||||
* If true the TLS socket will be instantiated in server-mode.
|
||||
* Defaults to false.
|
||||
|
||||
6
node_modules/@types/node/trace_events.d.ts
generated
vendored
6
node_modules/@types/node/trace_events.d.ts
generated
vendored
@@ -9,7 +9,7 @@ declare module "trace_events" {
|
||||
* event categories. Calling `tracing.disable()` will remove the categories
|
||||
* from the set of enabled trace event categories.
|
||||
*/
|
||||
export interface Tracing {
|
||||
interface Tracing {
|
||||
/**
|
||||
* A comma-separated list of the trace event categories covered by this
|
||||
* `Tracing` object.
|
||||
@@ -49,7 +49,7 @@ declare module "trace_events" {
|
||||
/**
|
||||
* Creates and returns a Tracing object for the given set of categories.
|
||||
*/
|
||||
export function createTracing(options: CreateTracingOptions): Tracing;
|
||||
function createTracing(options: CreateTracingOptions): Tracing;
|
||||
|
||||
/**
|
||||
* Returns a comma-separated list of all currently-enabled trace event
|
||||
@@ -57,5 +57,5 @@ declare module "trace_events" {
|
||||
* determined by the union of all currently-enabled `Tracing` objects and
|
||||
* any categories enabled using the `--trace-event-categories` flag.
|
||||
*/
|
||||
export function getEnabledCategories(): string;
|
||||
function getEnabledCategories(): string | undefined;
|
||||
}
|
||||
|
||||
33
node_modules/@types/node/ts3.2/fs.d.ts
generated
vendored
Normal file
33
node_modules/@types/node/ts3.2/fs.d.ts
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
// tslint:disable-next-line:no-bad-reference
|
||||
/// <reference path="../fs.d.ts" />
|
||||
|
||||
declare module 'fs' {
|
||||
interface BigIntStats extends StatsBase<BigInt> {
|
||||
}
|
||||
|
||||
class BigIntStats {
|
||||
atimeNs: BigInt;
|
||||
mtimeNs: BigInt;
|
||||
ctimeNs: BigInt;
|
||||
birthtimeNs: BigInt;
|
||||
}
|
||||
|
||||
interface BigIntOptions {
|
||||
bigint: true;
|
||||
}
|
||||
|
||||
interface StatOptions {
|
||||
bigint: boolean;
|
||||
}
|
||||
|
||||
function stat(path: PathLike, options: BigIntOptions, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
|
||||
function stat(path: PathLike, options: StatOptions, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
|
||||
|
||||
namespace stat {
|
||||
function __promisify__(path: PathLike, options: BigIntOptions): Promise<BigIntStats>;
|
||||
function __promisify__(path: PathLike, options: StatOptions): Promise<Stats | BigIntStats>;
|
||||
}
|
||||
|
||||
function statSync(path: PathLike, options: BigIntOptions): BigIntStats;
|
||||
function statSync(path: PathLike, options: StatOptions): Stats | BigIntStats;
|
||||
}
|
||||
1
node_modules/@types/node/ts3.2/index.d.ts
generated
vendored
1
node_modules/@types/node/ts3.2/index.d.ts
generated
vendored
@@ -16,5 +16,6 @@
|
||||
/// <reference path="../base.d.ts" />
|
||||
|
||||
// TypeScript 3.2-specific augmentations:
|
||||
/// <reference path="fs.d.ts" />
|
||||
/// <reference path="util.d.ts" />
|
||||
/// <reference path="globals.d.ts" />
|
||||
|
||||
22
node_modules/@types/node/tty.d.ts
generated
vendored
22
node_modules/@types/node/tty.d.ts
generated
vendored
@@ -3,6 +3,7 @@ declare module "tty" {
|
||||
|
||||
function isatty(fd: number): boolean;
|
||||
class ReadStream extends net.Socket {
|
||||
constructor(fd: number, options?: net.SocketConstructorOpts);
|
||||
isRaw: boolean;
|
||||
setRawMode(mode: boolean): void;
|
||||
isTTY: boolean;
|
||||
@@ -14,6 +15,7 @@ declare module "tty" {
|
||||
*/
|
||||
type Direction = -1 | 0 | 1;
|
||||
class WriteStream extends net.Socket {
|
||||
constructor(fd: number);
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "resize", listener: () => void): this;
|
||||
|
||||
@@ -32,9 +34,23 @@ declare module "tty" {
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "resize", listener: () => void): this;
|
||||
|
||||
clearLine(dir: Direction): void;
|
||||
clearScreenDown(): void;
|
||||
cursorTo(x: number, y: number): void;
|
||||
/**
|
||||
* Clears the current line of this WriteStream in a direction identified by `dir`.
|
||||
*/
|
||||
clearLine(dir: Direction, callback?: () => void): boolean;
|
||||
/**
|
||||
* Clears this `WriteStream` from the current cursor down.
|
||||
*/
|
||||
clearScreenDown(callback?: () => void): boolean;
|
||||
/**
|
||||
* Moves this WriteStream's cursor to the specified position.
|
||||
*/
|
||||
cursorTo(x: number, y?: number, callback?: () => void): boolean;
|
||||
cursorTo(x: number, callback: () => void): boolean;
|
||||
/**
|
||||
* Moves this WriteStream's cursor relative to its current position.
|
||||
*/
|
||||
moveCursor(dx: number, dy: number, callback?: () => void): boolean;
|
||||
/**
|
||||
* @default `process.env`
|
||||
*/
|
||||
|
||||
43
node_modules/@types/node/util.d.ts
generated
vendored
43
node_modules/@types/node/util.d.ts
generated
vendored
@@ -51,7 +51,7 @@ declare module "util" {
|
||||
function isSymbol(object: any): object is symbol;
|
||||
/** @deprecated since v4.0.0 - use `value === undefined` instead. */
|
||||
function isUndefined(object: any): object is undefined;
|
||||
function deprecate<T extends Function>(fn: T, message: string): T;
|
||||
function deprecate<T extends Function>(fn: T, message: string, code?: string): T;
|
||||
function isDeepStrictEqual(val1: any, val2: any): boolean;
|
||||
|
||||
interface CustomPromisify<TCustom extends Function> extends Function {
|
||||
@@ -84,23 +84,25 @@ declare module "util" {
|
||||
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
||||
|
||||
function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
|
||||
function promisify<TResult>(fn: (callback: (err: Error | null, result: TResult) => void) => void): () => Promise<TResult>;
|
||||
function promisify(fn: (callback: (err?: Error | null) => void) => void): () => Promise<void>;
|
||||
function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
|
||||
function promisify<T1>(fn: (arg1: T1, callback: (err?: Error | null) => void) => void): (arg1: T1) => Promise<void>;
|
||||
function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
|
||||
function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
|
||||
function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
|
||||
function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
|
||||
function promisify<TResult>(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise<TResult>;
|
||||
function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
|
||||
function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
|
||||
function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
|
||||
function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
|
||||
function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
|
||||
function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void):
|
||||
(arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
|
||||
function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
|
||||
function promisify<T1, T2, T3, T4, TResult>(
|
||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error | null, result: TResult) => void) => void,
|
||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
|
||||
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
|
||||
function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
|
||||
function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void):
|
||||
(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
|
||||
function promisify<T1, T2, T3, T4, T5, TResult>(
|
||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error | null, result: TResult) => void) => void,
|
||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,
|
||||
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
|
||||
function promisify<T1, T2, T3, T4, T5>(
|
||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: Error | null) => void) => void,
|
||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void,
|
||||
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
|
||||
function promisify(fn: Function): Function;
|
||||
|
||||
@@ -153,13 +155,26 @@ declare module "util" {
|
||||
options?: { fatal?: boolean; ignoreBOM?: boolean }
|
||||
);
|
||||
decode(
|
||||
input?: NodeJS.TypedArray | DataView | ArrayBuffer | null,
|
||||
input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
|
||||
options?: { stream?: boolean }
|
||||
): string;
|
||||
}
|
||||
|
||||
interface EncodeIntoResult {
|
||||
/**
|
||||
* The read Unicode code units of input.
|
||||
*/
|
||||
|
||||
read: number;
|
||||
/**
|
||||
* The written UTF-8 bytes of output.
|
||||
*/
|
||||
written: number;
|
||||
}
|
||||
|
||||
class TextEncoder {
|
||||
readonly encoding: string;
|
||||
encode(input?: string): Uint8Array;
|
||||
encodeInto(input: string, output: Uint8Array): EncodeIntoResult;
|
||||
}
|
||||
}
|
||||
|
||||
145
node_modules/@types/node/v8.d.ts
generated
vendored
145
node_modules/@types/node/v8.d.ts
generated
vendored
@@ -26,6 +26,18 @@ declare module "v8" {
|
||||
number_of_detached_contexts: number;
|
||||
}
|
||||
|
||||
interface HeapCodeStatistics {
|
||||
code_and_metadata_size: number;
|
||||
bytecode_and_metadata_size: number;
|
||||
external_script_source_size: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an integer representing a "version tag" derived from the V8 version, command line flags and detected CPU features.
|
||||
* This is useful for determining whether a vm.Script cachedData buffer is compatible with this instance of V8.
|
||||
*/
|
||||
function cachedDataVersionTag(): number;
|
||||
|
||||
function getHeapStatistics(): HeapInfo;
|
||||
function getHeapSpaceStatistics(): HeapSpaceInfo[];
|
||||
function setFlagsFromString(flags: string): void;
|
||||
@@ -49,4 +61,137 @@ declare module "v8" {
|
||||
* the main Node.js thread or the id of a worker thread.
|
||||
*/
|
||||
function writeHeapSnapshot(fileName?: string): string;
|
||||
|
||||
function getHeapCodeStatistics(): HeapCodeStatistics;
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
class Serializer {
|
||||
/**
|
||||
* Writes out a header, which includes the serialization format version.
|
||||
*/
|
||||
writeHeader(): void;
|
||||
|
||||
/**
|
||||
* Serializes a JavaScript value and adds the serialized representation to the internal buffer.
|
||||
* This throws an error if value cannot be serialized.
|
||||
*/
|
||||
writeValue(val: any): boolean;
|
||||
|
||||
/**
|
||||
* Returns the stored internal buffer.
|
||||
* This serializer should not be used once the buffer is released.
|
||||
* Calling this method results in undefined behavior if a previous write has failed.
|
||||
*/
|
||||
releaseBuffer(): Buffer;
|
||||
|
||||
/**
|
||||
* Marks an ArrayBuffer as having its contents transferred out of band.\
|
||||
* Pass the corresponding ArrayBuffer in the deserializing context to deserializer.transferArrayBuffer().
|
||||
*/
|
||||
transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
|
||||
|
||||
/**
|
||||
* Write a raw 32-bit unsigned integer.
|
||||
*/
|
||||
writeUint32(value: number): void;
|
||||
|
||||
/**
|
||||
* Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.
|
||||
*/
|
||||
writeUint64(hi: number, lo: number): void;
|
||||
|
||||
/**
|
||||
* Write a JS number value.
|
||||
*/
|
||||
writeDouble(value: number): void;
|
||||
|
||||
/**
|
||||
* Write raw bytes into the serializer’s internal buffer.
|
||||
* The deserializer will require a way to compute the length of the buffer.
|
||||
*/
|
||||
writeRawBytes(buffer: NodeJS.TypedArray): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
|
||||
* and only stores the part of their underlying `ArrayBuffers` that they are referring to.
|
||||
* @experimental
|
||||
*/
|
||||
class DefaultSerializer extends Serializer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
class Deserializer {
|
||||
constructor(data: NodeJS.TypedArray);
|
||||
/**
|
||||
* Reads and validates a header (including the format version).
|
||||
* May, for example, reject an invalid or unsupported wire format.
|
||||
* In that case, an Error is thrown.
|
||||
*/
|
||||
readHeader(): boolean;
|
||||
|
||||
/**
|
||||
* Deserializes a JavaScript value from the buffer and returns it.
|
||||
*/
|
||||
readValue(): any;
|
||||
|
||||
/**
|
||||
* Marks an ArrayBuffer as having its contents transferred out of band.
|
||||
* Pass the corresponding `ArrayBuffer` in the serializing context to serializer.transferArrayBuffer()
|
||||
* (or return the id from serializer._getSharedArrayBufferId() in the case of SharedArrayBuffers).
|
||||
*/
|
||||
transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
|
||||
|
||||
/**
|
||||
* Reads the underlying wire format version.
|
||||
* Likely mostly to be useful to legacy code reading old wire format versions.
|
||||
* May not be called before .readHeader().
|
||||
*/
|
||||
getWireFormatVersion(): number;
|
||||
|
||||
/**
|
||||
* Read a raw 32-bit unsigned integer and return it.
|
||||
*/
|
||||
readUint32(): number;
|
||||
|
||||
/**
|
||||
* Read a raw 64-bit unsigned integer and return it as an array [hi, lo] with two 32-bit unsigned integer entries.
|
||||
*/
|
||||
readUint64(): [number, number];
|
||||
|
||||
/**
|
||||
* Read a JS number value.
|
||||
*/
|
||||
readDouble(): number;
|
||||
|
||||
/**
|
||||
* Read raw bytes from the deserializer’s internal buffer.
|
||||
* The length parameter must correspond to the length of the buffer that was passed to serializer.writeRawBytes().
|
||||
*/
|
||||
readRawBytes(length: number): Buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
|
||||
* and only stores the part of their underlying `ArrayBuffers` that they are referring to.
|
||||
* @experimental
|
||||
*/
|
||||
class DefaultDeserializer extends Deserializer {
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses a `DefaultSerializer` to serialize value into a buffer.
|
||||
* @experimental
|
||||
*/
|
||||
function serialize(value: any): Buffer;
|
||||
|
||||
/**
|
||||
* Uses a `DefaultDeserializer` with default options to read a JS value from a buffer.
|
||||
* @experimental
|
||||
*/
|
||||
function deserialize(data: NodeJS.TypedArray): any;
|
||||
}
|
||||
|
||||
15
node_modules/@types/node/vm.d.ts
generated
vendored
15
node_modules/@types/node/vm.d.ts
generated
vendored
@@ -26,8 +26,23 @@ declare module "vm" {
|
||||
produceCachedData?: boolean;
|
||||
}
|
||||
interface RunningScriptOptions extends BaseOptions {
|
||||
/**
|
||||
* When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
|
||||
* Default: `true`.
|
||||
*/
|
||||
displayErrors?: boolean;
|
||||
/**
|
||||
* Specifies the number of milliseconds to execute code before terminating execution.
|
||||
* If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer.
|
||||
*/
|
||||
timeout?: number;
|
||||
/**
|
||||
* If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
|
||||
* Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that.
|
||||
* If execution is terminated, an `Error` will be thrown.
|
||||
* Default: `false`.
|
||||
*/
|
||||
breakOnSigint?: boolean;
|
||||
}
|
||||
interface CompileFunctionOptions extends BaseOptions {
|
||||
/**
|
||||
|
||||
4
node_modules/@types/node/zlib.d.ts
generated
vendored
4
node_modules/@types/node/zlib.d.ts
generated
vendored
@@ -18,7 +18,7 @@ declare module "zlib" {
|
||||
level?: number; // compression only
|
||||
memLevel?: number; // compression only
|
||||
strategy?: number; // compression only
|
||||
dictionary?: NodeJS.TypedArray | DataView | ArrayBuffer; // deflate/inflate only, empty dictionary by default
|
||||
dictionary?: NodeJS.ArrayBufferView | ArrayBuffer; // deflate/inflate only, empty dictionary by default
|
||||
}
|
||||
|
||||
interface BrotliOptions {
|
||||
@@ -79,7 +79,7 @@ declare module "zlib" {
|
||||
function createInflateRaw(options?: ZlibOptions): InflateRaw;
|
||||
function createUnzip(options?: ZlibOptions): Unzip;
|
||||
|
||||
type InputType = string | DataView | ArrayBuffer | NodeJS.TypedArray;
|
||||
type InputType = string | ArrayBuffer | NodeJS.ArrayBufferView;
|
||||
|
||||
type CompressCallback = (error: Error | null, result: Buffer) => void;
|
||||
|
||||
|
||||
4
node_modules/@types/semver/README.md
generated
vendored
4
node_modules/@types/semver/README.md
generated
vendored
@@ -8,9 +8,9 @@ This package contains type definitions for semver (https://github.com/npm/node-s
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver
|
||||
|
||||
Additional Details
|
||||
* Last updated: Fri, 21 Jun 2019 00:42:59 GMT
|
||||
* Last updated: Fri, 25 Oct 2019 20:12:50 GMT
|
||||
* Dependencies: none
|
||||
* Global values: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by Bart van der Schoor <https://github.com/Bartvds>, BendingBender <https://github.com/BendingBender>, Lucian Buzzo <https://github.com/LucianBuzzo>, and Klaus Meinhardt <https://github.com/ajafff>.
|
||||
These definitions were written by Bart van der Schoor <https://github.com/Bartvds>, BendingBender <https://github.com/BendingBender>, Lucian Buzzo <https://github.com/LucianBuzzo>, Klaus Meinhardt <https://github.com/ajafff>, and ExE Boss <https://github.com/ExE-Boss>.
|
||||
|
||||
135
node_modules/@types/semver/index.d.ts
generated
vendored
135
node_modules/@types/semver/index.d.ts
generated
vendored
@@ -1,9 +1,10 @@
|
||||
// Type definitions for semver 6.0
|
||||
// Type definitions for semver 6.2
|
||||
// Project: https://github.com/npm/node-semver
|
||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
||||
// BendingBender <https://github.com/BendingBender>
|
||||
// Lucian Buzzo <https://github.com/LucianBuzzo>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// ExE Boss <https://github.com/ExE-Boss>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/semver
|
||||
|
||||
export const SEMVER_SPEC_VERSION: "2.0.0";
|
||||
@@ -15,38 +16,66 @@ export interface Options {
|
||||
includePrerelease?: boolean;
|
||||
}
|
||||
|
||||
export interface CoerceOptions extends Options {
|
||||
/**
|
||||
* Used by `coerce()` to coerce from right to left.
|
||||
*
|
||||
* @default false
|
||||
*
|
||||
* @example
|
||||
* coerce('1.2.3.4', { rtl: true });
|
||||
* // => SemVer { version: '2.3.4', ... }
|
||||
*
|
||||
* @since 6.2.0
|
||||
*/
|
||||
rtl?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the parsed version as a SemVer object, or null if it's not valid.
|
||||
*/
|
||||
export function parse(v: string | SemVer, optionsOrLoose?: boolean | Options): SemVer | null;
|
||||
export function parse(version: string | SemVer | null | undefined, optionsOrLoose?: boolean | Options): SemVer | null;
|
||||
|
||||
/**
|
||||
* Return the parsed version, or null if it's not valid.
|
||||
* Return the parsed version as a string, or null if it's not valid.
|
||||
*/
|
||||
export function valid(v: string | SemVer, optionsOrLoose?: boolean | Options): string | null;
|
||||
export function valid(version: string | SemVer | null | undefined, optionsOrLoose?: boolean | Options): string | null;
|
||||
|
||||
/**
|
||||
* Coerces a string to SemVer if possible
|
||||
*/
|
||||
export function coerce(version: string | number | SemVer | null | undefined, options?: CoerceOptions): SemVer | null;
|
||||
|
||||
/**
|
||||
* Returns cleaned (removed leading/trailing whitespace, remove '=v' prefix) and parsed version, or null if version is invalid.
|
||||
*/
|
||||
export function clean(version: string, optionsOrLoose?: boolean | Options): string | null;
|
||||
|
||||
/**
|
||||
* Return the version incremented by the release type (major, minor, patch, or prerelease), or null if it's not valid.
|
||||
*/
|
||||
export function inc(v: string | SemVer, release: ReleaseType, optionsOrLoose?: boolean | Options, identifier?: string): string | null;
|
||||
export function inc(version: string | SemVer, release: ReleaseType, optionsOrLoose?: boolean | Options, identifier?: string): string | null;
|
||||
export function inc(version: string | SemVer, release: ReleaseType, identifier?: string): string | null;
|
||||
|
||||
/**
|
||||
* Return the major version number.
|
||||
*/
|
||||
export function major(v: string | SemVer, optionsOrLoose?: boolean | Options): number;
|
||||
export function major(version: string | SemVer, optionsOrLoose?: boolean | Options): number;
|
||||
|
||||
/**
|
||||
* Return the minor version number.
|
||||
*/
|
||||
export function minor(v: string | SemVer, optionsOrLoose?: boolean | Options): number;
|
||||
export function minor(version: string | SemVer, optionsOrLoose?: boolean | Options): number;
|
||||
|
||||
/**
|
||||
* Return the patch version number.
|
||||
*/
|
||||
export function patch(v: string | SemVer, optionsOrLoose?: boolean | Options): number;
|
||||
export function patch(version: string | SemVer, optionsOrLoose?: boolean | Options): number;
|
||||
|
||||
/**
|
||||
* Returns an array of prerelease components, or null if none exist.
|
||||
*/
|
||||
export function prerelease(v: string | SemVer, optionsOrLoose?: boolean | Options): ReadonlyArray<string> | null;
|
||||
export function prerelease(version: string | SemVer, optionsOrLoose?: boolean | Options): ReadonlyArray<string> | null;
|
||||
|
||||
// Comparison
|
||||
/**
|
||||
@@ -83,29 +112,56 @@ export function cmp(v1: string | SemVer, operator: Operator, v2: string | SemVer
|
||||
export type Operator = '===' | '!==' | '' | '=' | '==' | '!=' | '>' | '>=' | '<' | '<=';
|
||||
|
||||
/**
|
||||
* Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if v2 is greater. Sorts in ascending order if passed to Array.sort().
|
||||
* Compares two versions excluding build identifiers (the bit after `+` in the semantic version string).
|
||||
*
|
||||
* Sorts in ascending order when passed to `Array.sort()`.
|
||||
*
|
||||
* @return
|
||||
* - `0` if `v1` == `v2`
|
||||
* - `1` if `v1` is greater
|
||||
* - `-1` if `v2` is greater.
|
||||
*/
|
||||
export function compare(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): 1 | 0 | -1;
|
||||
/**
|
||||
* The reverse of compare. Sorts an array of versions in descending order when passed to Array.sort().
|
||||
* The reverse of compare.
|
||||
*
|
||||
* Sorts in descending order when passed to `Array.sort()`.
|
||||
*/
|
||||
export function rcompare(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): 1 | 0 | -1;
|
||||
|
||||
/**
|
||||
* Compares two identifiers, must be numeric strings or truthy/falsy values. Sorts in ascending order if passed to Array.sort().
|
||||
* Compares two identifiers, must be numeric strings or truthy/falsy values.
|
||||
*
|
||||
* Sorts in ascending order when passed to `Array.sort()`.
|
||||
*/
|
||||
export function compareIdentifiers(a: string | null, b: string | null): 1 | 0 | -1;
|
||||
export function compareIdentifiers(a: string | null | undefined, b: string | null | undefined): 1 | 0 | -1;
|
||||
/**
|
||||
* The reverse of compareIdentifiers. Sorts in descending order when passed to Array.sort().
|
||||
* The reverse of compareIdentifiers.
|
||||
*
|
||||
* Sorts in descending order when passed to `Array.sort()`.
|
||||
*/
|
||||
export function rcompareIdentifiers(a: string | null, b: string | null): 1 | 0 | -1;
|
||||
export function rcompareIdentifiers(a: string | null | undefined, b: string | null | undefined): 1 | 0 | -1;
|
||||
|
||||
/**
|
||||
* Sorts an array of semver entries in ascending order.
|
||||
* Compares two versions including build identifiers (the bit after `+` in the semantic version string).
|
||||
*
|
||||
* Sorts in ascending order when passed to `Array.sort()`.
|
||||
*
|
||||
* @return
|
||||
* - `0` if `v1` == `v2`
|
||||
* - `1` if `v1` is greater
|
||||
* - `-1` if `v2` is greater.
|
||||
*
|
||||
* @since 6.1.0
|
||||
*/
|
||||
export function compareBuild(a: string | SemVer, b: string | SemVer): 1 | 0 | -1;
|
||||
|
||||
/**
|
||||
* Sorts an array of semver entries in ascending order using `compareBuild()`.
|
||||
*/
|
||||
export function sort<T extends string | SemVer>(list: T[], optionsOrLoose?: boolean | Options): T[];
|
||||
/**
|
||||
* Sorts an array of semver entries in descending order.
|
||||
* Sorts an array of semver entries in descending order using `compareBuild()`.
|
||||
*/
|
||||
export function rsort<T extends string | SemVer>(list: T[], optionsOrLoose?: boolean | Options): T[];
|
||||
|
||||
@@ -118,7 +174,7 @@ export function diff(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?:
|
||||
/**
|
||||
* Return the valid range or null if it's not valid
|
||||
*/
|
||||
export function validRange(range: string | Range, optionsOrLoose?: boolean | Options): string;
|
||||
export function validRange(range: string | Range | null | undefined, optionsOrLoose?: boolean | Options): string;
|
||||
/**
|
||||
* Return true if the version satisfies the range.
|
||||
*/
|
||||
@@ -153,12 +209,6 @@ export function outside(version: string | SemVer, range: string | Range, hilo: '
|
||||
*/
|
||||
export function intersects(range1: string | Range, range2: string | Range, optionsOrLoose?: boolean | Options): boolean;
|
||||
|
||||
// Coercion
|
||||
/**
|
||||
* Coerces a string to semver if possible
|
||||
*/
|
||||
export function coerce(version: string | SemVer): SemVer | null;
|
||||
|
||||
export class SemVer {
|
||||
constructor(version: string | SemVer, optionsOrLoose?: boolean | Options);
|
||||
|
||||
@@ -175,9 +225,46 @@ export class SemVer {
|
||||
build: ReadonlyArray<string>;
|
||||
prerelease: ReadonlyArray<string | number>;
|
||||
|
||||
/**
|
||||
* Compares two versions excluding build identifiers (the bit after `+` in the semantic version string).
|
||||
*
|
||||
* @return
|
||||
* - `0` if `this` == `other`
|
||||
* - `1` if `this` is greater
|
||||
* - `-1` if `other` is greater.
|
||||
*/
|
||||
compare(other: string | SemVer): 1 | 0 | -1;
|
||||
|
||||
/**
|
||||
* Compares the release portion of two versions.
|
||||
*
|
||||
* @return
|
||||
* - `0` if `this` == `other`
|
||||
* - `1` if `this` is greater
|
||||
* - `-1` if `other` is greater.
|
||||
*/
|
||||
compareMain(other: string | SemVer): 1 | 0 | -1;
|
||||
|
||||
/**
|
||||
* Compares the prerelease portion of two versions.
|
||||
*
|
||||
* @return
|
||||
* - `0` if `this` == `other`
|
||||
* - `1` if `this` is greater
|
||||
* - `-1` if `other` is greater.
|
||||
*/
|
||||
comparePre(other: string | SemVer): 1 | 0 | -1;
|
||||
|
||||
/**
|
||||
* Compares the build identifier of two versions.
|
||||
*
|
||||
* @return
|
||||
* - `0` if `this` == `other`
|
||||
* - `1` if `this` is greater
|
||||
* - `-1` if `other` is greater.
|
||||
*/
|
||||
compareBuild(other: string | SemVer): 1 | 0 | -1;
|
||||
|
||||
inc(release: ReleaseType, identifier?: string): SemVer;
|
||||
}
|
||||
|
||||
|
||||
37
node_modules/@types/semver/package.json
generated
vendored
37
node_modules/@types/semver/package.json
generated
vendored
@@ -1,37 +1,33 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@types/semver@6.0.1",
|
||||
"/Users/imranismail/Projects/setup-kustomize"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@types/semver@6.0.1",
|
||||
"_id": "@types/semver@6.0.1",
|
||||
"_from": "@types/semver@6.2.0",
|
||||
"_id": "@types/semver@6.2.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-ffCdcrEE5h8DqVxinQjo+2d1q+FV5z7iNtPofw3JsrltSoSVlOGaW0rY8XxtO9XukdTn8TaCGWmk2VFGhI70mg==",
|
||||
"_integrity": "sha512-1OzrNb4RuAzIT7wHSsgZRlMBlNsJl+do6UblR7JMW4oB7bbR+uBEYtUh7gEc/jM84GGilh68lSOokyM/zNUlBA==",
|
||||
"_location": "/@types/semver",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@types/semver@6.0.1",
|
||||
"raw": "@types/semver@6.2.0",
|
||||
"name": "@types/semver",
|
||||
"escapedName": "@types%2fsemver",
|
||||
"scope": "@types",
|
||||
"rawSpec": "6.0.1",
|
||||
"rawSpec": "6.2.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "6.0.1"
|
||||
"fetchSpec": "6.2.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#DEV:/"
|
||||
"#DEV:/",
|
||||
"#USER"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.0.1.tgz",
|
||||
"_spec": "6.0.1",
|
||||
"_resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.2.0.tgz",
|
||||
"_shasum": "d688d574400d96c5b0114968705366f431831e1a",
|
||||
"_spec": "@types/semver@6.2.0",
|
||||
"_where": "/Users/imranismail/Projects/setup-kustomize",
|
||||
"bugs": {
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Bart van der Schoor",
|
||||
@@ -48,9 +44,14 @@
|
||||
{
|
||||
"name": "Klaus Meinhardt",
|
||||
"url": "https://github.com/ajafff"
|
||||
},
|
||||
{
|
||||
"name": "ExE Boss",
|
||||
"url": "https://github.com/ExE-Boss"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "TypeScript definitions for semver",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
|
||||
"license": "MIT",
|
||||
@@ -64,6 +65,6 @@
|
||||
"scripts": {},
|
||||
"typeScriptVersion": "2.0",
|
||||
"types": "index",
|
||||
"typesPublisherContentHash": "2fbf12f1845229c1b285bd981b793f64bc89a14bb6f2d36a44eccb80c34cc946",
|
||||
"version": "6.0.1"
|
||||
"typesPublisherContentHash": "f19d7b1ca506ce2f282d80a2b72e499a5dc5afed849026bc6a56307e1030e70a",
|
||||
"version": "6.2.0"
|
||||
}
|
||||
|
||||
21
node_modules/@types/yargs-parser/LICENSE
generated
vendored
Normal file
21
node_modules/@types/yargs-parser/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
16
node_modules/@types/yargs-parser/README.md
generated
vendored
Normal file
16
node_modules/@types/yargs-parser/README.md
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
# Installation
|
||||
> `npm install --save @types/yargs-parser`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for yargs-parser (https://github.com/yargs/yargs-parser#readme).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs-parser
|
||||
|
||||
Additional Details
|
||||
* Last updated: Thu, 05 Sep 2019 18:22:48 GMT
|
||||
* Dependencies: none
|
||||
* Global values: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by Miles Johnson <https://github.com/milesj>.
|
||||
104
node_modules/@types/yargs-parser/index.d.ts
generated
vendored
Normal file
104
node_modules/@types/yargs-parser/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
// Type definitions for yargs-parser 13.1
|
||||
// Project: https://github.com/yargs/yargs-parser#readme
|
||||
// Definitions by: Miles Johnson <https://github.com/milesj>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
declare namespace yargsParser {
|
||||
interface Arguments {
|
||||
/** Non-option arguments */
|
||||
_: string[];
|
||||
/** The script name or node command */
|
||||
$0: string;
|
||||
/** All remaining options */
|
||||
[argName: string]: any;
|
||||
}
|
||||
|
||||
interface DetailedArguments {
|
||||
/** An object representing the parsed value of `args` */
|
||||
argv: Arguments;
|
||||
/** Populated with an error object if an exception occurred during parsing. */
|
||||
error: Error | null;
|
||||
/** The inferred list of aliases built by combining lists in opts.alias. */
|
||||
aliases: { [alias: string]: string[] };
|
||||
/** Any new aliases added via camel-case expansion. */
|
||||
newAliases: { [alias: string]: boolean };
|
||||
/** The configuration loaded from the yargs stanza in package.json. */
|
||||
configuration: Configuration;
|
||||
}
|
||||
|
||||
interface Configuration {
|
||||
/** Should variables prefixed with --no be treated as negations? Default is `true` */
|
||||
'boolean-negation': boolean;
|
||||
/** Should hyphenated arguments be expanded into camel-case aliases? Default is `true` */
|
||||
'camel-case-expansion': boolean;
|
||||
/** Should arrays be combined when provided by both command line arguments and a configuration file. Default is `false` */
|
||||
'combine-arrays': boolean;
|
||||
/** Should keys that contain . be treated as objects? Default is `true` */
|
||||
'dot-notation': boolean;
|
||||
/** Should arguments be coerced into an array when duplicated. Default is `true` */
|
||||
'duplicate-arguments-array': boolean;
|
||||
/** Should array arguments be coerced into a single array when duplicated. Default is `true` */
|
||||
'flatten-duplicate-arrays': boolean;
|
||||
/** Should parsing stop at the first text argument? This is similar to how e.g. ssh parses its command line. Default is `false` */
|
||||
'halt-at-non-option': boolean;
|
||||
/** The prefix to use for negated boolean variables. Default is `'no-'` */
|
||||
'negation-prefix': string;
|
||||
/** Should keys that look like numbers be treated as such? Default is `true` */
|
||||
'parse-numbers': boolean;
|
||||
/** Should unparsed flags be stored in -- or _. Default is `false` */
|
||||
'populate--': boolean;
|
||||
/** Should a placeholder be added for keys not set via the corresponding CLI argument? Default is `false` */
|
||||
'set-placeholder-key': boolean;
|
||||
/** Should a group of short-options be treated as boolean flags? Default is `true` */
|
||||
'short-option-groups': boolean;
|
||||
/** Should aliases be removed before returning results? Default is `false` */
|
||||
'strip-aliased': boolean;
|
||||
/** Should dashed keys be removed before returning results? This option has no effect if camel-case-expansion is disabled. Default is `false` */
|
||||
'strip-dashed': boolean;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
/** An object representing the set of aliases for a key: `{ alias: { foo: ['f']} }`. */
|
||||
alias?: { [key: string]: string | string[] };
|
||||
/**
|
||||
* Indicate that keys should be parsed as an array: `{ array: ['foo', 'bar'] }`.
|
||||
* Indicate that keys should be parsed as an array and coerced to booleans / numbers:
|
||||
* { array: [ { key: 'foo', boolean: true }, {key: 'bar', number: true} ] }`.
|
||||
*/
|
||||
array?: string[] | Array<{ key: string; boolean?: boolean, number?: boolean }>;
|
||||
/** Arguments should be parsed as booleans: `{ boolean: ['x', 'y'] }`. */
|
||||
boolean?: string[];
|
||||
/** Indicate a key that represents a path to a configuration file (this file will be loaded and parsed). */
|
||||
config?: string | string[] | { [key: string]: boolean };
|
||||
/** Provide configuration options to the yargs-parser. */
|
||||
configuration?: Partial<Configuration>;
|
||||
/**
|
||||
* Provide a custom synchronous function that returns a coerced value from the argument provided (or throws an error), e.g.
|
||||
* `{ coerce: { foo: function (arg) { return modifiedArg } } }`.
|
||||
*/
|
||||
coerce?: { [key: string]: (arg: any) => any };
|
||||
/** Indicate a key that should be used as a counter, e.g., `-vvv = {v: 3}`. */
|
||||
count?: string[];
|
||||
/** Provide default values for keys: `{ default: { x: 33, y: 'hello world!' } }`. */
|
||||
default?: { [key: string]: any };
|
||||
/** Environment variables (`process.env`) with the prefix provided should be parsed. */
|
||||
envPrefix?: string;
|
||||
/** Specify that a key requires n arguments: `{ narg: {x: 2} }`. */
|
||||
narg?: { [key: string]: number };
|
||||
/** `path.normalize()` will be applied to values set to this key. */
|
||||
normalize?: string[];
|
||||
/** Keys should be treated as strings (even if they resemble a number `-x 33`). */
|
||||
string?: string[];
|
||||
/** Keys should be treated as numbers. */
|
||||
number?: string[];
|
||||
}
|
||||
|
||||
interface Parser {
|
||||
(argv: string | string[], opts?: Options): Arguments;
|
||||
detailed(argv: string | string[], opts?: Options): DetailedArguments;
|
||||
}
|
||||
}
|
||||
|
||||
declare var yargsParser: yargsParser.Parser;
|
||||
export = yargsParser;
|
||||
53
node_modules/@types/yargs-parser/package.json
generated
vendored
Normal file
53
node_modules/@types/yargs-parser/package.json
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"_from": "@types/yargs-parser@*",
|
||||
"_id": "@types/yargs-parser@13.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg==",
|
||||
"_location": "/@types/yargs-parser",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "@types/yargs-parser@*",
|
||||
"name": "@types/yargs-parser",
|
||||
"escapedName": "@types%2fyargs-parser",
|
||||
"scope": "@types",
|
||||
"rawSpec": "*",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "*"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@types/yargs"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-13.1.0.tgz",
|
||||
"_shasum": "c563aa192f39350a1d18da36c5a8da382bbd8228",
|
||||
"_spec": "@types/yargs-parser@*",
|
||||
"_where": "/Users/imranismail/Projects/setup-kustomize/node_modules/@types/yargs",
|
||||
"bugs": {
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Miles Johnson",
|
||||
"url": "https://github.com/milesj"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "TypeScript definitions for yargs-parser",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
|
||||
"license": "MIT",
|
||||
"main": "",
|
||||
"name": "@types/yargs-parser",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/yargs-parser"
|
||||
},
|
||||
"scripts": {},
|
||||
"typeScriptVersion": "2.2",
|
||||
"types": "index",
|
||||
"typesPublisherContentHash": "72de0ca12c18b0e895e8b04198e0599f4b08e2766251f330f2c7e8a1b008986d",
|
||||
"version": "13.1.0"
|
||||
}
|
||||
10
node_modules/@types/yargs/README.md
generated
vendored
10
node_modules/@types/yargs/README.md
generated
vendored
@@ -2,15 +2,15 @@
|
||||
> `npm install --save @types/yargs`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for yargs ( https://github.com/chevex/yargs ).
|
||||
This package contains type definitions for yargs (https://github.com/chevex/yargs).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs/v12
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs
|
||||
|
||||
Additional Details
|
||||
* Last updated: Mon, 08 Apr 2019 01:51:31 GMT
|
||||
* Dependencies: none
|
||||
* Last updated: Wed, 25 Sep 2019 16:10:32 GMT
|
||||
* Dependencies: @types/yargs-parser
|
||||
* Global values: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by Martin Poelstra <https://github.com/poelstra>, Mizunashi Mana <https://github.com/mizunashi-mana>, Jeffery Grajkowski <https://github.com/pushplay>, Jeff Kenney <https://github.com/jeffkenney>, Jimi (Dimitris) Charalampidis <https://github.com/JimiC>, Steffen Viken Valvåg <https://github.com/steffenvv>, Emily Marigold Klassen <https://github.com/forivall>.
|
||||
These definitions were written by Martin Poelstra <https://github.com/poelstra>, Mizunashi Mana <https://github.com/mizunashi-mana>, Jeffery Grajkowski <https://github.com/pushplay>, Jeff Kenney <https://github.com/jeffkenney>, Jimi (Dimitris) Charalampidis <https://github.com/JimiC>, Steffen Viken Valvåg <https://github.com/steffenvv>, Emily Marigold Klassen <https://github.com/forivall>, and ExE Boss <https://github.com/ExE-Boss>.
|
||||
|
||||
419
node_modules/@types/yargs/index.d.ts
generated
vendored
419
node_modules/@types/yargs/index.d.ts
generated
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for yargs 12.0
|
||||
// Type definitions for yargs 13.0
|
||||
// Project: https://github.com/chevex/yargs, https://yargs.js.org
|
||||
// Definitions by: Martin Poelstra <https://github.com/poelstra>
|
||||
// Mizunashi Mana <https://github.com/mizunashi-mana>
|
||||
@@ -7,6 +7,7 @@
|
||||
// Jimi (Dimitris) Charalampidis <https://github.com/JimiC>
|
||||
// Steffen Viken Valvåg <https://github.com/steffenvv>
|
||||
// Emily Marigold Klassen <https://github.com/forivall>
|
||||
// ExE Boss <https://github.com/ExE-Boss>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.0
|
||||
|
||||
@@ -24,69 +25,188 @@
|
||||
// Use parameterless declaration instead of declaring all parameters optional,
|
||||
// when all parameters are optional and more than one
|
||||
|
||||
import { DetailedArguments, Configuration } from 'yargs-parser';
|
||||
|
||||
declare namespace yargs {
|
||||
// The type parameter T is the expected shape of the parsed options.
|
||||
// Arguments<T> is those options plus _ and $0, and an indexer falling
|
||||
// back to unknown for unknown options.
|
||||
//
|
||||
// For the return type / argv property, we create a mapped type over
|
||||
// Arguments<T> to simplify the inferred type signature in client code.
|
||||
type BuilderCallback<T, R> = ((args: Argv<T>) => Argv<R>) | ((args: Argv<T>) => void);
|
||||
|
||||
/**
|
||||
* The type parameter `T` is the expected shape of the parsed options.
|
||||
* `Arguments<T>` is those options plus `_` and `$0`, and an indexer falling
|
||||
* back to `unknown` for unknown options.
|
||||
*
|
||||
* For the return type / `argv` property, we create a mapped type over
|
||||
* `Arguments<T>` to simplify the inferred type signature in client code.
|
||||
*/
|
||||
interface Argv<T = {}> {
|
||||
(): { [key in keyof Arguments<T>]: Arguments<T>[key] };
|
||||
(args: ReadonlyArray<string>, cwd?: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Set key names as equivalent such that updates to a key will propagate to aliases and vice-versa.
|
||||
*
|
||||
* Optionally `.alias()` can take an object that maps keys to aliases.
|
||||
* Each key of this object should be the canonical version of the option, and each value should be a string or an array of strings.
|
||||
*/
|
||||
// Aliases for previously declared options can inherit the types of those options.
|
||||
alias<K1 extends keyof T, K2 extends string>(shortName: K1, longName: K2 | ReadonlyArray<K2>): Argv<T & { [key in K2]: T[K1] }>;
|
||||
alias<K1 extends keyof T, K2 extends string>(shortName: K2, longName: K1 | ReadonlyArray<K1>): Argv<T & { [key in K2]: T[K1] }>;
|
||||
alias(shortName: string | ReadonlyArray<string>, longName: string | ReadonlyArray<string>): Argv<T>;
|
||||
alias(aliases: { [shortName: string]: string | ReadonlyArray<string> }): Argv<T>;
|
||||
|
||||
/**
|
||||
* Get the arguments as a plain old object.
|
||||
*
|
||||
* Arguments without a corresponding flag show up in the `argv._` array.
|
||||
*
|
||||
* The script name or node command is available at `argv.$0` similarly to how `$0` works in bash or perl.
|
||||
*
|
||||
* If `yargs` is executed in an environment that embeds node and there's no script name (e.g. Electron or nw.js),
|
||||
* it will ignore the first parameter since it expects it to be the script name. In order to override
|
||||
* this behavior, use `.parse(process.argv.slice(1))` instead of .argv and the first parameter won't be ignored.
|
||||
*/
|
||||
argv: { [key in keyof Arguments<T>]: Arguments<T>[key] };
|
||||
|
||||
/**
|
||||
* Tell the parser to interpret `key` as an array.
|
||||
* If `.array('foo')` is set, `--foo foo bar` will be parsed as `['foo', 'bar']` rather than as `'foo'`.
|
||||
* Also, if you use the option multiple times all the values will be flattened in one array so `--foo foo --foo bar` will be parsed as `['foo', 'bar']`
|
||||
*
|
||||
* When the option is used with a positional, use `--` to tell `yargs` to stop adding values to the array.
|
||||
*/
|
||||
array<K extends keyof T>(key: K | ReadonlyArray<K>): Argv<Omit<T, K> & { [key in K]: ToArray<T[key]> }>;
|
||||
array<K extends string>(key: K | ReadonlyArray<K>): Argv<T & { [key in K]: Array<string | number> | undefined }>;
|
||||
|
||||
/**
|
||||
* Interpret `key` as a boolean. If a non-flag option follows `key` in `process.argv`, that string won't get set as the value of `key`.
|
||||
*
|
||||
* `key` will default to `false`, unless a `default(key, undefined)` is explicitly set.
|
||||
*
|
||||
* If `key` is an array, interpret all the elements as booleans.
|
||||
*/
|
||||
boolean<K extends keyof T>(key: K | ReadonlyArray<K>): Argv<Omit<T, K> & { [key in K]: boolean | undefined }>;
|
||||
boolean<K extends string>(key: K | ReadonlyArray<K>): Argv<T & { [key in K]: boolean | undefined }>;
|
||||
|
||||
/**
|
||||
* Check that certain conditions are met in the provided arguments.
|
||||
* @param func Called with two arguments, the parsed `argv` hash and an array of options and their aliases.
|
||||
* If `func` throws or returns a non-truthy value, show the thrown error, usage information, and exit.
|
||||
* @param global Indicates whether `check()` should be enabled both at the top-level and for each sub-command.
|
||||
*/
|
||||
check(func: (argv: Arguments<T>, aliases: { [alias: string]: string }) => any, global?: boolean): Argv<T>;
|
||||
|
||||
/**
|
||||
* Limit valid values for key to a predefined set of choices, given as an array or as an individual value.
|
||||
* If this method is called multiple times, all enumerated values will be merged together.
|
||||
* Choices are generally strings or numbers, and value matching is case-sensitive.
|
||||
*
|
||||
* Optionally `.choices()` can take an object that maps multiple keys to their choices.
|
||||
*
|
||||
* Choices can also be specified as choices in the object given to `option()`.
|
||||
*/
|
||||
choices<K extends keyof T, C extends ReadonlyArray<any>>(key: K, values: C): Argv<Omit<T, K> & { [key in K]: C[number] | undefined }>;
|
||||
choices<K extends string, C extends ReadonlyArray<any>>(key: K, values: C): Argv<T & { [key in K]: C[number] | undefined }>;
|
||||
choices<C extends { [key: string]: ReadonlyArray<any> }>(choices: C): Argv<Omit<T, keyof C> & { [key in keyof C]: C[key][number] | undefined }>;
|
||||
|
||||
/**
|
||||
* Provide a synchronous function to coerce or transform the value(s) given on the command line for `key`.
|
||||
*
|
||||
* The coercion function should accept one argument, representing the parsed value from the command line, and should return a new value or throw an error.
|
||||
* The returned value will be used as the value for `key` (or one of its aliases) in `argv`.
|
||||
*
|
||||
* If the function throws, the error will be treated as a validation failure, delegating to either a custom `.fail()` handler or printing the error message in the console.
|
||||
*
|
||||
* Coercion will be applied to a value after all other modifications, such as `.normalize()`.
|
||||
*
|
||||
* Optionally `.coerce()` can take an object that maps several keys to their respective coercion function.
|
||||
*
|
||||
* You can also map the same function to several keys at one time. Just pass an array of keys as the first argument to `.coerce()`.
|
||||
*
|
||||
* If you are using dot-notion or arrays, .e.g., `user.email` and `user.password`, coercion will be applied to the final object that has been parsed
|
||||
*/
|
||||
coerce<K extends keyof T, V>(key: K | ReadonlyArray<K>, func: (arg: any) => V): Argv<Omit<T, K> & { [key in K]: V | undefined }>;
|
||||
coerce<K extends string, V>(key: K | ReadonlyArray<K>, func: (arg: any) => V): Argv<T & { [key in K]: V | undefined }>;
|
||||
coerce<O extends { [key: string]: (arg: any) => any }>(opts: O): Argv<Omit<T, keyof O> & { [key in keyof O]: ReturnType<O[key]> | undefined }>;
|
||||
|
||||
command<U>(command: string | ReadonlyArray<string>, description: string, builder?: (args: Argv<T>) => Argv<U>, handler?: (args: Arguments<U>) => void): Argv<T>;
|
||||
/**
|
||||
* Define the commands exposed by your application.
|
||||
* @param command Should be a string representing the command or an array of strings representing the command and its aliases.
|
||||
* @param description Use to provide a description for each command your application accepts (the values stored in `argv._`).
|
||||
* Set `description` to false to create a hidden command. Hidden commands don't show up in the help output and aren't available for completion.
|
||||
* @param [builder] Object to give hints about the options that your command accepts.
|
||||
* Can also be a function. This function is executed with a yargs instance, and can be used to provide advanced command specific help.
|
||||
*
|
||||
* Note that when `void` is returned, the handler `argv` object type will not include command-specific arguments.
|
||||
* @param [handler] Function, which will be executed with the parsed `argv` object.
|
||||
*/
|
||||
command<U = T>(command: string | ReadonlyArray<string>, description: string, builder?: BuilderCallback<T, U>, handler?: (args: Arguments<U>) => void): Argv<T>;
|
||||
command<O extends { [key: string]: Options }>(command: string | ReadonlyArray<string>, description: string, builder?: O, handler?: (args: Arguments<InferredOptionTypes<O>>) => void): Argv<T>;
|
||||
command<U>(command: string | ReadonlyArray<string>, description: string, module: CommandModule<T, U>): Argv<U>;
|
||||
command<U>(command: string | ReadonlyArray<string>, showInHelp: false, builder?: (args: Argv<T>) => Argv<U>, handler?: (args: Arguments<U>) => void): Argv<T>;
|
||||
command<U = T>(command: string | ReadonlyArray<string>, showInHelp: false, builder?: BuilderCallback<T, U>, handler?: (args: Arguments<U>) => void): Argv<T>;
|
||||
command<O extends { [key: string]: Options }>(command: string | ReadonlyArray<string>, showInHelp: false, builder?: O, handler?: (args: Arguments<InferredOptionTypes<O>>) => void): Argv<T>;
|
||||
command<U>(command: string | ReadonlyArray<string>, showInHelp: false, module: CommandModule<T, U>): Argv<U>;
|
||||
command<U>(module: CommandModule<T, U>): Argv<U>;
|
||||
|
||||
// Advanced API
|
||||
/** Apply command modules from a directory relative to the module calling this method. */
|
||||
commandDir(dir: string, opts?: RequireDirectoryOptions): Argv<T>;
|
||||
|
||||
/**
|
||||
* Enable bash/zsh-completion shortcuts for commands and options.
|
||||
*
|
||||
* If invoked without parameters, `.completion()` will make completion the command to output the completion script.
|
||||
*
|
||||
* @param [cmd] When present in `argv._`, will result in the `.bashrc` or `.zshrc` completion script being outputted.
|
||||
* To enable bash/zsh completions, concat the generated script to your `.bashrc` or `.bash_profile` (or `.zshrc` for zsh).
|
||||
* @param [description] Provide a description in your usage instructions for the command that generates the completion scripts.
|
||||
* @param [func] Rather than relying on yargs' default completion functionality, which shiver me timbers is pretty awesome, you can provide your own completion method.
|
||||
*/
|
||||
completion(): Argv<T>;
|
||||
completion(cmd: string, func?: AsyncCompletionFunction): Argv<T>;
|
||||
completion(cmd: string, func?: SyncCompletionFunction): Argv<T>;
|
||||
completion(cmd: string, description?: string, func?: AsyncCompletionFunction): Argv<T>;
|
||||
completion(cmd: string, description?: string, func?: SyncCompletionFunction): Argv<T>;
|
||||
completion(cmd: string, func?: PromiseCompletionFunction): Argv<T>;
|
||||
completion(cmd: string, description?: string | false, func?: AsyncCompletionFunction): Argv<T>;
|
||||
completion(cmd: string, description?: string | false, func?: SyncCompletionFunction): Argv<T>;
|
||||
completion(cmd: string, description?: string | false, func?: PromiseCompletionFunction): Argv<T>;
|
||||
|
||||
/**
|
||||
* Tells the parser that if the option specified by `key` is passed in, it should be interpreted as a path to a JSON config file.
|
||||
* The file is loaded and parsed, and its properties are set as arguments.
|
||||
* Because the file is loaded using Node's require(), the filename MUST end in `.json` to be interpreted correctly.
|
||||
*
|
||||
* If invoked without parameters, `.config()` will make --config the option to pass the JSON config file.
|
||||
*
|
||||
* @param [description] Provided to customize the config (`key`) option in the usage string.
|
||||
* @param [explicitConfigurationObject] An explicit configuration `object`
|
||||
*/
|
||||
config(): Argv<T>;
|
||||
config(key: string | ReadonlyArray<string>, description?: string, parseFn?: (configPath: string) => object): Argv<T>;
|
||||
config(key: string | ReadonlyArray<string>, parseFn: (configPath: string) => object): Argv<T>;
|
||||
config(explicitConfigurationObject: object): Argv<T>;
|
||||
|
||||
/**
|
||||
* Given the key `x` is set, the key `y` must not be set. `y` can either be a single string or an array of argument names that `x` conflicts with.
|
||||
*
|
||||
* Optionally `.conflicts()` can accept an object specifying multiple conflicting keys.
|
||||
*/
|
||||
conflicts(key: string, value: string | ReadonlyArray<string>): Argv<T>;
|
||||
conflicts(conflicts: { [key: string]: string | ReadonlyArray<string> }): Argv<T>;
|
||||
|
||||
/**
|
||||
* Interpret `key` as a boolean flag, but set its parsed value to the number of flag occurrences rather than `true` or `false`. Default value is thus `0`.
|
||||
*/
|
||||
count<K extends keyof T>(key: K | ReadonlyArray<K>): Argv<Omit<T, K> & { [key in K]: number }>;
|
||||
count<K extends string>(key: K | ReadonlyArray<K>): Argv<T & { [key in K]: number }>;
|
||||
|
||||
/**
|
||||
* Set `argv[key]` to `value` if no option was specified in `process.argv`.
|
||||
*
|
||||
* Optionally `.default()` can take an object that maps keys to default values.
|
||||
*
|
||||
* The default value can be a `function` which returns a value. The name of the function will be used in the usage string.
|
||||
*
|
||||
* Optionally, `description` can also be provided and will take precedence over displaying the value in the usage instructions.
|
||||
*/
|
||||
default<K extends keyof T, V>(key: K, value: V, description?: string): Argv<Omit<T, K> & { [key in K]: V }>;
|
||||
default<K extends string, V>(key: K, value: V, description?: string): Argv<T & { [key in K]: V }>;
|
||||
default<D extends { [key: string]: any }>(defaults: D, description?: string): Argv<Omit<T, keyof D> & D>;
|
||||
@@ -102,87 +222,221 @@ declare namespace yargs {
|
||||
demand(positionals: number, required?: boolean): Argv<T>;
|
||||
demand(positionals: number, max: number, msg?: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* @param key If is a string, show the usage information and exit if key wasn't specified in `process.argv`.
|
||||
* If is an array, demand each element.
|
||||
* @param msg If string is given, it will be printed when the argument is missing, instead of the standard error message.
|
||||
* @param demand Controls whether the option is demanded; this is useful when using .options() to specify command line parameters.
|
||||
*/
|
||||
demandOption<K extends keyof T>(key: K | ReadonlyArray<K>, msg?: string | true): Argv<Defined<T, K>>;
|
||||
demandOption<K extends string>(key: K | ReadonlyArray<K>, msg?: string | true): Argv<T & { [key in K]: unknown }>;
|
||||
demandOption(key: string | ReadonlyArray<string>, demand?: boolean): Argv<T>;
|
||||
|
||||
/**
|
||||
* Demand in context of commands.
|
||||
* You can demand a minimum and a maximum number a user can have within your program, as well as provide corresponding error messages if either of the demands is not met.
|
||||
*/
|
||||
demandCommand(): Argv<T>;
|
||||
demandCommand(min: number, minMsg?: string): Argv<T>;
|
||||
demandCommand(min: number, max?: number, minMsg?: string, maxMsg?: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Describe a `key` for the generated usage information.
|
||||
*
|
||||
* Optionally `.describe()` can take an object that maps keys to descriptions.
|
||||
*/
|
||||
describe(key: string | ReadonlyArray<string>, description: string): Argv<T>;
|
||||
describe(descriptions: { [key: string]: string }): Argv<T>;
|
||||
|
||||
/** Should yargs attempt to detect the os' locale? Defaults to `true`. */
|
||||
detectLocale(detect: boolean): Argv<T>;
|
||||
|
||||
/**
|
||||
* Tell yargs to parse environment variables matching the given prefix and apply them to argv as though they were command line arguments.
|
||||
*
|
||||
* Use the "__" separator in the environment variable to indicate nested options. (e.g. prefix_nested__foo => nested.foo)
|
||||
*
|
||||
* If this method is called with no argument or with an empty string or with true, then all env vars will be applied to argv.
|
||||
*
|
||||
* Program arguments are defined in this order of precedence:
|
||||
* 1. Command line args
|
||||
* 2. Env vars
|
||||
* 3. Config file/objects
|
||||
* 4. Configured defaults
|
||||
*
|
||||
* Env var parsing is disabled by default, but you can also explicitly disable it by calling `.env(false)`, e.g. if you need to undo previous configuration.
|
||||
*/
|
||||
env(): Argv<T>;
|
||||
env(prefix: string): Argv<T>;
|
||||
env(enable: boolean): Argv<T>;
|
||||
|
||||
/** A message to print at the end of the usage instructions */
|
||||
epilog(msg: string): Argv<T>;
|
||||
|
||||
/** A message to print at the end of the usage instructions */
|
||||
epilogue(msg: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Give some example invocations of your program.
|
||||
* Inside `cmd`, the string `$0` will get interpolated to the current script name or node command for the present script similar to how `$0` works in bash or perl.
|
||||
* Examples will be printed out as part of the help message.
|
||||
*/
|
||||
example(command: string, description: string): Argv<T>;
|
||||
|
||||
/** Manually indicate that the program should exit, and provide context about why we wanted to exit. Follows the behavior set by `.exitProcess().` */
|
||||
exit(code: number, err: Error): void;
|
||||
|
||||
/**
|
||||
* By default, yargs exits the process when the user passes a help flag, the user uses the `.version` functionality, validation fails, or the command handler fails.
|
||||
* Calling `.exitProcess(false)` disables this behavior, enabling further actions after yargs have been validated.
|
||||
*/
|
||||
exitProcess(enabled: boolean): Argv<T>;
|
||||
|
||||
/**
|
||||
* Method to execute when a failure occurs, rather than printing the failure message.
|
||||
* @param func Is called with the failure message that would have been printed, the Error instance originally thrown and yargs state when the failure occurred.
|
||||
*/
|
||||
fail(func: (msg: string, err: Error) => any): Argv<T>;
|
||||
|
||||
/**
|
||||
* Allows to programmatically get completion choices for any line.
|
||||
* @param args An array of the words in the command line to complete.
|
||||
* @param done The callback to be called with the resulting completions.
|
||||
*/
|
||||
getCompletion(args: ReadonlyArray<string>, done: (completions: ReadonlyArray<string>) => void): Argv<T>;
|
||||
|
||||
/**
|
||||
* Indicate that an option (or group of options) should not be reset when a command is executed
|
||||
*
|
||||
* Options default to being global.
|
||||
*/
|
||||
global(key: string | ReadonlyArray<string>): Argv<T>;
|
||||
|
||||
/** Given a key, or an array of keys, places options under an alternative heading when displaying usage instructions */
|
||||
group(key: string | ReadonlyArray<string>, groupName: string): Argv<T>;
|
||||
|
||||
/** Hides a key from the generated usage information. Unless a `--show-hidden` option is also passed with `--help` (see `showHidden()`). */
|
||||
hide(key: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Configure an (e.g. `--help`) and implicit command that displays the usage string and exits the process.
|
||||
* By default yargs enables help on the `--help` option.
|
||||
*
|
||||
* Note that any multi-char aliases (e.g. `help`) used for the help option will also be used for the implicit command.
|
||||
* If there are no multi-char aliases (e.g. `h`), then all single-char aliases will be used for the command.
|
||||
*
|
||||
* If invoked without parameters, `.help()` will use `--help` as the option and help as the implicit command to trigger help output.
|
||||
*
|
||||
* @param [description] Customizes the description of the help option in the usage string.
|
||||
* @param [enableExplicit] If `false` is provided, it will disable --help.
|
||||
*/
|
||||
help(): Argv<T>;
|
||||
help(enableExplicit: boolean): Argv<T>;
|
||||
help(option: string, enableExplicit: boolean): Argv<T>;
|
||||
help(option: string, description?: string, enableExplicit?: boolean): Argv<T>;
|
||||
|
||||
/**
|
||||
* Given the key `x` is set, it is required that the key `y` is set.
|
||||
* y` can either be the name of an argument to imply, a number indicating the position of an argument or an array of multiple implications to associate with `x`.
|
||||
*
|
||||
* Optionally `.implies()` can accept an object specifying multiple implications.
|
||||
*/
|
||||
implies(key: string, value: string | ReadonlyArray<string>): Argv<T>;
|
||||
implies(implies: { [key: string]: string | ReadonlyArray<string> }): Argv<T>;
|
||||
|
||||
/**
|
||||
* Return the locale that yargs is currently using.
|
||||
*
|
||||
* By default, yargs will auto-detect the operating system's locale so that yargs-generated help content will display in the user's language.
|
||||
*/
|
||||
locale(): string;
|
||||
/**
|
||||
* Override the auto-detected locale from the user's operating system with a static locale.
|
||||
* Note that the OS locale can be modified by setting/exporting the `LC_ALL` environment variable.
|
||||
*/
|
||||
locale(loc: string): Argv<T>;
|
||||
|
||||
middleware(callbacks: MiddlewareFunction<T> | ReadonlyArray<MiddlewareFunction<T>>): Argv<T>;
|
||||
/**
|
||||
* Define global middleware functions to be called first, in list order, for all cli command.
|
||||
* @param callbacks Can be a function or a list of functions. Each callback gets passed a reference to argv.
|
||||
* @param [applyBeforeValidation] Set to `true` to apply middleware before validation. This will execute the middleware prior to validation checks, but after parsing.
|
||||
*/
|
||||
middleware(callbacks: MiddlewareFunction<T> | ReadonlyArray<MiddlewareFunction<T>>, applyBeforeValidation?: boolean): Argv<T>;
|
||||
|
||||
/**
|
||||
* The number of arguments that should be consumed after a key. This can be a useful hint to prevent parsing ambiguity.
|
||||
*
|
||||
* Optionally `.nargs()` can take an object of `key`/`narg` pairs.
|
||||
*/
|
||||
nargs(key: string, count: number): Argv<T>;
|
||||
nargs(nargs: { [key: string]: number }): Argv<T>;
|
||||
|
||||
/** The key provided represents a path and should have `path.normalize()` applied. */
|
||||
normalize<K extends keyof T>(key: K | ReadonlyArray<K>): Argv<Omit<T, K> & { [key in K]: ToString<T[key]> }>;
|
||||
normalize<K extends string>(key: K | ReadonlyArray<K>): Argv<T & { [key in K]: string | undefined }>;
|
||||
|
||||
/**
|
||||
* Tell the parser to always interpret key as a number.
|
||||
*
|
||||
* If `key` is an array, all elements will be parsed as numbers.
|
||||
*
|
||||
* If the option is given on the command line without a value, `argv` will be populated with `undefined`.
|
||||
*
|
||||
* If the value given on the command line cannot be parsed as a number, `argv` will be populated with `NaN`.
|
||||
*
|
||||
* Note that decimals, hexadecimals, and scientific notation are all accepted.
|
||||
*/
|
||||
number<K extends keyof T>(key: K | ReadonlyArray<K>): Argv<Omit<T, K> & { [key in K]: ToNumber<T[key]> }>;
|
||||
number<K extends string>(key: K | ReadonlyArray<K>): Argv<T & { [key in K]: number | undefined }>;
|
||||
|
||||
/**
|
||||
* This method can be used to make yargs aware of options that could exist.
|
||||
* You can also pass an opt object which can hold further customization, like `.alias()`, `.demandOption()` etc. for that option.
|
||||
*/
|
||||
option<K extends keyof T, O extends Options>(key: K, options: O): Argv<Omit<T, K> & { [key in K]: InferredOptionType<O> }>;
|
||||
option<K extends string, O extends Options>(key: K, options: O): Argv<T & { [key in K]: InferredOptionType<O> }>;
|
||||
option<O extends { [key: string]: Options }>(options: O): Argv<Omit<T, keyof O> & InferredOptionTypes<O>>;
|
||||
|
||||
/**
|
||||
* This method can be used to make yargs aware of options that could exist.
|
||||
* You can also pass an opt object which can hold further customization, like `.alias()`, `.demandOption()` etc. for that option.
|
||||
*/
|
||||
options<K extends keyof T, O extends Options>(key: K, options: O): Argv<Omit<T, K> & { [key in K]: InferredOptionType<O> }>;
|
||||
options<K extends string, O extends Options>(key: K, options: O): Argv<T & { [key in K]: InferredOptionType<O> }>;
|
||||
options<O extends { [key: string]: Options }>(options: O): Argv<Omit<T, keyof O> & InferredOptionTypes<O>>;
|
||||
|
||||
/**
|
||||
* Parse `args` instead of `process.argv`. Returns the `argv` object. `args` may either be a pre-processed argv array, or a raw argument string.
|
||||
*
|
||||
* Note: Providing a callback to parse() disables the `exitProcess` setting until after the callback is invoked.
|
||||
* @param [context] Provides a useful mechanism for passing state information to commands
|
||||
*/
|
||||
parse(): { [key in keyof Arguments<T>]: Arguments<T>[key] };
|
||||
parse(arg: string | ReadonlyArray<string>, context?: object, parseCallback?: ParseCallback<T>): { [key in keyof Arguments<T>]: Arguments<T>[key] };
|
||||
|
||||
/**
|
||||
* If the arguments have not been parsed, this property is `false`.
|
||||
*
|
||||
* If the arguments have been parsed, this contain detailed parsed arguments.
|
||||
*/
|
||||
parsed: DetailedArguments | false;
|
||||
|
||||
/** Allows to configure advanced yargs features. */
|
||||
parserConfiguration(configuration: Partial<Configuration>): Argv<T>;
|
||||
|
||||
/**
|
||||
* Similar to `config()`, indicates that yargs should interpret the object from the specified key in package.json as a configuration object.
|
||||
* @param [cwd] If provided, the package.json will be read from this location
|
||||
*/
|
||||
pkgConf(key: string | ReadonlyArray<string>, cwd?: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* 'positional' should be called in a command's builder function, and is not
|
||||
* available on the top-level yargs instance. If so, it will throw an error.
|
||||
* Allows you to configure a command's positional arguments with an API similar to `.option()`.
|
||||
* `.positional()` should be called in a command's builder function, and is not available on the top-level yargs instance. If so, it will throw an error.
|
||||
*/
|
||||
positional<K extends keyof T, O extends PositionalOptions>(key: K, opt: O): Argv<Omit<T, K> & { [key in K]: InferredOptionType<O> }>;
|
||||
positional<K extends string, O extends PositionalOptions>(key: K, opt: O): Argv<T & { [key in K]: InferredOptionType<O> }>;
|
||||
|
||||
/** Should yargs provide suggestions regarding similar commands if no matching command is found? */
|
||||
recommendCommands(): Argv<T>;
|
||||
|
||||
/**
|
||||
@@ -217,22 +471,56 @@ declare namespace yargs {
|
||||
*/
|
||||
reset(): Argv<T>;
|
||||
|
||||
/** Set the name of your script ($0). Default is the base filename executed by node (`process.argv[1]`) */
|
||||
scriptName($0: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Generate a bash completion script.
|
||||
* Users of your application can install this script in their `.bashrc`, and yargs will provide completion shortcuts for commands and options.
|
||||
*/
|
||||
showCompletionScript(): Argv<T>;
|
||||
|
||||
/**
|
||||
* Configure the `--show-hidden` option that displays the hidden keys (see `hide()`).
|
||||
* @param option If `boolean`, it enables/disables this option altogether. i.e. hidden keys will be permanently hidden if first argument is `false`.
|
||||
* If `string` it changes the key name ("--show-hidden").
|
||||
* @param description Changes the default description ("Show hidden options")
|
||||
*/
|
||||
showHidden(option?: string | boolean): Argv<T>;
|
||||
showHidden(option: string, description?: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Print the usage data using the console function consoleLevel for printing.
|
||||
* @param [consoleLevel='error']
|
||||
*/
|
||||
showHelp(consoleLevel?: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* By default, yargs outputs a usage string if any error is detected.
|
||||
* Use the `.showHelpOnFail()` method to customize this behavior.
|
||||
* @param enable If `false`, the usage string is not output.
|
||||
* @param [message] Message that is output after the error message.
|
||||
*/
|
||||
showHelpOnFail(enable: boolean, message?: string): Argv<T>;
|
||||
|
||||
/** Specifies either a single option key (string), or an array of options. If any of the options is present, yargs validation is skipped. */
|
||||
skipValidation(key: string | ReadonlyArray<string>): Argv<T>;
|
||||
|
||||
/**
|
||||
* Any command-line argument given that is not demanded, or does not have a corresponding description, will be reported as an error.
|
||||
*
|
||||
* Unrecognized commands will also be reported as errors.
|
||||
*/
|
||||
strict(): Argv<T>;
|
||||
strict(enabled: boolean): Argv<T>;
|
||||
|
||||
/**
|
||||
* Tell the parser logic not to interpret `key` as a number or boolean. This can be useful if you need to preserve leading zeros in an input.
|
||||
*
|
||||
* If `key` is an array, interpret all the elements as strings.
|
||||
*
|
||||
* `.string('_')` will result in non-hyphenated arguments being interpreted as strings, regardless of whether they resemble numbers.
|
||||
*/
|
||||
string<K extends keyof T>(key: K | ReadonlyArray<K>): Argv<Omit<T, K> & { [key in K]: ToString<T[key]> }>;
|
||||
string<K extends string>(key: K | ReadonlyArray<K>): Argv<T & { [key in K]: string | undefined }>;
|
||||
|
||||
@@ -241,20 +529,47 @@ declare namespace yargs {
|
||||
|
||||
updateLocale(obj: { [key: string]: string }): Argv<T>;
|
||||
|
||||
/**
|
||||
* Override the default strings used by yargs with the key/value pairs provided in obj
|
||||
*
|
||||
* If you explicitly specify a locale(), you should do so before calling `updateStrings()`.
|
||||
*/
|
||||
updateStrings(obj: { [key: string]: string }): Argv<T>;
|
||||
|
||||
/**
|
||||
* Set a usage message to show which commands to use.
|
||||
* Inside `message`, the string `$0` will get interpolated to the current script name or node command for the present script similar to how `$0` works in bash or perl.
|
||||
*
|
||||
* If the optional `description`/`builder`/`handler` are provided, `.usage()` acts an an alias for `.command()`.
|
||||
* This allows you to use `.usage()` to configure the default command that will be run as an entry-point to your application
|
||||
* and allows you to provide configuration for the positional arguments accepted by your program:
|
||||
*/
|
||||
usage(message: string): Argv<T>;
|
||||
usage<U>(command: string | ReadonlyArray<string>, description: string, builder?: (args: Argv<T>) => Argv<U>, handler?: (args: Arguments<U>) => void): Argv<T>;
|
||||
usage<U>(command: string | ReadonlyArray<string>, showInHelp: boolean, builder?: (args: Argv<T>) => Argv<U>, handler?: (args: Arguments<U>) => void): Argv<T>;
|
||||
usage<O extends { [key: string]: Options }>(command: string | ReadonlyArray<string>, description: string, builder?: O, handler?: (args: Arguments<InferredOptionTypes<O>>) => void): Argv<T>;
|
||||
usage<O extends { [key: string]: Options }>(command: string | ReadonlyArray<string>, showInHelp: boolean, builder?: O, handler?: (args: Arguments<InferredOptionTypes<O>>) => void): Argv<T>;
|
||||
|
||||
/**
|
||||
* Add an option (e.g. `--version`) that displays the version number (given by the version parameter) and exits the process.
|
||||
* By default yargs enables version for the `--version` option.
|
||||
*
|
||||
* If no arguments are passed to version (`.version()`), yargs will parse the package.json of your module and use its version value.
|
||||
*
|
||||
* If the boolean argument `false` is provided, it will disable `--version`.
|
||||
*/
|
||||
version(): Argv<T>;
|
||||
version(version: string): Argv<T>;
|
||||
version(enable: boolean): Argv<T>;
|
||||
version(optionKey: string, version: string): Argv<T>;
|
||||
version(optionKey: string, description: string, version: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Format usage output to wrap at columns many columns.
|
||||
*
|
||||
* By default wrap will be set to `Math.min(80, windowWidth)`. Use `.wrap(null)` to specify no column limit (no right-align).
|
||||
* Use `.wrap(yargs.terminalWidth())` to maximize the width of yargs' usage instructions.
|
||||
*/
|
||||
wrap(columns: number | null): Argv<T>;
|
||||
}
|
||||
|
||||
@@ -267,63 +582,72 @@ declare namespace yargs {
|
||||
[argName: string]: unknown;
|
||||
};
|
||||
|
||||
interface DetailedArguments {
|
||||
argv: Arguments;
|
||||
error: Error | null;
|
||||
aliases: {[alias: string]: string[]};
|
||||
newAliases: {[alias: string]: boolean};
|
||||
configuration: Configuration;
|
||||
}
|
||||
|
||||
interface Configuration {
|
||||
'boolean-negation': boolean;
|
||||
'camel-case-expansion': boolean;
|
||||
'combine-arrays': boolean;
|
||||
'dot-notation': boolean;
|
||||
'duplicate-arguments-array': boolean;
|
||||
'flatten-duplicate-arrays': boolean;
|
||||
'negation-prefix': string;
|
||||
'parse-numbers': boolean;
|
||||
'populate--': boolean;
|
||||
'set-placeholder-key': boolean;
|
||||
'short-option-groups': boolean;
|
||||
}
|
||||
|
||||
interface RequireDirectoryOptions {
|
||||
/** Look for command modules in all subdirectories and apply them as a flattened (non-hierarchical) list. */
|
||||
recurse?: boolean;
|
||||
/** The types of files to look for when requiring command modules. */
|
||||
extensions?: ReadonlyArray<string>;
|
||||
/**
|
||||
* A synchronous function called for each command module encountered.
|
||||
* Accepts `commandObject`, `pathToFile`, and `filename` as arguments.
|
||||
* Returns `commandObject` to include the command; any falsy value to exclude/skip it.
|
||||
*/
|
||||
visit?: (commandObject: any, pathToFile?: string, filename?: string) => any;
|
||||
/** Whitelist certain modules */
|
||||
include?: RegExp | ((pathToFile: string) => boolean);
|
||||
/** Blacklist certain modules. */
|
||||
exclude?: RegExp | ((pathToFile: string) => boolean);
|
||||
}
|
||||
|
||||
interface Options {
|
||||
/** string or array of strings, alias(es) for the canonical option key, see `alias()` */
|
||||
alias?: string | ReadonlyArray<string>;
|
||||
/** boolean, interpret option as an array, see `array()` */
|
||||
array?: boolean;
|
||||
/** boolean, interpret option as a boolean flag, see `boolean()` */
|
||||
boolean?: boolean;
|
||||
/** value or array of values, limit valid option arguments to a predefined set, see `choices()` */
|
||||
choices?: Choices;
|
||||
/** function, coerce or transform parsed command line values into another value, see `coerce()` */
|
||||
coerce?: (arg: any) => any;
|
||||
/** boolean, interpret option as a path to a JSON config file, see `config()` */
|
||||
config?: boolean;
|
||||
/** function, provide a custom config parsing function, see `config()` */
|
||||
configParser?: (configPath: string) => object;
|
||||
/** string or object, require certain keys not to be set, see `conflicts()` */
|
||||
conflicts?: string | ReadonlyArray<string> | { [key: string]: string | ReadonlyArray<string> };
|
||||
/** boolean, interpret option as a count of boolean flags, see `count()` */
|
||||
count?: boolean;
|
||||
/** value, set a default value for the option, see `default()` */
|
||||
default?: any;
|
||||
/** string, use this description for the default value in help content, see `default()` */
|
||||
defaultDescription?: string;
|
||||
/**
|
||||
* @deprecated since version 6.6.0
|
||||
* Use 'demandOption' instead
|
||||
*/
|
||||
demand?: boolean | string;
|
||||
/** boolean or string, demand the option be given, with optional error message, see `demandOption()` */
|
||||
demandOption?: boolean | string;
|
||||
/** string, the option description for help content, see `describe()` */
|
||||
desc?: string;
|
||||
/** string, the option description for help content, see `describe()` */
|
||||
describe?: string;
|
||||
/** string, the option description for help content, see `describe()` */
|
||||
description?: string;
|
||||
/** boolean, indicate that this key should not be reset when a command is invoked, see `global()` */
|
||||
global?: boolean;
|
||||
/** string, when displaying usage instructions place the option under an alternative group heading, see `group()` */
|
||||
group?: string;
|
||||
/** don't display option in help output. */
|
||||
hidden?: boolean;
|
||||
/** string or object, require certain keys to be set, see `implies()` */
|
||||
implies?: string | ReadonlyArray<string> | { [key: string]: string | ReadonlyArray<string> };
|
||||
/** number, specify how many arguments should be consumed for the option, see `nargs()` */
|
||||
nargs?: number;
|
||||
/** boolean, apply path.normalize() to the option, see `normalize()` */
|
||||
normalize?: boolean;
|
||||
/** boolean, interpret option as a number, `number()` */
|
||||
number?: boolean;
|
||||
/**
|
||||
* @deprecated since version 6.6.0
|
||||
@@ -335,22 +659,35 @@ declare namespace yargs {
|
||||
* Use 'demandOption' instead
|
||||
*/
|
||||
required?: boolean | string;
|
||||
/** boolean, require the option be specified with a value, see `requiresArg()` */
|
||||
requiresArg?: boolean;
|
||||
/** boolean, skips validation if the option is present, see `skipValidation()` */
|
||||
skipValidation?: boolean;
|
||||
/** boolean, interpret option as a string, see `string()` */
|
||||
string?: boolean;
|
||||
type?: "array" | "count" | PositionalOptionsType;
|
||||
}
|
||||
|
||||
interface PositionalOptions {
|
||||
/** string or array of strings, see `alias()` */
|
||||
alias?: string | ReadonlyArray<string>;
|
||||
/** value or array of values, limit valid option arguments to a predefined set, see `choices()` */
|
||||
choices?: Choices;
|
||||
/** function, coerce or transform parsed command line values into another value, see `coerce()` */
|
||||
coerce?: (arg: any) => any;
|
||||
/** string or object, require certain keys not to be set, see `conflicts()` */
|
||||
conflicts?: string | ReadonlyArray<string> | { [key: string]: string | ReadonlyArray<string> };
|
||||
/** value, set a default value for the option, see `default()` */
|
||||
default?: any;
|
||||
/** string, the option description for help content, see `describe()` */
|
||||
desc?: string;
|
||||
/** string, the option description for help content, see `describe()` */
|
||||
describe?: string;
|
||||
/** string, the option description for help content, see `describe()` */
|
||||
description?: string;
|
||||
/** string or object, require certain keys to be set, see `implies()` */
|
||||
implies?: string | ReadonlyArray<string> | { [key: string]: string | ReadonlyArray<string> };
|
||||
/** boolean, apply path.normalize() to the option, see normalize() */
|
||||
normalize?: boolean;
|
||||
type?: PositionalOptionsType;
|
||||
}
|
||||
@@ -405,10 +742,15 @@ declare namespace yargs {
|
||||
type InferredOptionTypes<O extends { [key: string]: Options }> = { [key in keyof O]: InferredOptionType<O[key]> };
|
||||
|
||||
interface CommandModule<T = {}, U = {}> {
|
||||
/** array of strings (or a single string) representing aliases of `exports.command`, positional args defined in an alias are ignored */
|
||||
aliases?: ReadonlyArray<string> | string;
|
||||
/** object declaring the options the command accepts, or a function accepting and returning a yargs instance */
|
||||
builder?: CommandBuilder<T, U>;
|
||||
/** string (or array of strings) that executes this command when given on the command line, first string may contain positional args */
|
||||
command?: ReadonlyArray<string> | string;
|
||||
/** string used as the description for the command in help text, use `false` for a hidden command */
|
||||
describe?: string | false;
|
||||
/** a function which will be passed the parsed argv. */
|
||||
handler: (args: Arguments<U>) => void;
|
||||
}
|
||||
|
||||
@@ -416,8 +758,9 @@ declare namespace yargs {
|
||||
type CommandBuilder<T = {}, U = {}> = { [key: string]: Options } | ((args: Argv<T>) => Argv<U>);
|
||||
type SyncCompletionFunction = (current: string, argv: any) => string[];
|
||||
type AsyncCompletionFunction = (current: string, argv: any, done: (completion: ReadonlyArray<string>) => void) => void;
|
||||
type PromiseCompletionFunction = (current: string, argv: any) => Promise<string[]>;
|
||||
type MiddlewareFunction<T = {}> = (args: Arguments<T>) => void;
|
||||
type Choices = ReadonlyArray<string | true | undefined>;
|
||||
type Choices = ReadonlyArray<string | number | true | undefined>;
|
||||
type PositionalOptionsType = "boolean" | "number" | "string";
|
||||
}
|
||||
|
||||
|
||||
42
node_modules/@types/yargs/package.json
generated
vendored
42
node_modules/@types/yargs/package.json
generated
vendored
@@ -1,39 +1,34 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@types/yargs@12.0.12",
|
||||
"/Users/imranismail/Projects/setup-kustomize"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@types/yargs@12.0.12",
|
||||
"_id": "@types/yargs@12.0.12",
|
||||
"_from": "@types/yargs@^13.0.0",
|
||||
"_id": "@types/yargs@13.0.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw==",
|
||||
"_integrity": "sha512-K8/LfZq2duW33XW/tFwEAfnZlqIfVsoyRB3kfXdPXYhl0nfM8mmh7GS0jg7WrX2Dgq/0Ha/pR1PaR+BvmWwjiQ==",
|
||||
"_location": "/@types/yargs",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "@types/yargs@12.0.12",
|
||||
"raw": "@types/yargs@^13.0.0",
|
||||
"name": "@types/yargs",
|
||||
"escapedName": "@types%2fyargs",
|
||||
"scope": "@types",
|
||||
"rawSpec": "12.0.12",
|
||||
"rawSpec": "^13.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "12.0.12"
|
||||
"fetchSpec": "^13.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@jest/types",
|
||||
"/jest-runtime",
|
||||
"/jest-watcher"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-12.0.12.tgz",
|
||||
"_spec": "12.0.12",
|
||||
"_where": "/Users/imranismail/Projects/setup-kustomize",
|
||||
"_resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.3.tgz",
|
||||
"_shasum": "76482af3981d4412d65371a318f992d33464a380",
|
||||
"_spec": "@types/yargs@^13.0.0",
|
||||
"_where": "/Users/imranismail/Projects/setup-kustomize/node_modules/@jest/types",
|
||||
"bugs": {
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Martin Poelstra",
|
||||
@@ -62,9 +57,16 @@
|
||||
{
|
||||
"name": "Emily Marigold Klassen",
|
||||
"url": "https://github.com/forivall"
|
||||
},
|
||||
{
|
||||
"name": "ExE Boss",
|
||||
"url": "https://github.com/ExE-Boss"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"dependencies": {
|
||||
"@types/yargs-parser": "*"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "TypeScript definitions for yargs",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
|
||||
"license": "MIT",
|
||||
@@ -78,6 +80,6 @@
|
||||
"scripts": {},
|
||||
"typeScriptVersion": "3.0",
|
||||
"types": "index",
|
||||
"typesPublisherContentHash": "797da61a576678d4a7247c12796a39175a72c67c12a6b2e34a47306ad6c42cdf",
|
||||
"version": "12.0.12"
|
||||
"typesPublisherContentHash": "500be969ef6ef1e24d5f2d9a3961407976a93ae7e549d23c155cf9d680f1cf8a",
|
||||
"version": "13.0.3"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user