@atomist/rug
Advanced tools
Comparing version 0.6.0 to 0.7.0
@@ -20,2 +20,3 @@ | ||
import {TreeNode} from '../tree/PathExpression' | ||
import {ProjectContext} from '../operations/ProjectEditor' | ||
@@ -81,6 +82,3 @@ | ||
//msg: string | ||
fail(msg: string): void | ||
filename(): string | ||
@@ -109,5 +107,2 @@ | ||
//msg: string | ||
println(msg: string): void | ||
//root: string | ||
@@ -139,6 +134,3 @@ underPath(root: string): boolean | ||
//msg: string | ||
fail(msg: string): void | ||
filename(): string | ||
@@ -170,5 +162,2 @@ | ||
//msg: string | ||
println(msg: string): void | ||
//name: string | ||
@@ -215,6 +204,3 @@ removeFunction(name: string): void | ||
//msg: string | ||
fail(msg: string): void | ||
filename(): string | ||
@@ -261,5 +247,2 @@ | ||
//msg: string | ||
println(msg: string): void | ||
//regexp: string | ||
@@ -303,5 +286,2 @@ //replaceWith: string | ||
//msg: string | ||
fail(msg: string): void | ||
//annotation: string | ||
@@ -334,5 +314,2 @@ hasAnnotation(annotation: string): boolean | ||
//msg: string | ||
println(msg: string): void | ||
//newName: string | ||
@@ -370,6 +347,5 @@ rename(newName: string): void | ||
//sourcePath: string | ||
//destinationPath: string | ||
copyEditorBackingFileOrFail(sourcePath: string, destinationPath: string): void | ||
context(): ProjectContext | ||
//sourcePath: string | ||
@@ -380,2 +356,6 @@ copyEditorBackingFileOrFail(sourcePath: string): void | ||
//destinationPath: string | ||
copyEditorBackingFileOrFail(sourcePath: string, destinationPath: string): void | ||
//sourcePath: string | ||
//destinationPath: string | ||
copyEditorBackingFilesOrFail(sourcePath: string, destinationPath: string): void | ||
@@ -417,5 +397,2 @@ | ||
//msg: string | ||
fail(msg: string): void | ||
//path: string | ||
@@ -475,6 +452,3 @@ //content: string | ||
//msg: string | ||
println(msg: string): void | ||
projects(): Project[] | ||
@@ -512,6 +486,3 @@ | ||
//msg: string | ||
fail(msg: string): void | ||
filename(): string | ||
@@ -543,6 +514,3 @@ | ||
//msg: string | ||
println(msg: string): void | ||
typeCount(): number | ||
@@ -567,6 +535,3 @@ | ||
//msg: string | ||
fail(msg: string): void | ||
filename(): string | ||
@@ -592,5 +557,2 @@ | ||
//msg: string | ||
println(msg: string): void | ||
//root: string | ||
@@ -613,6 +575,3 @@ underPath(root: string): boolean | ||
//msg: string | ||
fail(msg: string): void | ||
num(): number | ||
@@ -623,5 +582,2 @@ | ||
//msg: string | ||
println(msg: string): void | ||
//s2: string | ||
@@ -638,4 +594,4 @@ update(s2: string): void | ||
//newValue: string | ||
update(newValue: string): void | ||
//arg0: string | ||
update(arg0: string): void | ||
@@ -670,6 +626,3 @@ | ||
//msg: string | ||
fail(msg: string): void | ||
filename(): string | ||
@@ -716,5 +669,2 @@ | ||
//msg: string | ||
println(msg: string): void | ||
//regexp: string | ||
@@ -763,6 +713,3 @@ //replaceWith: string | ||
//msg: string | ||
fail(msg: string): void | ||
filename(): string | ||
@@ -809,5 +756,2 @@ | ||
//msg: string | ||
println(msg: string): void | ||
//regexp: string | ||
@@ -841,5 +785,5 @@ //replaceWith: string | ||
//k: string | ||
//v: string | ||
addKeyValue(k: string, v: string): void | ||
//arg0: string | ||
//arg1: string | ||
addKeyValue(arg0: string, arg1: string): void | ||
@@ -850,13 +794,7 @@ //msg: string | ||
//msg: string | ||
fail(msg: string): void | ||
//msg: string | ||
println(msg: string): void | ||
//msg: string | ||
println(msg: string): void | ||
//arg0: string | ||
setValue(arg0: string): void | ||
//newValue: string | ||
setValue(newValue: string): void | ||
} // interface Pair | ||
@@ -893,6 +831,3 @@ | ||
//msg: string | ||
fail(msg: string): void | ||
filename(): string | ||
@@ -921,5 +856,2 @@ | ||
//msg: string | ||
println(msg: string): void | ||
//xpath: string | ||
@@ -952,7 +884,2 @@ //newContent: string | ||
//artifactId: string | ||
//pluginContent: string | ||
addOrReplaceBuildPlugin(groupId: string, artifactId: string, pluginContent: string): void | ||
//groupId: string | ||
//artifactId: string | ||
addOrReplaceDependency(groupId: string, artifactId: string): void | ||
@@ -962,6 +889,2 @@ | ||
//artifactId: string | ||
addOrReplaceDependency(groupId: string, artifactId: string): void | ||
//groupId: string | ||
//artifactId: string | ||
//dependencyContent: string | ||
@@ -972,7 +895,2 @@ addOrReplaceDependencyManagementDependency(groupId: string, artifactId: string, dependencyContent: string): void | ||
//artifactId: string | ||
//dependencyContent: string | ||
addOrReplaceDependencyManagementDependency(groupId: string, artifactId: string, dependencyContent: string): void | ||
//groupId: string | ||
//artifactId: string | ||
//newVersion: string | ||
@@ -984,7 +902,2 @@ addOrReplaceDependencyOfVersion(groupId: string, artifactId: string, newVersion: string): void | ||
//newVersion: string | ||
addOrReplaceDependencyOfVersion(groupId: string, artifactId: string, newVersion: string): void | ||
//groupId: string | ||
//artifactId: string | ||
//newVersion: string | ||
addOrReplaceDependencyScope(groupId: string, artifactId: string, newVersion: string): void | ||
@@ -995,14 +908,4 @@ | ||
//newVersion: string | ||
addOrReplaceDependencyScope(groupId: string, artifactId: string, newVersion: string): void | ||
//groupId: string | ||
//artifactId: string | ||
//newVersion: string | ||
addOrReplaceDependencyVersion(groupId: string, artifactId: string, newVersion: string): void | ||
//groupId: string | ||
//artifactId: string | ||
//newVersion: string | ||
addOrReplaceDependencyVersion(groupId: string, artifactId: string, newVersion: string): void | ||
//parentNodeXPath: string | ||
@@ -1018,12 +921,5 @@ //xPathOfNodeToReplace: string | ||
//propertyName: string | ||
//propertyValue: string | ||
addOrReplaceProperty(propertyName: string, propertyValue: string): void | ||
artifactId(): string | ||
artifactId(): string | ||
//xpath: string | ||
@@ -1044,25 +940,11 @@ contains(xpath: string): boolean | ||
//artifactId: string | ||
dependencyScope(groupId: string, artifactId: string): string | ||
//groupId: string | ||
//artifactId: string | ||
dependencyVersion(groupId: string, artifactId: string): string | ||
//groupId: string | ||
//artifactId: string | ||
dependencyVersion(groupId: string, artifactId: string): string | ||
description(): string | ||
description(): string | ||
//msg: string | ||
fail(msg: string): void | ||
//msg: string | ||
fail(msg: string): void | ||
filename(): string | ||
@@ -1076,5 +958,2 @@ | ||
groupId(): string | ||
//groupId: string | ||
@@ -1086,6 +965,2 @@ //artifactId: string | ||
//artifactId: string | ||
isBuildPluginPresent(groupId: string, artifactId: string): boolean | ||
//groupId: string | ||
//artifactId: string | ||
isDependencyManagementDependencyPresent(groupId: string, artifactId: string): boolean | ||
@@ -1095,13 +970,5 @@ | ||
//artifactId: string | ||
isDependencyManagementDependencyPresent(groupId: string, artifactId: string): boolean | ||
//groupId: string | ||
//artifactId: string | ||
isDependencyPresent(groupId: string, artifactId: string): boolean | ||
//groupId: string | ||
//artifactId: string | ||
isDependencyPresent(groupId: string, artifactId: string): boolean | ||
isWellFormed(): boolean | ||
@@ -1119,29 +986,14 @@ | ||
name(): string | ||
packaging(): string | ||
packaging(): string | ||
parentArtifactId(): string | ||
parentArtifactId(): string | ||
parentGroupId(): string | ||
parentGroupId(): string | ||
parentVersion(): string | ||
parentVersion(): string | ||
path(): string | ||
@@ -1155,11 +1007,5 @@ | ||
//msg: string | ||
println(msg: string): void | ||
//projectPropertyName: string | ||
property(projectPropertyName: string): string | ||
//projectPropertyName: string | ||
property(projectPropertyName: string): string | ||
//groupId: string | ||
@@ -1171,6 +1017,2 @@ //artifactId: string | ||
//artifactId: string | ||
removeDependency(groupId: string, artifactId: string): void | ||
//groupId: string | ||
//artifactId: string | ||
removeDependencyScope(groupId: string, artifactId: string): void | ||
@@ -1180,72 +1022,34 @@ | ||
//artifactId: string | ||
removeDependencyScope(groupId: string, artifactId: string): void | ||
//groupId: string | ||
//artifactId: string | ||
removeDependencyVersion(groupId: string, artifactId: string): void | ||
//groupId: string | ||
//artifactId: string | ||
removeDependencyVersion(groupId: string, artifactId: string): void | ||
//propertyName: string | ||
removeProperty(propertyName: string): void | ||
//propertyName: string | ||
removeProperty(propertyName: string): void | ||
//newParentBlock: string | ||
replaceParent(newParentBlock: string): void | ||
//newParentBlock: string | ||
replaceParent(newParentBlock: string): void | ||
//newArtifactId: string | ||
setArtifactId(newArtifactId: string): void | ||
//newArtifactId: string | ||
setArtifactId(newArtifactId: string): void | ||
//newDescription: string | ||
setDescription(newDescription: string): void | ||
//newDescription: string | ||
setDescription(newDescription: string): void | ||
//newGroupId: string | ||
setGroupId(newGroupId: string): void | ||
//newGroupId: string | ||
setGroupId(newGroupId: string): void | ||
//newPackaging: string | ||
setPackaging(newPackaging: string): void | ||
//newPackaging: string | ||
setPackaging(newPackaging: string): void | ||
//newParentArtifactId: string | ||
setParentArtifactId(newParentArtifactId: string): void | ||
//newParentArtifactId: string | ||
setParentArtifactId(newParentArtifactId: string): void | ||
//newParentGroupId: string | ||
setParentGroupId(newParentGroupId: string): void | ||
//newParentGroupId: string | ||
setParentGroupId(newParentGroupId: string): void | ||
//newParentVersion: string | ||
setParentVersion(newParentVersion: string): void | ||
//newParentVersion: string | ||
setParentVersion(newParentVersion: string): void | ||
//newName: string | ||
setProjectName(newName: string): void | ||
//newName: string | ||
setProjectName(newName: string): void | ||
//xpath: string | ||
@@ -1258,5 +1062,2 @@ //newContent: string | ||
//newVersion: string | ||
setVersion(newVersion: string): void | ||
//root: string | ||
@@ -1268,5 +1069,2 @@ underPath(root: string): boolean | ||
version(): string | ||
} // interface Pom | ||
@@ -1298,6 +1096,5 @@ | ||
//sourcePath: string | ||
//destinationPath: string | ||
copyEditorBackingFileOrFail(sourcePath: string, destinationPath: string): void | ||
context(): ProjectContext | ||
//sourcePath: string | ||
@@ -1308,2 +1105,6 @@ copyEditorBackingFileOrFail(sourcePath: string): void | ||
//destinationPath: string | ||
copyEditorBackingFileOrFail(sourcePath: string, destinationPath: string): void | ||
//sourcePath: string | ||
//destinationPath: string | ||
copyEditorBackingFilesOrFail(sourcePath: string, destinationPath: string): void | ||
@@ -1345,5 +1146,2 @@ | ||
//msg: string | ||
fail(msg: string): void | ||
//path: string | ||
@@ -1388,6 +1186,3 @@ //content: string | ||
//msg: string | ||
println(msg: string): void | ||
projects(): Project[] | ||
@@ -1427,6 +1222,3 @@ | ||
//msg: string | ||
fail(msg: string): void | ||
filename(): string | ||
@@ -1458,5 +1250,2 @@ | ||
//msg: string | ||
println(msg: string): void | ||
//key: string | ||
@@ -1477,4 +1266,4 @@ //value: string | ||
//toAppend: string | ||
append(toAppend: string): void | ||
//arg0: string | ||
append(arg0: string): void | ||
@@ -1485,10 +1274,4 @@ //msg: string | ||
//msg: string | ||
fail(msg: string): void | ||
//msg: string | ||
println(msg: string): void | ||
//msg: string | ||
println(msg: string): void | ||
//key: string | ||
@@ -1509,4 +1292,4 @@ //value: string | ||
//toAppend: string | ||
append(toAppend: string): void | ||
//arg0: string | ||
append(arg0: string): void | ||
@@ -1517,10 +1300,4 @@ //msg: string | ||
//msg: string | ||
fail(msg: string): void | ||
//msg: string | ||
println(msg: string): void | ||
//msg: string | ||
println(msg: string): void | ||
//key: string | ||
@@ -1541,4 +1318,4 @@ //value: string | ||
//toAppend: string | ||
append(toAppend: string): void | ||
//arg0: string | ||
append(arg0: string): void | ||
@@ -1549,10 +1326,4 @@ //msg: string | ||
//msg: string | ||
fail(msg: string): void | ||
//msg: string | ||
println(msg: string): void | ||
//msg: string | ||
println(msg: string): void | ||
//key: string | ||
@@ -1587,11 +1358,5 @@ //value: string | ||
//msg: string | ||
fail(msg: string): void | ||
//msg: string | ||
println(msg: string): void | ||
//msg: string | ||
println(msg: string): void | ||
services(): any[] | ||
@@ -1634,6 +1399,5 @@ | ||
//sourcePath: string | ||
//destinationPath: string | ||
copyEditorBackingFileOrFail(sourcePath: string, destinationPath: string): void | ||
context(): ProjectContext | ||
//sourcePath: string | ||
@@ -1644,2 +1408,6 @@ copyEditorBackingFileOrFail(sourcePath: string): void | ||
//destinationPath: string | ||
copyEditorBackingFileOrFail(sourcePath: string, destinationPath: string): void | ||
//sourcePath: string | ||
//destinationPath: string | ||
copyEditorBackingFilesOrFail(sourcePath: string, destinationPath: string): void | ||
@@ -1681,5 +1449,2 @@ | ||
//msg: string | ||
fail(msg: string): void | ||
//path: string | ||
@@ -1739,6 +1504,3 @@ //content: string | ||
//msg: string | ||
println(msg: string): void | ||
projects(): Project[] | ||
@@ -1776,6 +1538,3 @@ | ||
//msg: string | ||
fail(msg: string): void | ||
filename(): string | ||
@@ -1801,5 +1560,2 @@ | ||
//msg: string | ||
println(msg: string): void | ||
//root: string | ||
@@ -1806,0 +1562,0 @@ underPath(root: string): boolean |
@@ -1,3 +0,2 @@ | ||
import {Parameters} from "./Parameters" | ||
import {Result} from "./Result" | ||
import {Result,RugOperation} from "./RugOperation" | ||
import {Services} from "../model/Core" | ||
@@ -8,9 +7,7 @@ | ||
*/ | ||
export interface Executor<P extends Parameters> { | ||
/** | ||
* Run against the given model | ||
*/ | ||
execute(services: Services, p: P): Result | ||
export interface Executor extends RugOperation{ | ||
/** | ||
* Run against the given model | ||
*/ | ||
execute(services: Services, params: Object): Result | ||
} |
@@ -69,2 +69,4 @@ | ||
withActionNamed(a: String): Message | ||
address(channelId: string): Message | ||
@@ -87,3 +89,3 @@ | ||
parameters(): Array<ParameterValue> | ||
} | ||
@@ -99,9 +101,9 @@ | ||
callbackType(): string | ||
rug(): Rug | ||
callbackType(): string | ||
rug(): RugArchive | ||
} | ||
export interface Rug { | ||
export interface RugArchive { | ||
group: string | ||
@@ -108,0 +110,0 @@ artifact: string |
"use strict"; | ||
/** | ||
* Convenience superclass for editors without parameters | ||
*/ | ||
var ParameterlessProjectEditor = (function () { | ||
function ParameterlessProjectEditor() { | ||
} | ||
ParameterlessProjectEditor.prototype.edit = function (project, p) { | ||
return this.editWithoutParameters(project); | ||
}; | ||
return ParameterlessProjectEditor; | ||
}()); | ||
exports.ParameterlessProjectEditor = ParameterlessProjectEditor; |
import {Project} from "../model/Core" | ||
import {Parameters} from "./Parameters" | ||
import {Result} from "./Result" | ||
import {Parameter, Result, RugOperation} from "./RugOperation" | ||
import {PathExpressionEngine} from "../tree/PathExpression" | ||
/** | ||
* Main entry point for project editing | ||
*/ | ||
export interface ProjectEditor<P extends Parameters> { | ||
edit(project: Project, p: P): Result | ||
export interface ProjectContext{ | ||
pathExpressionEngine(): PathExpressionEngine | ||
} | ||
/** | ||
* Convenience superclass for editors without parameters | ||
*/ | ||
export abstract class ParameterlessProjectEditor implements ProjectEditor<Parameters> { | ||
edit(project: Project, p: Parameters) { | ||
return this.editWithoutParameters(project) | ||
} | ||
protected abstract editWithoutParameters(project: Project): Result | ||
export interface ProjectEditor extends RugOperation{ | ||
edit(project: Project, params: Object): Result | ||
} |
"use strict"; | ||
var __extends = (this && this.__extends) || function (d, b) { | ||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var Parameters_1 = require("./Parameters"); | ||
var Metadata_1 = require("../support/Metadata"); | ||
var GeneratorParameters = (function (_super) { | ||
__extends(GeneratorParameters, _super); | ||
function GeneratorParameters() { | ||
return _super.apply(this, arguments) || this; | ||
} | ||
return GeneratorParameters; | ||
}(Parameters_1.ParametersSupport)); | ||
__decorate([ | ||
Metadata_1.parameter({ description: "Name of the new project", | ||
displayName: "Java Package", | ||
pattern: ".*", | ||
maxLength: 21 }), | ||
__metadata("design:type", String) | ||
], GeneratorParameters.prototype, "project_name", void 0); | ||
exports.GeneratorParameters = GeneratorParameters; | ||
/** | ||
@@ -39,5 +8,9 @@ * The commonest case. We want to customize a new project | ||
} | ||
CustomizingProjectGenerator.prototype.populate = function (emptyProject, parameters) { | ||
CustomizingProjectGenerator.prototype.populate = function (emptyProject, projectName) { | ||
var params = []; | ||
for (var _i = 2; _i < arguments.length; _i++) { | ||
params[_i - 2] = arguments[_i]; | ||
} | ||
emptyProject.copyEditorBackingFilesPreservingPath(""); | ||
//this.customize(emptyProject, parameters) | ||
this.customize(emptyProject, projectName, params); | ||
}; | ||
@@ -44,0 +17,0 @@ return CustomizingProjectGenerator; |
import {Project} from "../model/Core" | ||
import {ParametersSupport} from "./Parameters" | ||
import {parameter} from "../support/Metadata" | ||
import {Parameter, RugOperation} from "./RugOperation" | ||
abstract class GeneratorParameters extends ParametersSupport { | ||
// TODO need standard regex for package name etc as in Rug | ||
@parameter({description: "Name of the new project", | ||
displayName: "Java Package", | ||
pattern: ".*", | ||
maxLength: 21}) | ||
project_name: string | ||
} | ||
/** | ||
* Top level interface for all project generators | ||
*/ | ||
interface ProjectGenerator<P extends GeneratorParameters> { | ||
populate(emptyProject: Project, parameters: P) | ||
interface ProjectGenerator extends RugOperation{ | ||
populate(emptyProject: Project, projectName: string, args: Object) | ||
} | ||
@@ -28,16 +15,14 @@ | ||
*/ | ||
abstract class CustomizingProjectGenerator<P extends GeneratorParameters> | ||
implements ProjectGenerator<P> { | ||
populate(emptyProject: Project, parameters: P) { | ||
abstract class CustomizingProjectGenerator implements ProjectGenerator { | ||
abstract name: string | ||
abstract description: string | ||
populate(emptyProject: Project, projectName: string, ...params: string[]) { | ||
emptyProject.copyEditorBackingFilesPreservingPath("") | ||
//this.customize(emptyProject, parameters) | ||
this.customize(emptyProject, projectName, params) | ||
} | ||
abstract customize(project: Project, parameters: P): void | ||
abstract customize(project: Project, projectName: string, params: string[]): void | ||
} | ||
export {GeneratorParameters} | ||
export {ProjectGenerator} | ||
export {CustomizingProjectGenerator} |
@@ -1,3 +0,2 @@ | ||
import {Parameters} from "./Parameters" | ||
import {Result} from "./Result" | ||
import {RugOperation, Result, Parameter} from "./RugOperation" | ||
import {Services} from "../model/Core" | ||
@@ -12,9 +11,7 @@ | ||
*/ | ||
export interface Reviewer<P extends Parameters> { | ||
/** | ||
* Run against the given model | ||
*/ | ||
review(services: Services, rc: ReviewContext, p: P): Result | ||
export interface Reviewer extends RugOperation { | ||
/** | ||
* Run against the given model | ||
*/ | ||
review(services: Services, rc: ReviewContext, ...args: string[]): Result | ||
} |
{ | ||
"name": "@atomist/rug", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "TypeScript model for Atomist editors, generators etc", | ||
@@ -22,3 +22,6 @@ "repository": { | ||
"artifact": "rug" | ||
}, | ||
"dependencies": { | ||
"@types/js-yaml": "^3.5.28" | ||
} | ||
} |
74490
1
20
1267
+ Added@types/js-yaml@^3.5.28
+ Added@types/js-yaml@3.12.10(transitive)