Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kmdr-ast

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kmdr-ast - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

dist/highlight.d.ts

2

dist/ast.d.ts

@@ -179,3 +179,3 @@ /**

static serialize(str: string): NodeAST;
static flatten(node: NodeAST): Array<ProgramNode | OptionNode | OperatorNode | ArgumentNode | AssignmentNode | OptionWithArgNode | PipeNode | RedirectNode | ReservedWordNode | SubcommandNode>;
static flatten(node: NodeAST): Array<ArgumentNode | AssignmentNode | OperatorNode | OptionNode | OptionWithArgNode | PipeNode | ProgramNode | RedirectNode | ReservedWordNode | SubcommandNode>;
private static flattenCommandNode;

@@ -182,0 +182,0 @@ private static flattenListNode;

@@ -517,3 +517,4 @@ "use strict";

AST.isOperand(part) ||
AST.isOptionWithArg(part)) {
AST.isOptionWithArg(part) ||
AST.isWord(part)) {
flat = [...flat, part];

@@ -520,0 +521,0 @@ }

@@ -1,5 +0,6 @@

import { AssignmentNode, ArgumentNode, CommandLeafNodes, CommandNode, CompoundNode, FlatAST, ListLeafNodes, ListNode, NodeAST, OperandNode, OperatorNode, OptionNode, OptionWithArgNode, PipeNode, PipelineNode, ProgramNode, RedirectNode, ReservedWordNode, StickyOptionNode, SubcommandNode, SudoNode, WordNode } from "./interfaces";
import AST from "./ast";
export { AssignmentNode, ArgumentNode, CommandLeafNodes, CommandNode, CompoundNode, FlatAST, ListLeafNodes, ListNode, NodeAST, OperandNode, OperatorNode, OptionNode, OptionWithArgNode, PipeNode, PipelineNode, ProgramNode, RedirectNode, ReservedWordNode, StickyOptionNode, SubcommandNode, SudoNode, WordNode };
import Highlight from "./highlight";
import { ArgumentNode, AssignmentNode, CommandLeafNodes, CommandNode, CompoundNode, FlatAST, ListLeafNodes, ListNode, NodeAST, OperandNode, OperatorNode, OptionNode, OptionWithArgNode, PipelineNode, PipeNode, ProgramNode, RedirectNode, ReservedWordNode, StickyOptionNode, SubcommandNode, SudoNode, WordNode } from "./interfaces";
export { AssignmentNode, ArgumentNode, CommandLeafNodes, CommandNode, CompoundNode, FlatAST, Highlight, ListLeafNodes, ListNode, NodeAST, OperandNode, OperatorNode, OptionNode, OptionWithArgNode, PipeNode, PipelineNode, ProgramNode, RedirectNode, ReservedWordNode, StickyOptionNode, SubcommandNode, SudoNode, WordNode };
export default AST;
//# sourceMappingURL=index.d.ts.map

@@ -7,3 +7,5 @@ "use strict";

const ast_1 = __importDefault(require("./ast"));
const highlight_1 = __importDefault(require("./highlight"));
exports.Highlight = highlight_1.default;
exports.default = ast_1.default;
//# sourceMappingURL=index.js.map

@@ -68,3 +68,3 @@ import { ProgramSchema, OptionSchema } from "kmdr-parser/src/interfaces";

output: number | WordNode;
output_fd: number;
output_fd?: number;
type: string;

@@ -106,3 +106,3 @@ }

optionSchema: OptionSchema;
optPos: number[];
optPos?: number[];
startsWithDash?: number;

@@ -151,2 +151,13 @@ }

}
export declare type DecorationFunction = (...args: any[]) => any;
export interface Decorators {
[kind: string]: DecorationFunction;
}
export interface IHighlight {
query(query: string, ast: NodeAST): any[];
token(token: OptionNode | ProgramNode | OptionWithArgNode | ArgumentNode | OperatorNode | AssignmentNode | PipeNode | SudoNode | ReservedWordNode | RedirectNode | WordNode | OperandNode): any;
}
export interface Decorator {
decorate(token: OptionNode | ProgramNode | OptionWithArgNode | ArgumentNode | OperatorNode | AssignmentNode | PipeNode | SudoNode | ReservedWordNode | RedirectNode | WordNode | OperandNode): any;
}
//# sourceMappingURL=interfaces.d.ts.map
{
"name": "kmdr-ast",
"version": "1.1.1",
"version": "1.1.2",
"description": "Traverse the AST of an explanation by kmdr",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -63,3 +63,3 @@ {

},
"exclude": ["node_modules", "dist", "coverage"]
"exclude": ["node_modules", "dist", "coverage", "tests"]
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc