UNPKG

963 BTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { logging } from '@angular-devkit/core';
9import { Observable } from 'rxjs';
10export interface RequiredWorkflowExecutionContext {
11 collection: string;
12 schematic: string;
13 options: object;
14}
15export interface WorkflowExecutionContext extends RequiredWorkflowExecutionContext {
16 debug: boolean;
17 logger: logging.Logger;
18 parentContext?: Readonly<WorkflowExecutionContext>;
19 allowPrivate?: boolean;
20}
21export interface LifeCycleEvent {
22 kind: 'start' | 'end' | 'workflow-start' | 'workflow-end' | 'post-tasks-start' | 'post-tasks-end';
23}
24export interface Workflow {
25 readonly context: Readonly<WorkflowExecutionContext>;
26 execute(options: Partial<WorkflowExecutionContext> & RequiredWorkflowExecutionContext): Observable<void>;
27}