first commit
This commit is contained in:
21
node_modules/@types/estree/LICENSE
generated
vendored
Normal file
21
node_modules/@types/estree/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
15
node_modules/@types/estree/README.md
generated
vendored
Normal file
15
node_modules/@types/estree/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/estree`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for estree (https://github.com/estree/estree).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Fri, 06 Jun 2025 00:04:33 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [RReverser](https://github.com/RReverser).
|
||||
167
node_modules/@types/estree/flow.d.ts
generated
vendored
Normal file
167
node_modules/@types/estree/flow.d.ts
generated
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
declare namespace ESTree {
|
||||
interface FlowTypeAnnotation extends Node {}
|
||||
|
||||
interface FlowBaseTypeAnnotation extends FlowTypeAnnotation {}
|
||||
|
||||
interface FlowLiteralTypeAnnotation extends FlowTypeAnnotation, Literal {}
|
||||
|
||||
interface FlowDeclaration extends Declaration {}
|
||||
|
||||
interface AnyTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface ArrayTypeAnnotation extends FlowTypeAnnotation {
|
||||
elementType: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface BooleanLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
|
||||
|
||||
interface BooleanTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface ClassImplements extends Node {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterInstantiation | null;
|
||||
}
|
||||
|
||||
interface ClassProperty {
|
||||
key: Expression;
|
||||
value?: Expression | null;
|
||||
typeAnnotation?: TypeAnnotation | null;
|
||||
computed: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface DeclareClass extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
body: ObjectTypeAnnotation;
|
||||
extends: InterfaceExtends[];
|
||||
}
|
||||
|
||||
interface DeclareFunction extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
interface DeclareModule extends FlowDeclaration {
|
||||
id: Literal | Identifier;
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
interface DeclareVariable extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
interface FunctionTypeAnnotation extends FlowTypeAnnotation {
|
||||
params: FunctionTypeParam[];
|
||||
returnType: FlowTypeAnnotation;
|
||||
rest?: FunctionTypeParam | null;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
}
|
||||
|
||||
interface FunctionTypeParam {
|
||||
name: Identifier;
|
||||
typeAnnotation: FlowTypeAnnotation;
|
||||
optional: boolean;
|
||||
}
|
||||
|
||||
interface GenericTypeAnnotation extends FlowTypeAnnotation {
|
||||
id: Identifier | QualifiedTypeIdentifier;
|
||||
typeParameters?: TypeParameterInstantiation | null;
|
||||
}
|
||||
|
||||
interface InterfaceExtends extends Node {
|
||||
id: Identifier | QualifiedTypeIdentifier;
|
||||
typeParameters?: TypeParameterInstantiation | null;
|
||||
}
|
||||
|
||||
interface InterfaceDeclaration extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
extends: InterfaceExtends[];
|
||||
body: ObjectTypeAnnotation;
|
||||
}
|
||||
|
||||
interface IntersectionTypeAnnotation extends FlowTypeAnnotation {
|
||||
types: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface NullableTypeAnnotation extends FlowTypeAnnotation {
|
||||
typeAnnotation: TypeAnnotation;
|
||||
}
|
||||
|
||||
interface NumberLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
|
||||
|
||||
interface NumberTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface StringLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
|
||||
|
||||
interface StringTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface TupleTypeAnnotation extends FlowTypeAnnotation {
|
||||
types: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface TypeofTypeAnnotation extends FlowTypeAnnotation {
|
||||
argument: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeAlias extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
right: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeAnnotation extends Node {
|
||||
typeAnnotation: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeCastExpression extends Expression {
|
||||
expression: Expression;
|
||||
typeAnnotation: TypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeParameterDeclaration extends Node {
|
||||
params: Identifier[];
|
||||
}
|
||||
|
||||
interface TypeParameterInstantiation extends Node {
|
||||
params: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface ObjectTypeAnnotation extends FlowTypeAnnotation {
|
||||
properties: ObjectTypeProperty[];
|
||||
indexers: ObjectTypeIndexer[];
|
||||
callProperties: ObjectTypeCallProperty[];
|
||||
}
|
||||
|
||||
interface ObjectTypeCallProperty extends Node {
|
||||
value: FunctionTypeAnnotation;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface ObjectTypeIndexer extends Node {
|
||||
id: Identifier;
|
||||
key: FlowTypeAnnotation;
|
||||
value: FlowTypeAnnotation;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface ObjectTypeProperty extends Node {
|
||||
key: Expression;
|
||||
value: FlowTypeAnnotation;
|
||||
optional: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface QualifiedTypeIdentifier extends Node {
|
||||
qualification: Identifier | QualifiedTypeIdentifier;
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
interface UnionTypeAnnotation extends FlowTypeAnnotation {
|
||||
types: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
}
|
||||
694
node_modules/@types/estree/index.d.ts
generated
vendored
Normal file
694
node_modules/@types/estree/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,694 @@
|
||||
// This definition file follows a somewhat unusual format. ESTree allows
|
||||
// runtime type checks based on the `type` parameter. In order to explain this
|
||||
// to typescript we want to use discriminated union types:
|
||||
// https://github.com/Microsoft/TypeScript/pull/9163
|
||||
//
|
||||
// For ESTree this is a bit tricky because the high level interfaces like
|
||||
// Node or Function are pulling double duty. We want to pass common fields down
|
||||
// to the interfaces that extend them (like Identifier or
|
||||
// ArrowFunctionExpression), but you can't extend a type union or enforce
|
||||
// common fields on them. So we've split the high level interfaces into two
|
||||
// types, a base type which passes down inherited fields, and a type union of
|
||||
// all types which extend the base type. Only the type union is exported, and
|
||||
// the union is how other types refer to the collection of inheriting types.
|
||||
//
|
||||
// This makes the definitions file here somewhat more difficult to maintain,
|
||||
// but it has the notable advantage of making ESTree much easier to use as
|
||||
// an end user.
|
||||
|
||||
export interface BaseNodeWithoutComments {
|
||||
// Every leaf interface that extends BaseNode must specify a type property.
|
||||
// The type property should be a string literal. For example, Identifier
|
||||
// has: `type: "Identifier"`
|
||||
type: string;
|
||||
loc?: SourceLocation | null | undefined;
|
||||
range?: [number, number] | undefined;
|
||||
}
|
||||
|
||||
export interface BaseNode extends BaseNodeWithoutComments {
|
||||
leadingComments?: Comment[] | undefined;
|
||||
trailingComments?: Comment[] | undefined;
|
||||
}
|
||||
|
||||
export interface NodeMap {
|
||||
AssignmentProperty: AssignmentProperty;
|
||||
CatchClause: CatchClause;
|
||||
Class: Class;
|
||||
ClassBody: ClassBody;
|
||||
Expression: Expression;
|
||||
Function: Function;
|
||||
Identifier: Identifier;
|
||||
Literal: Literal;
|
||||
MethodDefinition: MethodDefinition;
|
||||
ModuleDeclaration: ModuleDeclaration;
|
||||
ModuleSpecifier: ModuleSpecifier;
|
||||
Pattern: Pattern;
|
||||
PrivateIdentifier: PrivateIdentifier;
|
||||
Program: Program;
|
||||
Property: Property;
|
||||
PropertyDefinition: PropertyDefinition;
|
||||
SpreadElement: SpreadElement;
|
||||
Statement: Statement;
|
||||
Super: Super;
|
||||
SwitchCase: SwitchCase;
|
||||
TemplateElement: TemplateElement;
|
||||
VariableDeclarator: VariableDeclarator;
|
||||
}
|
||||
|
||||
export type Node = NodeMap[keyof NodeMap];
|
||||
|
||||
export interface Comment extends BaseNodeWithoutComments {
|
||||
type: "Line" | "Block";
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface SourceLocation {
|
||||
source?: string | null | undefined;
|
||||
start: Position;
|
||||
end: Position;
|
||||
}
|
||||
|
||||
export interface Position {
|
||||
/** >= 1 */
|
||||
line: number;
|
||||
/** >= 0 */
|
||||
column: number;
|
||||
}
|
||||
|
||||
export interface Program extends BaseNode {
|
||||
type: "Program";
|
||||
sourceType: "script" | "module";
|
||||
body: Array<Directive | Statement | ModuleDeclaration>;
|
||||
comments?: Comment[] | undefined;
|
||||
}
|
||||
|
||||
export interface Directive extends BaseNode {
|
||||
type: "ExpressionStatement";
|
||||
expression: Literal;
|
||||
directive: string;
|
||||
}
|
||||
|
||||
export interface BaseFunction extends BaseNode {
|
||||
params: Pattern[];
|
||||
generator?: boolean | undefined;
|
||||
async?: boolean | undefined;
|
||||
// The body is either BlockStatement or Expression because arrow functions
|
||||
// can have a body that's either. FunctionDeclarations and
|
||||
// FunctionExpressions have only BlockStatement bodies.
|
||||
body: BlockStatement | Expression;
|
||||
}
|
||||
|
||||
export type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
|
||||
|
||||
export type Statement =
|
||||
| ExpressionStatement
|
||||
| BlockStatement
|
||||
| StaticBlock
|
||||
| EmptyStatement
|
||||
| DebuggerStatement
|
||||
| WithStatement
|
||||
| ReturnStatement
|
||||
| LabeledStatement
|
||||
| BreakStatement
|
||||
| ContinueStatement
|
||||
| IfStatement
|
||||
| SwitchStatement
|
||||
| ThrowStatement
|
||||
| TryStatement
|
||||
| WhileStatement
|
||||
| DoWhileStatement
|
||||
| ForStatement
|
||||
| ForInStatement
|
||||
| ForOfStatement
|
||||
| Declaration;
|
||||
|
||||
export interface BaseStatement extends BaseNode {}
|
||||
|
||||
export interface EmptyStatement extends BaseStatement {
|
||||
type: "EmptyStatement";
|
||||
}
|
||||
|
||||
export interface BlockStatement extends BaseStatement {
|
||||
type: "BlockStatement";
|
||||
body: Statement[];
|
||||
innerComments?: Comment[] | undefined;
|
||||
}
|
||||
|
||||
export interface StaticBlock extends Omit<BlockStatement, "type"> {
|
||||
type: "StaticBlock";
|
||||
}
|
||||
|
||||
export interface ExpressionStatement extends BaseStatement {
|
||||
type: "ExpressionStatement";
|
||||
expression: Expression;
|
||||
}
|
||||
|
||||
export interface IfStatement extends BaseStatement {
|
||||
type: "IfStatement";
|
||||
test: Expression;
|
||||
consequent: Statement;
|
||||
alternate?: Statement | null | undefined;
|
||||
}
|
||||
|
||||
export interface LabeledStatement extends BaseStatement {
|
||||
type: "LabeledStatement";
|
||||
label: Identifier;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface BreakStatement extends BaseStatement {
|
||||
type: "BreakStatement";
|
||||
label?: Identifier | null | undefined;
|
||||
}
|
||||
|
||||
export interface ContinueStatement extends BaseStatement {
|
||||
type: "ContinueStatement";
|
||||
label?: Identifier | null | undefined;
|
||||
}
|
||||
|
||||
export interface WithStatement extends BaseStatement {
|
||||
type: "WithStatement";
|
||||
object: Expression;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface SwitchStatement extends BaseStatement {
|
||||
type: "SwitchStatement";
|
||||
discriminant: Expression;
|
||||
cases: SwitchCase[];
|
||||
}
|
||||
|
||||
export interface ReturnStatement extends BaseStatement {
|
||||
type: "ReturnStatement";
|
||||
argument?: Expression | null | undefined;
|
||||
}
|
||||
|
||||
export interface ThrowStatement extends BaseStatement {
|
||||
type: "ThrowStatement";
|
||||
argument: Expression;
|
||||
}
|
||||
|
||||
export interface TryStatement extends BaseStatement {
|
||||
type: "TryStatement";
|
||||
block: BlockStatement;
|
||||
handler?: CatchClause | null | undefined;
|
||||
finalizer?: BlockStatement | null | undefined;
|
||||
}
|
||||
|
||||
export interface WhileStatement extends BaseStatement {
|
||||
type: "WhileStatement";
|
||||
test: Expression;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface DoWhileStatement extends BaseStatement {
|
||||
type: "DoWhileStatement";
|
||||
body: Statement;
|
||||
test: Expression;
|
||||
}
|
||||
|
||||
export interface ForStatement extends BaseStatement {
|
||||
type: "ForStatement";
|
||||
init?: VariableDeclaration | Expression | null | undefined;
|
||||
test?: Expression | null | undefined;
|
||||
update?: Expression | null | undefined;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface BaseForXStatement extends BaseStatement {
|
||||
left: VariableDeclaration | Pattern;
|
||||
right: Expression;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface ForInStatement extends BaseForXStatement {
|
||||
type: "ForInStatement";
|
||||
}
|
||||
|
||||
export interface DebuggerStatement extends BaseStatement {
|
||||
type: "DebuggerStatement";
|
||||
}
|
||||
|
||||
export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
|
||||
|
||||
export interface BaseDeclaration extends BaseStatement {}
|
||||
|
||||
export interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration {
|
||||
type: "FunctionDeclaration";
|
||||
/** It is null when a function declaration is a part of the `export default function` statement */
|
||||
id: Identifier | null;
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
export interface FunctionDeclaration extends MaybeNamedFunctionDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
export interface VariableDeclaration extends BaseDeclaration {
|
||||
type: "VariableDeclaration";
|
||||
declarations: VariableDeclarator[];
|
||||
kind: "var" | "let" | "const" | "using" | "await using";
|
||||
}
|
||||
|
||||
export interface VariableDeclarator extends BaseNode {
|
||||
type: "VariableDeclarator";
|
||||
id: Pattern;
|
||||
init?: Expression | null | undefined;
|
||||
}
|
||||
|
||||
export interface ExpressionMap {
|
||||
ArrayExpression: ArrayExpression;
|
||||
ArrowFunctionExpression: ArrowFunctionExpression;
|
||||
AssignmentExpression: AssignmentExpression;
|
||||
AwaitExpression: AwaitExpression;
|
||||
BinaryExpression: BinaryExpression;
|
||||
CallExpression: CallExpression;
|
||||
ChainExpression: ChainExpression;
|
||||
ClassExpression: ClassExpression;
|
||||
ConditionalExpression: ConditionalExpression;
|
||||
FunctionExpression: FunctionExpression;
|
||||
Identifier: Identifier;
|
||||
ImportExpression: ImportExpression;
|
||||
Literal: Literal;
|
||||
LogicalExpression: LogicalExpression;
|
||||
MemberExpression: MemberExpression;
|
||||
MetaProperty: MetaProperty;
|
||||
NewExpression: NewExpression;
|
||||
ObjectExpression: ObjectExpression;
|
||||
SequenceExpression: SequenceExpression;
|
||||
TaggedTemplateExpression: TaggedTemplateExpression;
|
||||
TemplateLiteral: TemplateLiteral;
|
||||
ThisExpression: ThisExpression;
|
||||
UnaryExpression: UnaryExpression;
|
||||
UpdateExpression: UpdateExpression;
|
||||
YieldExpression: YieldExpression;
|
||||
}
|
||||
|
||||
export type Expression = ExpressionMap[keyof ExpressionMap];
|
||||
|
||||
export interface BaseExpression extends BaseNode {}
|
||||
|
||||
export type ChainElement = SimpleCallExpression | MemberExpression;
|
||||
|
||||
export interface ChainExpression extends BaseExpression {
|
||||
type: "ChainExpression";
|
||||
expression: ChainElement;
|
||||
}
|
||||
|
||||
export interface ThisExpression extends BaseExpression {
|
||||
type: "ThisExpression";
|
||||
}
|
||||
|
||||
export interface ArrayExpression extends BaseExpression {
|
||||
type: "ArrayExpression";
|
||||
elements: Array<Expression | SpreadElement | null>;
|
||||
}
|
||||
|
||||
export interface ObjectExpression extends BaseExpression {
|
||||
type: "ObjectExpression";
|
||||
properties: Array<Property | SpreadElement>;
|
||||
}
|
||||
|
||||
export interface PrivateIdentifier extends BaseNode {
|
||||
type: "PrivateIdentifier";
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface Property extends BaseNode {
|
||||
type: "Property";
|
||||
key: Expression | PrivateIdentifier;
|
||||
value: Expression | Pattern; // Could be an AssignmentProperty
|
||||
kind: "init" | "get" | "set";
|
||||
method: boolean;
|
||||
shorthand: boolean;
|
||||
computed: boolean;
|
||||
}
|
||||
|
||||
export interface PropertyDefinition extends BaseNode {
|
||||
type: "PropertyDefinition";
|
||||
key: Expression | PrivateIdentifier;
|
||||
value?: Expression | null | undefined;
|
||||
computed: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
export interface FunctionExpression extends BaseFunction, BaseExpression {
|
||||
id?: Identifier | null | undefined;
|
||||
type: "FunctionExpression";
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
export interface SequenceExpression extends BaseExpression {
|
||||
type: "SequenceExpression";
|
||||
expressions: Expression[];
|
||||
}
|
||||
|
||||
export interface UnaryExpression extends BaseExpression {
|
||||
type: "UnaryExpression";
|
||||
operator: UnaryOperator;
|
||||
prefix: true;
|
||||
argument: Expression;
|
||||
}
|
||||
|
||||
export interface BinaryExpression extends BaseExpression {
|
||||
type: "BinaryExpression";
|
||||
operator: BinaryOperator;
|
||||
left: Expression | PrivateIdentifier;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export interface AssignmentExpression extends BaseExpression {
|
||||
type: "AssignmentExpression";
|
||||
operator: AssignmentOperator;
|
||||
left: Pattern | MemberExpression;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export interface UpdateExpression extends BaseExpression {
|
||||
type: "UpdateExpression";
|
||||
operator: UpdateOperator;
|
||||
argument: Expression;
|
||||
prefix: boolean;
|
||||
}
|
||||
|
||||
export interface LogicalExpression extends BaseExpression {
|
||||
type: "LogicalExpression";
|
||||
operator: LogicalOperator;
|
||||
left: Expression;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export interface ConditionalExpression extends BaseExpression {
|
||||
type: "ConditionalExpression";
|
||||
test: Expression;
|
||||
alternate: Expression;
|
||||
consequent: Expression;
|
||||
}
|
||||
|
||||
export interface BaseCallExpression extends BaseExpression {
|
||||
callee: Expression | Super;
|
||||
arguments: Array<Expression | SpreadElement>;
|
||||
}
|
||||
export type CallExpression = SimpleCallExpression | NewExpression;
|
||||
|
||||
export interface SimpleCallExpression extends BaseCallExpression {
|
||||
type: "CallExpression";
|
||||
optional: boolean;
|
||||
}
|
||||
|
||||
export interface NewExpression extends BaseCallExpression {
|
||||
type: "NewExpression";
|
||||
}
|
||||
|
||||
export interface MemberExpression extends BaseExpression, BasePattern {
|
||||
type: "MemberExpression";
|
||||
object: Expression | Super;
|
||||
property: Expression | PrivateIdentifier;
|
||||
computed: boolean;
|
||||
optional: boolean;
|
||||
}
|
||||
|
||||
export type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression;
|
||||
|
||||
export interface BasePattern extends BaseNode {}
|
||||
|
||||
export interface SwitchCase extends BaseNode {
|
||||
type: "SwitchCase";
|
||||
test?: Expression | null | undefined;
|
||||
consequent: Statement[];
|
||||
}
|
||||
|
||||
export interface CatchClause extends BaseNode {
|
||||
type: "CatchClause";
|
||||
param: Pattern | null;
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
export interface Identifier extends BaseNode, BaseExpression, BasePattern {
|
||||
type: "Identifier";
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
|
||||
|
||||
export interface SimpleLiteral extends BaseNode, BaseExpression {
|
||||
type: "Literal";
|
||||
value: string | boolean | number | null;
|
||||
raw?: string | undefined;
|
||||
}
|
||||
|
||||
export interface RegExpLiteral extends BaseNode, BaseExpression {
|
||||
type: "Literal";
|
||||
value?: RegExp | null | undefined;
|
||||
regex: {
|
||||
pattern: string;
|
||||
flags: string;
|
||||
};
|
||||
raw?: string | undefined;
|
||||
}
|
||||
|
||||
export interface BigIntLiteral extends BaseNode, BaseExpression {
|
||||
type: "Literal";
|
||||
value?: bigint | null | undefined;
|
||||
bigint: string;
|
||||
raw?: string | undefined;
|
||||
}
|
||||
|
||||
export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
|
||||
|
||||
export type BinaryOperator =
|
||||
| "=="
|
||||
| "!="
|
||||
| "==="
|
||||
| "!=="
|
||||
| "<"
|
||||
| "<="
|
||||
| ">"
|
||||
| ">="
|
||||
| "<<"
|
||||
| ">>"
|
||||
| ">>>"
|
||||
| "+"
|
||||
| "-"
|
||||
| "*"
|
||||
| "/"
|
||||
| "%"
|
||||
| "**"
|
||||
| "|"
|
||||
| "^"
|
||||
| "&"
|
||||
| "in"
|
||||
| "instanceof";
|
||||
|
||||
export type LogicalOperator = "||" | "&&" | "??";
|
||||
|
||||
export type AssignmentOperator =
|
||||
| "="
|
||||
| "+="
|
||||
| "-="
|
||||
| "*="
|
||||
| "/="
|
||||
| "%="
|
||||
| "**="
|
||||
| "<<="
|
||||
| ">>="
|
||||
| ">>>="
|
||||
| "|="
|
||||
| "^="
|
||||
| "&="
|
||||
| "||="
|
||||
| "&&="
|
||||
| "??=";
|
||||
|
||||
export type UpdateOperator = "++" | "--";
|
||||
|
||||
export interface ForOfStatement extends BaseForXStatement {
|
||||
type: "ForOfStatement";
|
||||
await: boolean;
|
||||
}
|
||||
|
||||
export interface Super extends BaseNode {
|
||||
type: "Super";
|
||||
}
|
||||
|
||||
export interface SpreadElement extends BaseNode {
|
||||
type: "SpreadElement";
|
||||
argument: Expression;
|
||||
}
|
||||
|
||||
export interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
|
||||
type: "ArrowFunctionExpression";
|
||||
expression: boolean;
|
||||
body: BlockStatement | Expression;
|
||||
}
|
||||
|
||||
export interface YieldExpression extends BaseExpression {
|
||||
type: "YieldExpression";
|
||||
argument?: Expression | null | undefined;
|
||||
delegate: boolean;
|
||||
}
|
||||
|
||||
export interface TemplateLiteral extends BaseExpression {
|
||||
type: "TemplateLiteral";
|
||||
quasis: TemplateElement[];
|
||||
expressions: Expression[];
|
||||
}
|
||||
|
||||
export interface TaggedTemplateExpression extends BaseExpression {
|
||||
type: "TaggedTemplateExpression";
|
||||
tag: Expression;
|
||||
quasi: TemplateLiteral;
|
||||
}
|
||||
|
||||
export interface TemplateElement extends BaseNode {
|
||||
type: "TemplateElement";
|
||||
tail: boolean;
|
||||
value: {
|
||||
/** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */
|
||||
cooked?: string | null | undefined;
|
||||
raw: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface AssignmentProperty extends Property {
|
||||
value: Pattern;
|
||||
kind: "init";
|
||||
method: boolean; // false
|
||||
}
|
||||
|
||||
export interface ObjectPattern extends BasePattern {
|
||||
type: "ObjectPattern";
|
||||
properties: Array<AssignmentProperty | RestElement>;
|
||||
}
|
||||
|
||||
export interface ArrayPattern extends BasePattern {
|
||||
type: "ArrayPattern";
|
||||
elements: Array<Pattern | null>;
|
||||
}
|
||||
|
||||
export interface RestElement extends BasePattern {
|
||||
type: "RestElement";
|
||||
argument: Pattern;
|
||||
}
|
||||
|
||||
export interface AssignmentPattern extends BasePattern {
|
||||
type: "AssignmentPattern";
|
||||
left: Pattern;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export type Class = ClassDeclaration | ClassExpression;
|
||||
export interface BaseClass extends BaseNode {
|
||||
superClass?: Expression | null | undefined;
|
||||
body: ClassBody;
|
||||
}
|
||||
|
||||
export interface ClassBody extends BaseNode {
|
||||
type: "ClassBody";
|
||||
body: Array<MethodDefinition | PropertyDefinition | StaticBlock>;
|
||||
}
|
||||
|
||||
export interface MethodDefinition extends BaseNode {
|
||||
type: "MethodDefinition";
|
||||
key: Expression | PrivateIdentifier;
|
||||
value: FunctionExpression;
|
||||
kind: "constructor" | "method" | "get" | "set";
|
||||
computed: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
export interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration {
|
||||
type: "ClassDeclaration";
|
||||
/** It is null when a class declaration is a part of the `export default class` statement */
|
||||
id: Identifier | null;
|
||||
}
|
||||
|
||||
export interface ClassDeclaration extends MaybeNamedClassDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
export interface ClassExpression extends BaseClass, BaseExpression {
|
||||
type: "ClassExpression";
|
||||
id?: Identifier | null | undefined;
|
||||
}
|
||||
|
||||
export interface MetaProperty extends BaseExpression {
|
||||
type: "MetaProperty";
|
||||
meta: Identifier;
|
||||
property: Identifier;
|
||||
}
|
||||
|
||||
export type ModuleDeclaration =
|
||||
| ImportDeclaration
|
||||
| ExportNamedDeclaration
|
||||
| ExportDefaultDeclaration
|
||||
| ExportAllDeclaration;
|
||||
export interface BaseModuleDeclaration extends BaseNode {}
|
||||
|
||||
export type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier;
|
||||
export interface BaseModuleSpecifier extends BaseNode {
|
||||
local: Identifier;
|
||||
}
|
||||
|
||||
export interface ImportDeclaration extends BaseModuleDeclaration {
|
||||
type: "ImportDeclaration";
|
||||
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
|
||||
attributes: ImportAttribute[];
|
||||
source: Literal;
|
||||
}
|
||||
|
||||
export interface ImportSpecifier extends BaseModuleSpecifier {
|
||||
type: "ImportSpecifier";
|
||||
imported: Identifier | Literal;
|
||||
}
|
||||
|
||||
export interface ImportAttribute extends BaseNode {
|
||||
type: "ImportAttribute";
|
||||
key: Identifier | Literal;
|
||||
value: Literal;
|
||||
}
|
||||
|
||||
export interface ImportExpression extends BaseExpression {
|
||||
type: "ImportExpression";
|
||||
source: Expression;
|
||||
options?: Expression | null | undefined;
|
||||
}
|
||||
|
||||
export interface ImportDefaultSpecifier extends BaseModuleSpecifier {
|
||||
type: "ImportDefaultSpecifier";
|
||||
}
|
||||
|
||||
export interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
|
||||
type: "ImportNamespaceSpecifier";
|
||||
}
|
||||
|
||||
export interface ExportNamedDeclaration extends BaseModuleDeclaration {
|
||||
type: "ExportNamedDeclaration";
|
||||
declaration?: Declaration | null | undefined;
|
||||
specifiers: ExportSpecifier[];
|
||||
attributes: ImportAttribute[];
|
||||
source?: Literal | null | undefined;
|
||||
}
|
||||
|
||||
export interface ExportSpecifier extends Omit<BaseModuleSpecifier, "local"> {
|
||||
type: "ExportSpecifier";
|
||||
local: Identifier | Literal;
|
||||
exported: Identifier | Literal;
|
||||
}
|
||||
|
||||
export interface ExportDefaultDeclaration extends BaseModuleDeclaration {
|
||||
type: "ExportDefaultDeclaration";
|
||||
declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression;
|
||||
}
|
||||
|
||||
export interface ExportAllDeclaration extends BaseModuleDeclaration {
|
||||
type: "ExportAllDeclaration";
|
||||
exported: Identifier | Literal | null;
|
||||
attributes: ImportAttribute[];
|
||||
source: Literal;
|
||||
}
|
||||
|
||||
export interface AwaitExpression extends BaseExpression {
|
||||
type: "AwaitExpression";
|
||||
argument: Expression;
|
||||
}
|
||||
27
node_modules/@types/estree/package.json
generated
vendored
Normal file
27
node_modules/@types/estree/package.json
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "@types/estree",
|
||||
"version": "1.0.8",
|
||||
"description": "TypeScript definitions for estree",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "RReverser",
|
||||
"githubUsername": "RReverser",
|
||||
"url": "https://github.com/RReverser"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/estree"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "7a167b6e4a4d9f6e9a2cb9fd3fc45c885f89cbdeb44b3e5961bb057a45c082fd",
|
||||
"typeScriptVersion": "5.1",
|
||||
"nonNpm": true
|
||||
}
|
||||
21
node_modules/@types/json-schema/LICENSE
generated
vendored
Normal file
21
node_modules/@types/json-schema/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
15
node_modules/@types/json-schema/README.md
generated
vendored
Normal file
15
node_modules/@types/json-schema/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/json-schema`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for json-schema (https://github.com/kriszyp/json-schema).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 07 Nov 2023 03:09:37 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Boris Cherny](https://github.com/bcherny), [Lucian Buzzo](https://github.com/lucianbuzzo), [Roland Groza](https://github.com/rolandjitsu), and [Jason Kwok](https://github.com/JasonHK).
|
||||
749
node_modules/@types/json-schema/index.d.ts
generated
vendored
Normal file
749
node_modules/@types/json-schema/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,749 @@
|
||||
// ==================================================================================================
|
||||
// JSON Schema Draft 04
|
||||
// ==================================================================================================
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
|
||||
*/
|
||||
export type JSONSchema4TypeName =
|
||||
| "string" //
|
||||
| "number"
|
||||
| "integer"
|
||||
| "boolean"
|
||||
| "object"
|
||||
| "array"
|
||||
| "null"
|
||||
| "any";
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
|
||||
*/
|
||||
export type JSONSchema4Type =
|
||||
| string //
|
||||
| number
|
||||
| boolean
|
||||
| JSONSchema4Object
|
||||
| JSONSchema4Array
|
||||
| null;
|
||||
|
||||
// Workaround for infinite type recursion
|
||||
export interface JSONSchema4Object {
|
||||
[key: string]: JSONSchema4Type;
|
||||
}
|
||||
|
||||
// Workaround for infinite type recursion
|
||||
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
|
||||
export interface JSONSchema4Array extends Array<JSONSchema4Type> {}
|
||||
|
||||
/**
|
||||
* Meta schema
|
||||
*
|
||||
* Recommended values:
|
||||
* - 'http://json-schema.org/schema#'
|
||||
* - 'http://json-schema.org/hyper-schema#'
|
||||
* - 'http://json-schema.org/draft-04/schema#'
|
||||
* - 'http://json-schema.org/draft-04/hyper-schema#'
|
||||
* - 'http://json-schema.org/draft-03/schema#'
|
||||
* - 'http://json-schema.org/draft-03/hyper-schema#'
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
|
||||
*/
|
||||
export type JSONSchema4Version = string;
|
||||
|
||||
/**
|
||||
* JSON Schema V4
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04
|
||||
*/
|
||||
export interface JSONSchema4 {
|
||||
id?: string | undefined;
|
||||
$ref?: string | undefined;
|
||||
$schema?: JSONSchema4Version | undefined;
|
||||
|
||||
/**
|
||||
* This attribute is a string that provides a short description of the
|
||||
* instance property.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21
|
||||
*/
|
||||
title?: string | undefined;
|
||||
|
||||
/**
|
||||
* This attribute is a string that provides a full description of the of
|
||||
* purpose the instance property.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22
|
||||
*/
|
||||
description?: string | undefined;
|
||||
|
||||
default?: JSONSchema4Type | undefined;
|
||||
multipleOf?: number | undefined;
|
||||
maximum?: number | undefined;
|
||||
exclusiveMaximum?: boolean | undefined;
|
||||
minimum?: number | undefined;
|
||||
exclusiveMinimum?: boolean | undefined;
|
||||
maxLength?: number | undefined;
|
||||
minLength?: number | undefined;
|
||||
pattern?: string | undefined;
|
||||
|
||||
/**
|
||||
* May only be defined when "items" is defined, and is a tuple of JSONSchemas.
|
||||
*
|
||||
* This provides a definition for additional items in an array instance
|
||||
* when tuple definitions of the items is provided. This can be false
|
||||
* to indicate additional items in the array are not allowed, or it can
|
||||
* be a schema that defines the schema of the additional items.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6
|
||||
*/
|
||||
additionalItems?: boolean | JSONSchema4 | undefined;
|
||||
|
||||
/**
|
||||
* This attribute defines the allowed items in an instance array, and
|
||||
* MUST be a schema or an array of schemas. The default value is an
|
||||
* empty schema which allows any value for items in the instance array.
|
||||
*
|
||||
* When this attribute value is a schema and the instance value is an
|
||||
* array, then all the items in the array MUST be valid according to the
|
||||
* schema.
|
||||
*
|
||||
* When this attribute value is an array of schemas and the instance
|
||||
* value is an array, each position in the instance array MUST conform
|
||||
* to the schema in the corresponding position for this array. This
|
||||
* called tuple typing. When tuple typing is used, additional items are
|
||||
* allowed, disallowed, or constrained by the "additionalItems"
|
||||
* (Section 5.6) attribute using the same rules as
|
||||
* "additionalProperties" (Section 5.4) for objects.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5
|
||||
*/
|
||||
items?: JSONSchema4 | JSONSchema4[] | undefined;
|
||||
|
||||
maxItems?: number | undefined;
|
||||
minItems?: number | undefined;
|
||||
uniqueItems?: boolean | undefined;
|
||||
maxProperties?: number | undefined;
|
||||
minProperties?: number | undefined;
|
||||
|
||||
/**
|
||||
* This attribute indicates if the instance must have a value, and not
|
||||
* be undefined. This is false by default, making the instance
|
||||
* optional.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7
|
||||
*/
|
||||
required?: boolean | string[] | undefined;
|
||||
|
||||
/**
|
||||
* This attribute defines a schema for all properties that are not
|
||||
* explicitly defined in an object type definition. If specified, the
|
||||
* value MUST be a schema or a boolean. If false is provided, no
|
||||
* additional properties are allowed beyond the properties defined in
|
||||
* the schema. The default value is an empty schema which allows any
|
||||
* value for additional properties.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4
|
||||
*/
|
||||
additionalProperties?: boolean | JSONSchema4 | undefined;
|
||||
|
||||
definitions?: {
|
||||
[k: string]: JSONSchema4;
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* This attribute is an object with property definitions that define the
|
||||
* valid values of instance object property values. When the instance
|
||||
* value is an object, the property values of the instance object MUST
|
||||
* conform to the property definitions in this object. In this object,
|
||||
* each property definition's value MUST be a schema, and the property's
|
||||
* name MUST be the name of the instance property that it defines. The
|
||||
* instance property value MUST be valid according to the schema from
|
||||
* the property definition. Properties are considered unordered, the
|
||||
* order of the instance properties MAY be in any order.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2
|
||||
*/
|
||||
properties?: {
|
||||
[k: string]: JSONSchema4;
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* This attribute is an object that defines the schema for a set of
|
||||
* property names of an object instance. The name of each property of
|
||||
* this attribute's object is a regular expression pattern in the ECMA
|
||||
* 262/Perl 5 format, while the value is a schema. If the pattern
|
||||
* matches the name of a property on the instance object, the value of
|
||||
* the instance's property MUST be valid against the pattern name's
|
||||
* schema value.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3
|
||||
*/
|
||||
patternProperties?: {
|
||||
[k: string]: JSONSchema4;
|
||||
} | undefined;
|
||||
dependencies?: {
|
||||
[k: string]: JSONSchema4 | string[];
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* This provides an enumeration of all possible values that are valid
|
||||
* for the instance property. This MUST be an array, and each item in
|
||||
* the array represents a possible value for the instance value. If
|
||||
* this attribute is defined, the instance value MUST be one of the
|
||||
* values in the array in order for the schema to be valid.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
|
||||
*/
|
||||
enum?: JSONSchema4Type[] | undefined;
|
||||
|
||||
/**
|
||||
* A single type, or a union of simple types
|
||||
*/
|
||||
type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
|
||||
|
||||
allOf?: JSONSchema4[] | undefined;
|
||||
anyOf?: JSONSchema4[] | undefined;
|
||||
oneOf?: JSONSchema4[] | undefined;
|
||||
not?: JSONSchema4 | undefined;
|
||||
|
||||
/**
|
||||
* The value of this property MUST be another schema which will provide
|
||||
* a base schema which the current schema will inherit from. The
|
||||
* inheritance rules are such that any instance that is valid according
|
||||
* to the current schema MUST be valid according to the referenced
|
||||
* schema. This MAY also be an array, in which case, the instance MUST
|
||||
* be valid for all the schemas in the array. A schema that extends
|
||||
* another schema MAY define additional attributes, constrain existing
|
||||
* attributes, or add other constraints.
|
||||
*
|
||||
* Conceptually, the behavior of extends can be seen as validating an
|
||||
* instance against all constraints in the extending schema as well as
|
||||
* the extended schema(s).
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26
|
||||
*/
|
||||
extends?: string | string[] | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6
|
||||
*/
|
||||
[k: string]: any;
|
||||
|
||||
format?: string | undefined;
|
||||
}
|
||||
|
||||
// ==================================================================================================
|
||||
// JSON Schema Draft 06
|
||||
// ==================================================================================================
|
||||
|
||||
export type JSONSchema6TypeName =
|
||||
| "string" //
|
||||
| "number"
|
||||
| "integer"
|
||||
| "boolean"
|
||||
| "object"
|
||||
| "array"
|
||||
| "null"
|
||||
| "any";
|
||||
|
||||
export type JSONSchema6Type =
|
||||
| string //
|
||||
| number
|
||||
| boolean
|
||||
| JSONSchema6Object
|
||||
| JSONSchema6Array
|
||||
| null;
|
||||
|
||||
// Workaround for infinite type recursion
|
||||
export interface JSONSchema6Object {
|
||||
[key: string]: JSONSchema6Type;
|
||||
}
|
||||
|
||||
// Workaround for infinite type recursion
|
||||
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
|
||||
export interface JSONSchema6Array extends Array<JSONSchema6Type> {}
|
||||
|
||||
/**
|
||||
* Meta schema
|
||||
*
|
||||
* Recommended values:
|
||||
* - 'http://json-schema.org/schema#'
|
||||
* - 'http://json-schema.org/hyper-schema#'
|
||||
* - 'http://json-schema.org/draft-06/schema#'
|
||||
* - 'http://json-schema.org/draft-06/hyper-schema#'
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
|
||||
*/
|
||||
export type JSONSchema6Version = string;
|
||||
|
||||
/**
|
||||
* JSON Schema V6
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01
|
||||
*/
|
||||
export type JSONSchema6Definition = JSONSchema6 | boolean;
|
||||
export interface JSONSchema6 {
|
||||
$id?: string | undefined;
|
||||
$ref?: string | undefined;
|
||||
$schema?: JSONSchema6Version | undefined;
|
||||
|
||||
/**
|
||||
* Must be strictly greater than 0.
|
||||
* A numeric instance is valid only if division by this keyword's value results in an integer.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1
|
||||
*/
|
||||
multipleOf?: number | undefined;
|
||||
|
||||
/**
|
||||
* Representing an inclusive upper limit for a numeric instance.
|
||||
* This keyword validates only if the instance is less than or exactly equal to "maximum".
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2
|
||||
*/
|
||||
maximum?: number | undefined;
|
||||
|
||||
/**
|
||||
* Representing an exclusive upper limit for a numeric instance.
|
||||
* This keyword validates only if the instance is strictly less than (not equal to) to "exclusiveMaximum".
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3
|
||||
*/
|
||||
exclusiveMaximum?: number | undefined;
|
||||
|
||||
/**
|
||||
* Representing an inclusive lower limit for a numeric instance.
|
||||
* This keyword validates only if the instance is greater than or exactly equal to "minimum".
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4
|
||||
*/
|
||||
minimum?: number | undefined;
|
||||
|
||||
/**
|
||||
* Representing an exclusive lower limit for a numeric instance.
|
||||
* This keyword validates only if the instance is strictly greater than (not equal to) to "exclusiveMinimum".
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5
|
||||
*/
|
||||
exclusiveMinimum?: number | undefined;
|
||||
|
||||
/**
|
||||
* Must be a non-negative integer.
|
||||
* A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6
|
||||
*/
|
||||
maxLength?: number | undefined;
|
||||
|
||||
/**
|
||||
* Must be a non-negative integer.
|
||||
* A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.
|
||||
* Omitting this keyword has the same behavior as a value of 0.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7
|
||||
*/
|
||||
minLength?: number | undefined;
|
||||
|
||||
/**
|
||||
* Should be a valid regular expression, according to the ECMA 262 regular expression dialect.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8
|
||||
*/
|
||||
pattern?: string | undefined;
|
||||
|
||||
/**
|
||||
* This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.
|
||||
* Omitting this keyword has the same behavior as an empty schema.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9
|
||||
*/
|
||||
items?: JSONSchema6Definition | JSONSchema6Definition[] | undefined;
|
||||
|
||||
/**
|
||||
* This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.
|
||||
* If "items" is an array of schemas, validation succeeds if every instance element
|
||||
* at a position greater than the size of "items" validates against "additionalItems".
|
||||
* Otherwise, "additionalItems" MUST be ignored, as the "items" schema
|
||||
* (possibly the default value of an empty schema) is applied to all elements.
|
||||
* Omitting this keyword has the same behavior as an empty schema.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10
|
||||
*/
|
||||
additionalItems?: JSONSchema6Definition | undefined;
|
||||
|
||||
/**
|
||||
* Must be a non-negative integer.
|
||||
* An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11
|
||||
*/
|
||||
maxItems?: number | undefined;
|
||||
|
||||
/**
|
||||
* Must be a non-negative integer.
|
||||
* An array instance is valid against "maxItems" if its size is greater than, or equal to, the value of this keyword.
|
||||
* Omitting this keyword has the same behavior as a value of 0.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12
|
||||
*/
|
||||
minItems?: number | undefined;
|
||||
|
||||
/**
|
||||
* If this keyword has boolean value false, the instance validates successfully.
|
||||
* If it has boolean value true, the instance validates successfully if all of its elements are unique.
|
||||
* Omitting this keyword has the same behavior as a value of false.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13
|
||||
*/
|
||||
uniqueItems?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* An array instance is valid against "contains" if at least one of its elements is valid against the given schema.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14
|
||||
*/
|
||||
contains?: JSONSchema6Definition | undefined;
|
||||
|
||||
/**
|
||||
* Must be a non-negative integer.
|
||||
* An object instance is valid against "maxProperties" if its number of properties is less than, or equal to, the value of this keyword.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15
|
||||
*/
|
||||
maxProperties?: number | undefined;
|
||||
|
||||
/**
|
||||
* Must be a non-negative integer.
|
||||
* An object instance is valid against "maxProperties" if its number of properties is greater than,
|
||||
* or equal to, the value of this keyword.
|
||||
* Omitting this keyword has the same behavior as a value of 0.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16
|
||||
*/
|
||||
minProperties?: number | undefined;
|
||||
|
||||
/**
|
||||
* Elements of this array must be unique.
|
||||
* An object instance is valid against this keyword if every item in the array is the name of a property in the instance.
|
||||
* Omitting this keyword has the same behavior as an empty array.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17
|
||||
*/
|
||||
required?: string[] | undefined;
|
||||
|
||||
/**
|
||||
* This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself.
|
||||
* Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value,
|
||||
* the child instance for that name successfully validates against the corresponding schema.
|
||||
* Omitting this keyword has the same behavior as an empty object.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18
|
||||
*/
|
||||
properties?: {
|
||||
[k: string]: JSONSchema6Definition;
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* This attribute is an object that defines the schema for a set of property names of an object instance.
|
||||
* The name of each property of this attribute's object is a regular expression pattern in the ECMA 262, while the value is a schema.
|
||||
* If the pattern matches the name of a property on the instance object, the value of the instance's property
|
||||
* MUST be valid against the pattern name's schema value.
|
||||
* Omitting this keyword has the same behavior as an empty object.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19
|
||||
*/
|
||||
patternProperties?: {
|
||||
[k: string]: JSONSchema6Definition;
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* This attribute defines a schema for all properties that are not explicitly defined in an object type definition.
|
||||
* If specified, the value MUST be a schema or a boolean.
|
||||
* If false is provided, no additional properties are allowed beyond the properties defined in the schema.
|
||||
* The default value is an empty schema which allows any value for additional properties.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20
|
||||
*/
|
||||
additionalProperties?: JSONSchema6Definition | undefined;
|
||||
|
||||
/**
|
||||
* This keyword specifies rules that are evaluated if the instance is an object and contains a certain property.
|
||||
* Each property specifies a dependency.
|
||||
* If the dependency value is an array, each element in the array must be unique.
|
||||
* Omitting this keyword has the same behavior as an empty object.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21
|
||||
*/
|
||||
dependencies?: {
|
||||
[k: string]: JSONSchema6Definition | string[];
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* Takes a schema which validates the names of all properties rather than their values.
|
||||
* Note the property name that the schema is testing will always be a string.
|
||||
* Omitting this keyword has the same behavior as an empty schema.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22
|
||||
*/
|
||||
propertyNames?: JSONSchema6Definition | undefined;
|
||||
|
||||
/**
|
||||
* This provides an enumeration of all possible values that are valid
|
||||
* for the instance property. This MUST be an array, and each item in
|
||||
* the array represents a possible value for the instance value. If
|
||||
* this attribute is defined, the instance value MUST be one of the
|
||||
* values in the array in order for the schema to be valid.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.23
|
||||
*/
|
||||
enum?: JSONSchema6Type[] | undefined;
|
||||
|
||||
/**
|
||||
* More readable form of a one-element "enum"
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24
|
||||
*/
|
||||
const?: JSONSchema6Type | undefined;
|
||||
|
||||
/**
|
||||
* A single type, or a union of simple types
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25
|
||||
*/
|
||||
type?: JSONSchema6TypeName | JSONSchema6TypeName[] | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
|
||||
*/
|
||||
allOf?: JSONSchema6Definition[] | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
|
||||
*/
|
||||
anyOf?: JSONSchema6Definition[] | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28
|
||||
*/
|
||||
oneOf?: JSONSchema6Definition[] | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29
|
||||
*/
|
||||
not?: JSONSchema6Definition | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1
|
||||
*/
|
||||
definitions?: {
|
||||
[k: string]: JSONSchema6Definition;
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* This attribute is a string that provides a short description of the instance property.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2
|
||||
*/
|
||||
title?: string | undefined;
|
||||
|
||||
/**
|
||||
* This attribute is a string that provides a full description of the of purpose the instance property.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2
|
||||
*/
|
||||
description?: string | undefined;
|
||||
|
||||
/**
|
||||
* This keyword can be used to supply a default JSON value associated with a particular schema.
|
||||
* It is RECOMMENDED that a default value be valid against the associated schema.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3
|
||||
*/
|
||||
default?: JSONSchema6Type | undefined;
|
||||
|
||||
/**
|
||||
* Array of examples with no validation effect the value of "default" is usable as an example without repeating it under this keyword
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4
|
||||
*/
|
||||
examples?: JSONSchema6Type[] | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8
|
||||
*/
|
||||
format?: string | undefined;
|
||||
}
|
||||
|
||||
// ==================================================================================================
|
||||
// JSON Schema Draft 07
|
||||
// ==================================================================================================
|
||||
// https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Primitive type
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
|
||||
*/
|
||||
export type JSONSchema7TypeName =
|
||||
| "string" //
|
||||
| "number"
|
||||
| "integer"
|
||||
| "boolean"
|
||||
| "object"
|
||||
| "array"
|
||||
| "null";
|
||||
|
||||
/**
|
||||
* Primitive type
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
|
||||
*/
|
||||
export type JSONSchema7Type =
|
||||
| string //
|
||||
| number
|
||||
| boolean
|
||||
| JSONSchema7Object
|
||||
| JSONSchema7Array
|
||||
| null;
|
||||
|
||||
// Workaround for infinite type recursion
|
||||
export interface JSONSchema7Object {
|
||||
[key: string]: JSONSchema7Type;
|
||||
}
|
||||
|
||||
// Workaround for infinite type recursion
|
||||
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
|
||||
export interface JSONSchema7Array extends Array<JSONSchema7Type> {}
|
||||
|
||||
/**
|
||||
* Meta schema
|
||||
*
|
||||
* Recommended values:
|
||||
* - 'http://json-schema.org/schema#'
|
||||
* - 'http://json-schema.org/hyper-schema#'
|
||||
* - 'http://json-schema.org/draft-07/schema#'
|
||||
* - 'http://json-schema.org/draft-07/hyper-schema#'
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
|
||||
*/
|
||||
export type JSONSchema7Version = string;
|
||||
|
||||
/**
|
||||
* JSON Schema v7
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
|
||||
*/
|
||||
export type JSONSchema7Definition = JSONSchema7 | boolean;
|
||||
export interface JSONSchema7 {
|
||||
$id?: string | undefined;
|
||||
$ref?: string | undefined;
|
||||
$schema?: JSONSchema7Version | undefined;
|
||||
$comment?: string | undefined;
|
||||
|
||||
/**
|
||||
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
|
||||
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
|
||||
*/
|
||||
$defs?: {
|
||||
[key: string]: JSONSchema7Definition;
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
|
||||
*/
|
||||
type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
|
||||
enum?: JSONSchema7Type[] | undefined;
|
||||
const?: JSONSchema7Type | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
|
||||
*/
|
||||
multipleOf?: number | undefined;
|
||||
maximum?: number | undefined;
|
||||
exclusiveMaximum?: number | undefined;
|
||||
minimum?: number | undefined;
|
||||
exclusiveMinimum?: number | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
|
||||
*/
|
||||
maxLength?: number | undefined;
|
||||
minLength?: number | undefined;
|
||||
pattern?: string | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
|
||||
*/
|
||||
items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined;
|
||||
additionalItems?: JSONSchema7Definition | undefined;
|
||||
maxItems?: number | undefined;
|
||||
minItems?: number | undefined;
|
||||
uniqueItems?: boolean | undefined;
|
||||
contains?: JSONSchema7Definition | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
|
||||
*/
|
||||
maxProperties?: number | undefined;
|
||||
minProperties?: number | undefined;
|
||||
required?: string[] | undefined;
|
||||
properties?: {
|
||||
[key: string]: JSONSchema7Definition;
|
||||
} | undefined;
|
||||
patternProperties?: {
|
||||
[key: string]: JSONSchema7Definition;
|
||||
} | undefined;
|
||||
additionalProperties?: JSONSchema7Definition | undefined;
|
||||
dependencies?: {
|
||||
[key: string]: JSONSchema7Definition | string[];
|
||||
} | undefined;
|
||||
propertyNames?: JSONSchema7Definition | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
|
||||
*/
|
||||
if?: JSONSchema7Definition | undefined;
|
||||
then?: JSONSchema7Definition | undefined;
|
||||
else?: JSONSchema7Definition | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
|
||||
*/
|
||||
allOf?: JSONSchema7Definition[] | undefined;
|
||||
anyOf?: JSONSchema7Definition[] | undefined;
|
||||
oneOf?: JSONSchema7Definition[] | undefined;
|
||||
not?: JSONSchema7Definition | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
|
||||
*/
|
||||
format?: string | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
|
||||
*/
|
||||
contentMediaType?: string | undefined;
|
||||
contentEncoding?: string | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
|
||||
*/
|
||||
definitions?: {
|
||||
[key: string]: JSONSchema7Definition;
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
|
||||
*/
|
||||
title?: string | undefined;
|
||||
description?: string | undefined;
|
||||
default?: JSONSchema7Type | undefined;
|
||||
readOnly?: boolean | undefined;
|
||||
writeOnly?: boolean | undefined;
|
||||
examples?: JSONSchema7Type | undefined;
|
||||
}
|
||||
|
||||
export interface ValidationResult {
|
||||
valid: boolean;
|
||||
errors: ValidationError[];
|
||||
}
|
||||
|
||||
export interface ValidationError {
|
||||
property: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* To use the validator call JSONSchema.validate with an instance object and an optional schema object.
|
||||
* If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating),
|
||||
* that schema will be used to validate and the schema parameter is not necessary (if both exist,
|
||||
* both validations will occur).
|
||||
*/
|
||||
export function validate(instance: {}, schema: JSONSchema4 | JSONSchema6 | JSONSchema7): ValidationResult;
|
||||
|
||||
/**
|
||||
* The checkPropertyChange method will check to see if an value can legally be in property with the given schema
|
||||
* This is slightly different than the validate method in that it will fail if the schema is readonly and it will
|
||||
* not check for self-validation, it is assumed that the passed in value is already internally valid.
|
||||
*/
|
||||
export function checkPropertyChange(
|
||||
value: any,
|
||||
schema: JSONSchema4 | JSONSchema6 | JSONSchema7,
|
||||
property: string,
|
||||
): ValidationResult;
|
||||
|
||||
/**
|
||||
* This checks to ensure that the result is valid and will throw an appropriate error message if it is not.
|
||||
*/
|
||||
export function mustBeValid(result: ValidationResult): void;
|
||||
40
node_modules/@types/json-schema/package.json
generated
vendored
Normal file
40
node_modules/@types/json-schema/package.json
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "@types/json-schema",
|
||||
"version": "7.0.15",
|
||||
"description": "TypeScript definitions for json-schema",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Boris Cherny",
|
||||
"githubUsername": "bcherny",
|
||||
"url": "https://github.com/bcherny"
|
||||
},
|
||||
{
|
||||
"name": "Lucian Buzzo",
|
||||
"githubUsername": "lucianbuzzo",
|
||||
"url": "https://github.com/lucianbuzzo"
|
||||
},
|
||||
{
|
||||
"name": "Roland Groza",
|
||||
"githubUsername": "rolandjitsu",
|
||||
"url": "https://github.com/rolandjitsu"
|
||||
},
|
||||
{
|
||||
"name": "Jason Kwok",
|
||||
"githubUsername": "JasonHK",
|
||||
"url": "https://github.com/JasonHK"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/json-schema"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "79984fd70cd25c3f7d72b84368778c763c89728ea0073832d745d4691b705257",
|
||||
"typeScriptVersion": "4.5"
|
||||
}
|
||||
21
node_modules/@types/parse-path/LICENSE
generated
vendored
Normal file
21
node_modules/@types/parse-path/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
61
node_modules/@types/parse-path/README.md
generated
vendored
Normal file
61
node_modules/@types/parse-path/README.md
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
# Installation
|
||||
> `npm install --save @types/parse-path`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for parse-path (https://github.com/IonicaBizau/parse-path).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse-path.
|
||||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse-path/index.d.ts)
|
||||
````ts
|
||||
declare namespace parsePath {
|
||||
type Protocol = "http" | "https" | "ssh" | "file" | "git";
|
||||
|
||||
interface ParsedPath {
|
||||
/** The url hash. */
|
||||
hash: string;
|
||||
/** The url domain (including subdomain and port). */
|
||||
host: string;
|
||||
/** The input url. */
|
||||
href: string;
|
||||
/**
|
||||
* @default ''
|
||||
*/
|
||||
password: string;
|
||||
/**
|
||||
* Whether the parsing failed or not.
|
||||
*/
|
||||
parse_failed: boolean;
|
||||
/** The url pathname. */
|
||||
pathname: string;
|
||||
/**
|
||||
* The domain port.
|
||||
* @default ''
|
||||
*/
|
||||
port: string;
|
||||
/** The first protocol, `"ssh"` (if the url is a ssh url) or `"file"`. */
|
||||
protocol: Protocol;
|
||||
/** An array with the url protocols (usually it has one element). */
|
||||
protocols: Protocol[];
|
||||
/** The url querystring, parsed as object. */
|
||||
query: Record<string, string>;
|
||||
/** The url domain (including subdomains). */
|
||||
resource: string;
|
||||
/** The url querystring value. */
|
||||
search: string;
|
||||
/** The authentication user (usually for ssh urls). */
|
||||
user: string;
|
||||
}
|
||||
}
|
||||
|
||||
declare function parsePath(url: string): parsePath.ParsedPath;
|
||||
export = parsePath;
|
||||
|
||||
````
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 07 Nov 2023 09:09:39 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Florian Keller](https://github.com/ffflorian).
|
||||
42
node_modules/@types/parse-path/index.d.ts
generated
vendored
Normal file
42
node_modules/@types/parse-path/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
declare namespace parsePath {
|
||||
type Protocol = "http" | "https" | "ssh" | "file" | "git";
|
||||
|
||||
interface ParsedPath {
|
||||
/** The url hash. */
|
||||
hash: string;
|
||||
/** The url domain (including subdomain and port). */
|
||||
host: string;
|
||||
/** The input url. */
|
||||
href: string;
|
||||
/**
|
||||
* @default ''
|
||||
*/
|
||||
password: string;
|
||||
/**
|
||||
* Whether the parsing failed or not.
|
||||
*/
|
||||
parse_failed: boolean;
|
||||
/** The url pathname. */
|
||||
pathname: string;
|
||||
/**
|
||||
* The domain port.
|
||||
* @default ''
|
||||
*/
|
||||
port: string;
|
||||
/** The first protocol, `"ssh"` (if the url is a ssh url) or `"file"`. */
|
||||
protocol: Protocol;
|
||||
/** An array with the url protocols (usually it has one element). */
|
||||
protocols: Protocol[];
|
||||
/** The url querystring, parsed as object. */
|
||||
query: Record<string, string>;
|
||||
/** The url domain (including subdomains). */
|
||||
resource: string;
|
||||
/** The url querystring value. */
|
||||
search: string;
|
||||
/** The authentication user (usually for ssh urls). */
|
||||
user: string;
|
||||
}
|
||||
}
|
||||
|
||||
declare function parsePath(url: string): parsePath.ParsedPath;
|
||||
export = parsePath;
|
||||
25
node_modules/@types/parse-path/package.json
generated
vendored
Normal file
25
node_modules/@types/parse-path/package.json
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "@types/parse-path",
|
||||
"version": "7.0.3",
|
||||
"description": "TypeScript definitions for parse-path",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse-path",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Florian Keller",
|
||||
"githubUsername": "ffflorian",
|
||||
"url": "https://github.com/ffflorian"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/parse-path"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "5c1ea668ece4db84f13651164051ceed7fc88396326015d0473e9768f1bc3b40",
|
||||
"typeScriptVersion": "4.5"
|
||||
}
|
||||
21
node_modules/@types/semver/LICENSE
generated
vendored
Normal file
21
node_modules/@types/semver/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
15
node_modules/@types/semver/README.md
generated
vendored
Normal file
15
node_modules/@types/semver/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/semver`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for semver (https://github.com/npm/node-semver).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Wed, 03 Sep 2025 15:02:33 GMT
|
||||
* Dependencies: 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), [Klaus Meinhardt](https://github.com/ajafff), [ExE Boss](https://github.com/ExE-Boss), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
|
||||
17
node_modules/@types/semver/classes/comparator.d.ts
generated
vendored
Normal file
17
node_modules/@types/semver/classes/comparator.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import semver = require("../index");
|
||||
import SemVer = require("./semver");
|
||||
|
||||
declare class Comparator {
|
||||
constructor(comp: string | Comparator, optionsOrLoose?: boolean | semver.Options);
|
||||
|
||||
semver: SemVer;
|
||||
operator: "" | "=" | "<" | ">" | "<=" | ">=";
|
||||
value: string;
|
||||
loose: boolean;
|
||||
options: semver.Options;
|
||||
parse(comp: string): void;
|
||||
test(version: string | SemVer): boolean;
|
||||
intersects(comp: Comparator, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
}
|
||||
|
||||
export = Comparator;
|
||||
21
node_modules/@types/semver/classes/range.d.ts
generated
vendored
Normal file
21
node_modules/@types/semver/classes/range.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import semver = require("../index");
|
||||
import Comparator = require("./comparator");
|
||||
import SemVer = require("./semver");
|
||||
|
||||
declare class Range {
|
||||
constructor(range: string | Range, optionsOrLoose?: boolean | semver.RangeOptions);
|
||||
|
||||
range: string;
|
||||
raw: string;
|
||||
loose: boolean;
|
||||
options: semver.Options;
|
||||
includePrerelease: boolean;
|
||||
format(): string;
|
||||
inspect(): string;
|
||||
|
||||
set: ReadonlyArray<readonly Comparator[]>;
|
||||
parseRange(range: string): readonly Comparator[];
|
||||
test(version: string | SemVer): boolean;
|
||||
intersects(range: Range, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
}
|
||||
export = Range;
|
||||
69
node_modules/@types/semver/classes/semver.d.ts
generated
vendored
Normal file
69
node_modules/@types/semver/classes/semver.d.ts
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
import semver = require("../index");
|
||||
import inc = require("../functions/inc");
|
||||
|
||||
declare class SemVer {
|
||||
constructor(version: string | SemVer, optionsOrLoose?: boolean | semver.RangeOptions);
|
||||
|
||||
raw: string;
|
||||
loose: boolean;
|
||||
options: semver.Options;
|
||||
format(): string;
|
||||
inspect(): string;
|
||||
|
||||
major: number;
|
||||
minor: number;
|
||||
patch: number;
|
||||
version: string;
|
||||
build: readonly 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: semver.ReleaseType,
|
||||
identifier?: string,
|
||||
identifierBase?: inc.IdentifierBase,
|
||||
): SemVer;
|
||||
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export = SemVer;
|
||||
8
node_modules/@types/semver/functions/clean.d.ts
generated
vendored
Normal file
8
node_modules/@types/semver/functions/clean.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Returns cleaned (removed leading/trailing whitespace, remove '=v' prefix) and parsed version, or null if version is invalid.
|
||||
*/
|
||||
declare function clean(version: string, optionsOrLoose?: boolean | semver.Options): string | null;
|
||||
|
||||
export = clean;
|
||||
16
node_modules/@types/semver/functions/cmp.d.ts
generated
vendored
Normal file
16
node_modules/@types/semver/functions/cmp.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import semver = require("../index");
|
||||
import SemVer = require("../classes/semver");
|
||||
|
||||
/**
|
||||
* Pass in a comparison string, and it'll call the corresponding semver comparison function.
|
||||
* "===" and "!==" do simple string comparison, but are included for completeness.
|
||||
* Throws if an invalid comparison string is provided.
|
||||
*/
|
||||
declare function cmp(
|
||||
v1: string | SemVer,
|
||||
operator: semver.Operator,
|
||||
v2: string | SemVer,
|
||||
optionsOrLoose?: boolean | semver.Options,
|
||||
): boolean;
|
||||
|
||||
export = cmp;
|
||||
12
node_modules/@types/semver/functions/coerce.d.ts
generated
vendored
Normal file
12
node_modules/@types/semver/functions/coerce.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import semver = require("../index");
|
||||
import SemVer = require("../classes/semver");
|
||||
|
||||
/**
|
||||
* Coerces a string to SemVer if possible
|
||||
*/
|
||||
declare function coerce(
|
||||
version: string | number | SemVer | null | undefined,
|
||||
options?: semver.CoerceOptions,
|
||||
): SemVer | null;
|
||||
|
||||
export = coerce;
|
||||
21
node_modules/@types/semver/functions/compare-build.d.ts
generated
vendored
Normal file
21
node_modules/@types/semver/functions/compare-build.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import semver = require("../index");
|
||||
import SemVer = require("../classes/semver");
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
declare function compareBuild(
|
||||
a: string | SemVer,
|
||||
b: string | SemVer,
|
||||
optionsOrLoose?: boolean | semver.Options,
|
||||
): 1 | 0 | -1;
|
||||
export = compareBuild;
|
||||
8
node_modules/@types/semver/functions/compare-loose.d.ts
generated
vendored
Normal file
8
node_modules/@types/semver/functions/compare-loose.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
|
||||
/**
|
||||
* Short for compare(v1, v2, { loose: true })
|
||||
*/
|
||||
declare function compareLoose(v1: string | SemVer, v2: string | SemVer): 1 | 0 | -1;
|
||||
|
||||
export = compareLoose;
|
||||
20
node_modules/@types/semver/functions/compare.d.ts
generated
vendored
Normal file
20
node_modules/@types/semver/functions/compare.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import semver = require("../index");
|
||||
import SemVer = require("../classes/semver");
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
declare function compare(
|
||||
v1: string | SemVer,
|
||||
v2: string | SemVer,
|
||||
optionsOrLoose?: boolean | semver.Options,
|
||||
): 1 | 0 | -1;
|
||||
|
||||
export = compare;
|
||||
9
node_modules/@types/semver/functions/diff.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/diff.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import semver = require("../index");
|
||||
import SemVer = require("../classes/semver");
|
||||
|
||||
/**
|
||||
* Returns difference between two versions by the release type (major, premajor, minor, preminor, patch, prepatch, or prerelease), or null if the versions are the same.
|
||||
*/
|
||||
declare function diff(v1: string | SemVer, v2: string | SemVer): semver.ReleaseType | null;
|
||||
|
||||
export = diff;
|
||||
9
node_modules/@types/semver/functions/eq.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/eq.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* v1 == v2 This is true if they're logically equivalent, even if they're not the exact same string. You already know how to compare strings.
|
||||
*/
|
||||
declare function eq(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
|
||||
export = eq;
|
||||
9
node_modules/@types/semver/functions/gt.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/gt.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* v1 > v2
|
||||
*/
|
||||
declare function gt(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
|
||||
export = gt;
|
||||
9
node_modules/@types/semver/functions/gte.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/gte.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* v1 >= v2
|
||||
*/
|
||||
declare function gte(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
|
||||
export = gte;
|
||||
26
node_modules/@types/semver/functions/inc.d.ts
generated
vendored
Normal file
26
node_modules/@types/semver/functions/inc.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
declare namespace inc {
|
||||
/** Base number to be used for the prerelease identifier */
|
||||
type IdentifierBase = "0" | "1" | false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the version incremented by the release type (major, premajor, minor, preminor, patch, prepatch, or prerelease), or null if it's not valid.
|
||||
*/
|
||||
declare function inc(
|
||||
version: string | SemVer,
|
||||
release: semver.ReleaseType,
|
||||
optionsOrLoose?: boolean | semver.Options,
|
||||
identifier?: string,
|
||||
identifierBase?: inc.IdentifierBase,
|
||||
): string | null;
|
||||
declare function inc(
|
||||
version: string | SemVer,
|
||||
release: semver.ReleaseType,
|
||||
identifier: string,
|
||||
identifierBase?: inc.IdentifierBase,
|
||||
): string | null;
|
||||
|
||||
export = inc;
|
||||
9
node_modules/@types/semver/functions/lt.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/lt.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* v1 < v2
|
||||
*/
|
||||
declare function lt(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
|
||||
export = lt;
|
||||
8
node_modules/@types/semver/functions/lte.d.ts
generated
vendored
Normal file
8
node_modules/@types/semver/functions/lte.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* v1 <= v2
|
||||
*/
|
||||
declare function lte(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
export = lte;
|
||||
9
node_modules/@types/semver/functions/major.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/major.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the major version number.
|
||||
*/
|
||||
declare function major(version: string | SemVer, optionsOrLoose?: boolean | semver.Options): number;
|
||||
|
||||
export = major;
|
||||
9
node_modules/@types/semver/functions/minor.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/minor.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the minor version number.
|
||||
*/
|
||||
declare function minor(version: string | SemVer, optionsOrLoose?: boolean | semver.Options): number;
|
||||
|
||||
export = minor;
|
||||
9
node_modules/@types/semver/functions/neq.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/neq.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* v1 != v2 The opposite of eq.
|
||||
*/
|
||||
declare function neq(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
|
||||
export = neq;
|
||||
23
node_modules/@types/semver/functions/parse.d.ts
generated
vendored
Normal file
23
node_modules/@types/semver/functions/parse.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the parsed version as a `SemVer` object.
|
||||
*
|
||||
* In case `version` is invalid, the function will
|
||||
* - throw if `throwErrors` is `true`.
|
||||
* - return `null` otherwise.
|
||||
*/
|
||||
declare function parse(version?: string | SemVer | null): SemVer | null;
|
||||
declare function parse(
|
||||
version: string | SemVer | null | undefined,
|
||||
optionsOrLoose: boolean | semver.Options,
|
||||
throwErrors: true,
|
||||
): SemVer;
|
||||
declare function parse(
|
||||
version: string | SemVer | null | undefined,
|
||||
optionsOrLoose: boolean | semver.Options,
|
||||
throwErrors?: boolean,
|
||||
): SemVer | null;
|
||||
|
||||
export = parse;
|
||||
9
node_modules/@types/semver/functions/patch.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/patch.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the patch version number.
|
||||
*/
|
||||
declare function patch(version: string | SemVer, optionsOrLoose?: boolean | semver.Options): number;
|
||||
|
||||
export = patch;
|
||||
12
node_modules/@types/semver/functions/prerelease.d.ts
generated
vendored
Normal file
12
node_modules/@types/semver/functions/prerelease.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Returns an array of prerelease components, or null if none exist.
|
||||
*/
|
||||
declare function prerelease(
|
||||
version: string | SemVer,
|
||||
optionsOrLoose?: boolean | semver.Options,
|
||||
): ReadonlyArray<string | number> | null;
|
||||
|
||||
export = prerelease;
|
||||
15
node_modules/@types/semver/functions/rcompare.d.ts
generated
vendored
Normal file
15
node_modules/@types/semver/functions/rcompare.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* The reverse of compare.
|
||||
*
|
||||
* Sorts in descending order when passed to `Array.sort()`.
|
||||
*/
|
||||
declare function rcompare(
|
||||
v1: string | SemVer,
|
||||
v2: string | SemVer,
|
||||
optionsOrLoose?: boolean | semver.Options,
|
||||
): 1 | 0 | -1;
|
||||
|
||||
export = rcompare;
|
||||
9
node_modules/@types/semver/functions/rsort.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/rsort.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Sorts an array of semver entries in descending order using `compareBuild()`.
|
||||
*/
|
||||
declare function rsort<T extends string | SemVer>(list: T[], optionsOrLoose?: boolean | semver.Options): T[];
|
||||
|
||||
export = rsort;
|
||||
14
node_modules/@types/semver/functions/satisfies.d.ts
generated
vendored
Normal file
14
node_modules/@types/semver/functions/satisfies.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import Range = require("../classes/range");
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return true if the version satisfies the range.
|
||||
*/
|
||||
declare function satisfies(
|
||||
version: string | SemVer,
|
||||
range: string | Range,
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): boolean;
|
||||
|
||||
export = satisfies;
|
||||
9
node_modules/@types/semver/functions/sort.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/sort.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Sorts an array of semver entries in ascending order using `compareBuild()`.
|
||||
*/
|
||||
declare function sort<T extends string | SemVer>(list: T[], optionsOrLoose?: boolean | semver.Options): T[];
|
||||
|
||||
export = sort;
|
||||
11
node_modules/@types/semver/functions/valid.d.ts
generated
vendored
Normal file
11
node_modules/@types/semver/functions/valid.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import semver = require("../index");
|
||||
import SemVer = require("../classes/semver");
|
||||
/**
|
||||
* Return the parsed version as a string, or null if it's not valid.
|
||||
*/
|
||||
declare function valid(
|
||||
version: string | SemVer | null | undefined,
|
||||
optionsOrLoose?: boolean | semver.Options,
|
||||
): string | null;
|
||||
|
||||
export = valid;
|
||||
136
node_modules/@types/semver/index.d.ts
generated
vendored
Normal file
136
node_modules/@types/semver/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
// re-exports for index file
|
||||
|
||||
// functions for working with versions
|
||||
import semverParse = require("./functions/parse");
|
||||
import semverValid = require("./functions/valid");
|
||||
import semverClean = require("./functions/clean");
|
||||
import semverInc = require("./functions/inc");
|
||||
import semverDiff = require("./functions/diff");
|
||||
import semverMajor = require("./functions/major");
|
||||
import semverMinor = require("./functions/minor");
|
||||
import semverPatch = require("./functions/patch");
|
||||
import semverPrerelease = require("./functions/prerelease");
|
||||
import semverCompare = require("./functions/compare");
|
||||
import semverRcompare = require("./functions/rcompare");
|
||||
import semverCompareLoose = require("./functions/compare-loose");
|
||||
import semverCompareBuild = require("./functions/compare-build");
|
||||
import semverSort = require("./functions/sort");
|
||||
import semverRsort = require("./functions/rsort");
|
||||
|
||||
export {
|
||||
semverClean as clean,
|
||||
semverCompare as compare,
|
||||
semverCompareBuild as compareBuild,
|
||||
semverCompareLoose as compareLoose,
|
||||
semverDiff as diff,
|
||||
semverInc as inc,
|
||||
semverMajor as major,
|
||||
semverMinor as minor,
|
||||
semverParse as parse,
|
||||
semverPatch as patch,
|
||||
semverPrerelease as prerelease,
|
||||
semverRcompare as rcompare,
|
||||
semverRsort as rsort,
|
||||
semverSort as sort,
|
||||
semverValid as valid,
|
||||
};
|
||||
|
||||
// low-level comparators between versions
|
||||
import semverGt = require("./functions/gt");
|
||||
import semverLt = require("./functions/lt");
|
||||
import semverEq = require("./functions/eq");
|
||||
import semverNeq = require("./functions/neq");
|
||||
import semverGte = require("./functions/gte");
|
||||
import semverLte = require("./functions/lte");
|
||||
import semverCmp = require("./functions/cmp");
|
||||
import semverCoerce = require("./functions/coerce");
|
||||
|
||||
export {
|
||||
semverCmp as cmp,
|
||||
semverCoerce as coerce,
|
||||
semverEq as eq,
|
||||
semverGt as gt,
|
||||
semverGte as gte,
|
||||
semverLt as lt,
|
||||
semverLte as lte,
|
||||
semverNeq as neq,
|
||||
};
|
||||
|
||||
// working with ranges
|
||||
import semverSatisfies = require("./functions/satisfies");
|
||||
import semverMaxSatisfying = require("./ranges/max-satisfying");
|
||||
import semverMinSatisfying = require("./ranges/min-satisfying");
|
||||
import semverToComparators = require("./ranges/to-comparators");
|
||||
import semverMinVersion = require("./ranges/min-version");
|
||||
import semverValidRange = require("./ranges/valid");
|
||||
import semverOutside = require("./ranges/outside");
|
||||
import semverGtr = require("./ranges/gtr");
|
||||
import semverLtr = require("./ranges/ltr");
|
||||
import semverIntersects = require("./ranges/intersects");
|
||||
import simplify = require("./ranges/simplify");
|
||||
import rangeSubset = require("./ranges/subset");
|
||||
|
||||
export {
|
||||
rangeSubset as subset,
|
||||
semverGtr as gtr,
|
||||
semverIntersects as intersects,
|
||||
semverLtr as ltr,
|
||||
semverMaxSatisfying as maxSatisfying,
|
||||
semverMinSatisfying as minSatisfying,
|
||||
semverMinVersion as minVersion,
|
||||
semverOutside as outside,
|
||||
semverSatisfies as satisfies,
|
||||
semverToComparators as toComparators,
|
||||
semverValidRange as validRange,
|
||||
simplify as simplifyRange,
|
||||
};
|
||||
|
||||
// classes
|
||||
import SemVer = require("./classes/semver");
|
||||
import Range = require("./classes/range");
|
||||
import Comparator = require("./classes/comparator");
|
||||
|
||||
export { Comparator, Range, SemVer };
|
||||
|
||||
// internals
|
||||
import identifiers = require("./internals/identifiers");
|
||||
export import compareIdentifiers = identifiers.compareIdentifiers;
|
||||
export import rcompareIdentifiers = identifiers.rcompareIdentifiers;
|
||||
|
||||
export const SEMVER_SPEC_VERSION: "2.0.0";
|
||||
|
||||
export const RELEASE_TYPES: ReleaseType[];
|
||||
|
||||
export type ReleaseType = "major" | "premajor" | "minor" | "preminor" | "patch" | "prepatch" | "prerelease" | "release";
|
||||
|
||||
export interface Options {
|
||||
loose?: boolean | undefined;
|
||||
}
|
||||
|
||||
export interface RangeOptions extends Options {
|
||||
includePrerelease?: boolean | undefined;
|
||||
}
|
||||
export interface CoerceOptions extends Options {
|
||||
/**
|
||||
* If the `options.includePrerelease` flag is set, then the `coerce` result will contain
|
||||
* prerelease and build parts of a version. For example, `1.2.3.4-rc.1+rev.2`
|
||||
* will preserve prerelease `rc.1` and build `rev.2` in the result.
|
||||
*
|
||||
* @default false
|
||||
* @since 7.6.0
|
||||
*/
|
||||
includePrerelease?: boolean | undefined;
|
||||
/**
|
||||
* If the `options.rtl` flag is set, then `coerce` will return the right-most
|
||||
* coercible tuple that does not share an ending index with a longer coercible
|
||||
* tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
|
||||
* `4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
|
||||
* any other overlapping SemVer tuple.
|
||||
*
|
||||
* @default false
|
||||
* @since 6.2.0
|
||||
*/
|
||||
rtl?: boolean | undefined;
|
||||
}
|
||||
|
||||
export type Operator = "===" | "!==" | "" | "=" | "==" | "!=" | ">" | ">=" | "<" | "<=";
|
||||
13
node_modules/@types/semver/internals/identifiers.d.ts
generated
vendored
Normal file
13
node_modules/@types/semver/internals/identifiers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* 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 | undefined, b: string | null | undefined): 1 | 0 | -1;
|
||||
|
||||
/**
|
||||
* The reverse of compareIdentifiers.
|
||||
*
|
||||
* Sorts in descending order when passed to `Array.sort()`.
|
||||
*/
|
||||
export function rcompareIdentifiers(a: string | null | undefined, b: string | null | undefined): 1 | 0 | -1;
|
||||
51
node_modules/@types/semver/package.json
generated
vendored
Normal file
51
node_modules/@types/semver/package.json
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "@types/semver",
|
||||
"version": "7.7.1",
|
||||
"description": "TypeScript definitions for semver",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Bart van der Schoor",
|
||||
"githubUsername": "Bartvds",
|
||||
"url": "https://github.com/Bartvds"
|
||||
},
|
||||
{
|
||||
"name": "BendingBender",
|
||||
"githubUsername": "BendingBender",
|
||||
"url": "https://github.com/BendingBender"
|
||||
},
|
||||
{
|
||||
"name": "Lucian Buzzo",
|
||||
"githubUsername": "LucianBuzzo",
|
||||
"url": "https://github.com/LucianBuzzo"
|
||||
},
|
||||
{
|
||||
"name": "Klaus Meinhardt",
|
||||
"githubUsername": "ajafff",
|
||||
"url": "https://github.com/ajafff"
|
||||
},
|
||||
{
|
||||
"name": "ExE Boss",
|
||||
"githubUsername": "ExE-Boss",
|
||||
"url": "https://github.com/ExE-Boss"
|
||||
},
|
||||
{
|
||||
"name": "Piotr Błażejewicz",
|
||||
"githubUsername": "peterblazejewicz",
|
||||
"url": "https://github.com/peterblazejewicz"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/semver"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "05c64b15fc87f8868c6987ed5adbd9c42e5be6045d53624b68f3046619c2e29e",
|
||||
"typeScriptVersion": "5.2"
|
||||
}
|
||||
2
node_modules/@types/semver/preload.d.ts
generated
vendored
Normal file
2
node_modules/@types/semver/preload.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import semver = require(".");
|
||||
export = semver;
|
||||
14
node_modules/@types/semver/ranges/gtr.d.ts
generated
vendored
Normal file
14
node_modules/@types/semver/ranges/gtr.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import Range = require("../classes/range");
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return true if version is greater than all the versions possible in the range.
|
||||
*/
|
||||
declare function gtr(
|
||||
version: string | SemVer,
|
||||
range: string | Range,
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): boolean;
|
||||
|
||||
export = gtr;
|
||||
13
node_modules/@types/semver/ranges/intersects.d.ts
generated
vendored
Normal file
13
node_modules/@types/semver/ranges/intersects.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import Range = require("../classes/range");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return true if any of the ranges comparators intersect
|
||||
*/
|
||||
declare function intersects(
|
||||
range1: string | Range,
|
||||
range2: string | Range,
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): boolean;
|
||||
|
||||
export = intersects;
|
||||
14
node_modules/@types/semver/ranges/ltr.d.ts
generated
vendored
Normal file
14
node_modules/@types/semver/ranges/ltr.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import Range = require("../classes/range");
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return true if version is less than all the versions possible in the range.
|
||||
*/
|
||||
declare function ltr(
|
||||
version: string | SemVer,
|
||||
range: string | Range,
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): boolean;
|
||||
|
||||
export = ltr;
|
||||
14
node_modules/@types/semver/ranges/max-satisfying.d.ts
generated
vendored
Normal file
14
node_modules/@types/semver/ranges/max-satisfying.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import Range = require("../classes/range");
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the highest version in the list that satisfies the range, or null if none of them do.
|
||||
*/
|
||||
declare function maxSatisfying<T extends string | SemVer>(
|
||||
versions: readonly T[],
|
||||
range: string | Range,
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): T | null;
|
||||
|
||||
export = maxSatisfying;
|
||||
14
node_modules/@types/semver/ranges/min-satisfying.d.ts
generated
vendored
Normal file
14
node_modules/@types/semver/ranges/min-satisfying.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import Range = require("../classes/range");
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the lowest version in the list that satisfies the range, or null if none of them do.
|
||||
*/
|
||||
declare function minSatisfying<T extends string | SemVer>(
|
||||
versions: readonly T[],
|
||||
range: string | Range,
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): T | null;
|
||||
|
||||
export = minSatisfying;
|
||||
10
node_modules/@types/semver/ranges/min-version.d.ts
generated
vendored
Normal file
10
node_modules/@types/semver/ranges/min-version.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import Range = require("../classes/range");
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the lowest version that can possibly match the given range.
|
||||
*/
|
||||
declare function minVersion(range: string | Range, optionsOrLoose?: boolean | semver.Options): SemVer | null;
|
||||
|
||||
export = minVersion;
|
||||
15
node_modules/@types/semver/ranges/outside.d.ts
generated
vendored
Normal file
15
node_modules/@types/semver/ranges/outside.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import Range = require("../classes/range");
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return true if the version is outside the bounds of the range in either the high or low direction.
|
||||
* The hilo argument must be either the string '>' or '<'. (This is the function called by gtr and ltr.)
|
||||
*/
|
||||
declare function outside(
|
||||
version: string | SemVer,
|
||||
range: string | Range,
|
||||
hilo: ">" | "<",
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): boolean;
|
||||
export = outside;
|
||||
14
node_modules/@types/semver/ranges/simplify.d.ts
generated
vendored
Normal file
14
node_modules/@types/semver/ranges/simplify.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import Range = require("../classes/range");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return a "simplified" range that matches the same items in `versions` list as the range specified.
|
||||
* Note that it does *not* guarantee that it would match the same versions in all cases,
|
||||
* only for the set of versions provided.
|
||||
* This is useful when generating ranges by joining together multiple versions with `||` programmatically,
|
||||
* to provide the user with something a bit more ergonomic.
|
||||
* If the provided range is shorter in string-length than the generated range, then that is returned.
|
||||
*/
|
||||
declare function simplify(ranges: string[], range: string | Range, options?: semver.Options): string | Range;
|
||||
|
||||
export = simplify;
|
||||
9
node_modules/@types/semver/ranges/subset.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/ranges/subset.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import Range = require("../classes/range");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return true if the subRange range is entirely contained by the superRange range.
|
||||
*/
|
||||
declare function subset(sub: string | Range, dom: string | Range, options?: semver.RangeOptions): boolean;
|
||||
|
||||
export = subset;
|
||||
9
node_modules/@types/semver/ranges/to-comparators.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/ranges/to-comparators.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import Range = require("../classes/range");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Mostly just for testing and legacy API reasons
|
||||
*/
|
||||
declare function toComparators(range: string | Range, optionsOrLoose?: boolean | semver.Options): string[][];
|
||||
|
||||
export = toComparators;
|
||||
12
node_modules/@types/semver/ranges/valid.d.ts
generated
vendored
Normal file
12
node_modules/@types/semver/ranges/valid.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import Range = require("../classes/range");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the valid range or null if it's not valid
|
||||
*/
|
||||
declare function validRange(
|
||||
range: string | Range | null | undefined,
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): string | null;
|
||||
|
||||
export = validRange;
|
||||
Reference in New Issue
Block a user