added ability to revert (#21)

This commit is contained in:
undergroundwires
2020-07-15 19:04:56 +01:00
parent 57028987f1
commit 9c063d59de
58 changed files with 1448 additions and 265 deletions

View File

@@ -13,11 +13,11 @@ export class Application implements IApplication {
public readonly name: string,
public readonly repositoryUrl: string,
public readonly version: string,
public readonly categories: ReadonlyArray<ICategory>) {
public readonly actions: ReadonlyArray<ICategory>) {
if (!name) { throw Error('Application has no name'); }
if (!repositoryUrl) { throw Error('Application has no repository url'); }
if (!version) { throw Error('Version cannot be empty'); }
this.flattened = flatten(categories);
this.flattened = flatten(actions);
if (this.flattened.allCategories.length === 0) {
throw new Error('Application must consist of at least one category');
}