@atomist/rug
Advanced tools
Comparing version 0.15.0 to 0.15.1
{ | ||
"name": "@atomist/rug", | ||
"version": "0.15.0", | ||
"version": "0.15.1", | ||
"description": "TypeScript model for Atomist editors, generators etc", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -15,18 +15,50 @@ # Rug TypeScript Typings | ||
the right will be of most interest. Here are some direct links to | ||
some of the more commonly used interfaces: | ||
some of the more commonly used Rug extension interfaces: | ||
- [CSharpFile](interfaces/csharpfile.html) - C# files | ||
- [File](interfaces/file.html) - text files | ||
- [JavaProject](interfaces/javaproject.html) - Java projects | ||
- [JavaSource](interfaces/javasource.html) - Java source files | ||
- [JavaType](interfaces/javatype.html) - Java classes | ||
- [Line](interfaces/line.html) - manipulate specific lines in a project's files | ||
- [Pom](interfaces/pom.html) - projects containing Maven POM files | ||
- [Project](interfaces/project.html) - execute operations across a project | ||
- [Properties](interfaces/properties.html) - Java properties files | ||
- [PythonFile](interfaces/pythonfile.html) - Python source files | ||
- [PythonRequirementsTxt](interfaces/pythonrequirementstxt.html) - Python `requirements.txt` files | ||
- [ScalaFile](interfaces/scalafile.html) - Scala files | ||
- [SpringBootProject](interfaces/springbootproject.html) - Spring Boot projects | ||
- [Xml](interfaces/xml.html) - XML files | ||
- [YamlFile](interfaces/yamlfile.html) - YAML files | ||
- [CSharpFile][] - C# files | ||
- [File][] - text files | ||
- [JavaProject][] - Java projects | ||
- [JavaSource][] - Java source files | ||
- [JavaType][] - Java classes | ||
- [Line][] - manipulate specific lines in a project's files | ||
- [Pom][] - projects containing Maven POM files | ||
- [Project][] - execute operations across a project | ||
- [Properties][] - Java properties files | ||
- [PythonFile][] - Python source files | ||
- [PythonRequirementsTxt][] - Python `requirements.txt` files | ||
- [ScalaFile][] - Scala files | ||
- [SpringBootProject][] - Spring Boot projects | ||
- [Xml][] - XML files | ||
- [YamlFile][] - YAML files | ||
[CSharpFile]: http://apidocs.atomist.com/typedoc/interfaces/csharpfile.html | ||
[File]: http://apidocs.atomist.com/typedoc/interfaces/file.html | ||
[JavaProject]: http://apidocs.atomist.com/typedoc/interfaces/javaproject.html | ||
[JavaSource]: http://apidocs.atomist.com/typedoc/interfaces/javasource.html | ||
[JavaType]: http://apidocs.atomist.com/typedoc/interfaces/javatype.html | ||
[Line]: http://apidocs.atomist.com/typedoc/interfaces/line.html | ||
[Pom]: http://apidocs.atomist.com/typedoc/interfaces/pom.html | ||
[Project]: http://apidocs.atomist.com/typedoc/interfaces/project.html | ||
[Properties]: http://apidocs.atomist.com/typedoc/interfaces/properties.html | ||
[PythonFile]: http://apidocs.atomist.com/typedoc/interfaces/pythonfile.html | ||
[PythonRequirementsTxt]: http://apidocs.atomist.com/typedoc/interfaces/pythonrequirementstxt.html | ||
[ScalaFile]: http://apidocs.atomist.com/typedoc/interfaces/scalafile.html | ||
[SpringBootProject]: http://apidocs.atomist.com/typedoc/interfaces/springbootproject.html | ||
[Xml]: http://apidocs.atomist.com/typedoc/interfaces/xml.html | ||
[YamlFile]: http://apidocs.atomist.com/typedoc/interfaces/yamlfile.html | ||
The following links contain information on testing classes, | ||
interfaces, and functions: | ||
- [CommandHandlerScenarioWorld][] - "world" in which command handler tests run | ||
- [EventHandlerScenarioWorld][] - "world" in which event handler tests run | ||
- [ProjectScenarioWorld][] - "world" in which editor and generator tests run | ||
- [Steps][] - [Gherkin][] steps | ||
- [Helper Functions][helpers] - debugging helper functions | ||
[CommandHandlerScenarioWorld]: http://apidocs.atomist.com/typedoc/interfaces/commandhandlerscenarioworld.html | ||
[EventHandlerScenarioWorld]: http://apidocs.atomist.com/typedoc/interfaces/eventhandlerscenarioworld.html | ||
[ProjectScenarioWorld]: http://apidocs.atomist.com/typedoc/interfaces/projectscenarioworld.html | ||
[Steps]: http://apidocs.atomist.com/typedoc/interfaces/definitions.html | ||
[Gherkin]: https://github.com/cucumber/cucumber/wiki/Given-When-Then | ||
[helpers]: http://apidocs.atomist.com/typedoc/globals.html#dump |
@@ -26,3 +26,3 @@ import { Project } from "../../model/Core" | ||
*/ | ||
editWith(ed: ProjectEditor, params?: {}) | ||
editWith(ed: ProjectEditor, params: {}) | ||
@@ -32,3 +32,3 @@ /** | ||
*/ | ||
generateWith(gen: ProjectGenerator, projectName: string, params?: {}) | ||
generateWith(gen: ProjectGenerator, projectName: string, params: {}) | ||
@@ -35,0 +35,0 @@ /** |
@@ -83,2 +83,6 @@ /** | ||
interface AddressedGraphNode extends GraphNode, Addressed { | ||
} | ||
/** | ||
@@ -190,2 +194,3 @@ * Extended by TreeNodes that understand their place in hierarchy. | ||
export {Addressed} | ||
export {AddressedGraphNode} | ||
export {TreeNode} | ||
@@ -192,0 +197,0 @@ export {ParentAwareTreeNode} |
@@ -62,28 +62,1 @@ /** | ||
exports.findAncestorWithTag = findAncestorWithTag; | ||
/** | ||
* Convenient mutable superclass for node implementations that | ||
* should be address aware | ||
*/ | ||
var AddressedNodeSupport = (function () { | ||
function AddressedNodeSupport() { | ||
this._navigatedFrom = null; | ||
} | ||
AddressedNodeSupport.prototype.address = function () { | ||
return this._navigatedFrom ? | ||
this._navigatedFrom.address() + this.step : | ||
""; | ||
}; | ||
/** | ||
* We got to here from the given node, via the given step. | ||
* Still works even if the address of the node changes, | ||
* as it may during building in test | ||
*/ | ||
AddressedNodeSupport.prototype.navigatedFrom = function (navigatedFrom, step) { | ||
if (navigatedFrom == this) | ||
throw new Error("Illegal cycle at " + this); | ||
this._navigatedFrom = navigatedFrom; | ||
this.step = step; | ||
}; | ||
return AddressedNodeSupport; | ||
}()); | ||
exports.AddressedNodeSupport = AddressedNodeSupport; |
@@ -6,3 +6,3 @@ /** | ||
import {Addressed,TreeNode,TextTreeNode,ParentAwareTreeNode} from "./PathExpression" | ||
import {TreeNode,TextTreeNode,ParentAwareTreeNode} from "./PathExpression" | ||
@@ -68,31 +68,1 @@ export function hasTag(n: TreeNode, t: string): boolean { | ||
} | ||
/** | ||
* Convenient mutable superclass for node implementations that | ||
* should be address aware | ||
*/ | ||
export abstract class AddressedNodeSupport implements Addressed { | ||
private _navigatedFrom: Addressed = null | ||
private step: string | ||
address() { | ||
return this._navigatedFrom ? | ||
this._navigatedFrom.address() + this.step : | ||
"" | ||
} | ||
/** | ||
* We got to here from the given node, via the given step. | ||
* Still works even if the address of the node changes, | ||
* as it may during building in test | ||
*/ | ||
navigatedFrom(navigatedFrom: Addressed, step: string) { | ||
if (navigatedFrom == this) | ||
throw new Error(`Illegal cycle at ${this}`) | ||
this._navigatedFrom = navigatedFrom | ||
this.step = step | ||
} | ||
} |
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
Sorry, the diff of this file is not supported yet
3410983
227
7480
64