forked from angular/angular-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterface.ts
36 lines (31 loc) · 1.09 KB
/
interface.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { logging } from '@angular-devkit/core';
import { Observable } from 'rxjs';
export interface RequiredWorkflowExecutionContext {
collection: string;
schematic: string;
options: object;
}
export interface WorkflowExecutionContext extends RequiredWorkflowExecutionContext {
debug: boolean;
logger: logging.Logger;
parentContext?: Readonly<WorkflowExecutionContext>;
allowPrivate?: boolean;
}
export interface LifeCycleEvent {
kind: 'start' | 'end' // Start and end of the full workflow execution.
| 'workflow-start' | 'workflow-end' // Start and end of a workflow execution. Can be more.
| 'post-tasks-start' | 'post-tasks-end'; // Start and end of the post tasks execution.
}
export interface Workflow {
readonly context: Readonly<WorkflowExecutionContext>;
execute(
options: Partial<WorkflowExecutionContext> & RequiredWorkflowExecutionContext,
): Observable<void>;
}