diff --git a/packages/angular/cli/models/schematic-command.ts b/packages/angular/cli/models/schematic-command.ts index 50bff6c1dffb..f36257b1812c 100644 --- a/packages/angular/cli/models/schematic-command.ts +++ b/packages/angular/cli/models/schematic-command.ts @@ -86,7 +86,7 @@ export abstract class SchematicCommand extends Command { private _originalOptions: Option[]; private _engineHost: FileSystemEngineHostBase; private _engine: Engine; - private _workFlow: workflow.BaseWorkflow; + private _workflow: workflow.BaseWorkflow; argStrategy = ArgumentStrategy.Nothing; constructor( @@ -166,7 +166,7 @@ export abstract class SchematicCommand extends Command { /* * Runtime hook to allow specifying customized workflow */ - protected getWorkFlow(options: RunSchematicOptions): workflow.BaseWorkflow { + protected getWorkflow(options: RunSchematicOptions): workflow.BaseWorkflow { const {force, dryRun} = options; const fsHost = new virtualFs.ScopedHost( new NodeJsSyncHost(), normalize(this.project.root)); @@ -182,12 +182,12 @@ export abstract class SchematicCommand extends Command { ); } - private _getWorkFlow(options: RunSchematicOptions): workflow.BaseWorkflow { - if (!this._workFlow) { - this._workFlow = this.getWorkFlow(options); + private _getWorkflow(options: RunSchematicOptions): workflow.BaseWorkflow { + if (!this._workflow) { + this._workflow = this.getWorkflow(options); } - return this._workFlow; + return this._workflow; } protected runSchematic(options: RunSchematicOptions) { @@ -196,7 +196,7 @@ export abstract class SchematicCommand extends Command { let nothingDone = true; let loggingQueue: string[] = []; let error = false; - const workflow = this._getWorkFlow(options); + const workflow = this._getWorkflow(options); const workingDir = process.cwd().replace(this.project.root, '').replace(/\\/g, '/'); const pathOptions = this.setPathOptions(schematicOptions, workingDir); diff --git a/packages/angular_devkit/schematics/tools/schema-option-transform.ts b/packages/angular_devkit/schematics/tools/schema-option-transform.ts index 2614cb32b301..1827b1106f62 100644 --- a/packages/angular_devkit/schematics/tools/schema-option-transform.ts +++ b/packages/angular_devkit/schematics/tools/schema-option-transform.ts @@ -8,12 +8,7 @@ import { deepCopy, schema } from '@angular-devkit/core'; import { Observable, of as observableOf } from 'rxjs'; import { first, map, mergeMap } from 'rxjs/operators'; -import { SchematicDescription } from '../src'; -import { FileSystemCollectionDescription, FileSystemSchematicDescription } from './description'; - -export type SchematicDesc = - SchematicDescription; - +import { FileSystemSchematicDescription } from './description'; export class InvalidInputOptions extends schema.SchemaValidationException { constructor(options: T, errors: schema.SchemaValidatorError[]) { @@ -26,7 +21,7 @@ export class InvalidInputOptions extends schema.SchemaValidationExceptio // This can only be used in NodeJS. export function validateOptionsWithSchema(registry: schema.SchemaRegistry) { - return (schematic: SchematicDesc, options: T): Observable => { + return (schematic: FileSystemSchematicDescription, options: T): Observable => { // Prevent a schematic from changing the options object by making a copy of it. options = deepCopy(options);