@@ -16,11 +16,15 @@ const null_1 = require("../tree/null");
1616const static_1 = require ( "../tree/static" ) ;
1717const schematic_1 = require ( "./schematic" ) ;
1818class UnknownUrlSourceProtocol extends core_1 . BaseException {
19- constructor ( url ) { super ( `Unknown Protocol on url "${ url } ".` ) ; }
19+ constructor ( url ) {
20+ super ( `Unknown Protocol on url "${ url } ".` ) ;
21+ }
2022}
2123exports . UnknownUrlSourceProtocol = UnknownUrlSourceProtocol ;
2224class UnknownCollectionException extends core_1 . BaseException {
23- constructor ( name ) { super ( `Unknown collection "${ name } ".` ) ; }
25+ constructor ( name ) {
26+ super ( `Unknown collection "${ name } ".` ) ;
27+ }
2428}
2529exports . UnknownCollectionException = UnknownCollectionException ;
2630class CircularCollectionException extends core_1 . BaseException {
@@ -42,7 +46,9 @@ class PrivateSchematicException extends core_1.BaseException {
4246}
4347exports . PrivateSchematicException = PrivateSchematicException ;
4448class SchematicEngineConflictingException extends core_1 . BaseException {
45- constructor ( ) { super ( `A schematic was called from a different engine as its parent.` ) ; }
49+ constructor ( ) {
50+ super ( `A schematic was called from a different engine as its parent.` ) ;
51+ }
4652}
4753exports . SchematicEngineConflictingException = SchematicEngineConflictingException ;
4854class UnregisteredTaskException extends core_1 . BaseException {
@@ -64,8 +70,12 @@ class CollectionImpl {
6470 this . _engine = _engine ;
6571 this . baseDescriptions = baseDescriptions ;
6672 }
67- get description ( ) { return this . _description ; }
68- get name ( ) { return this . description . name || '<unknown>' ; }
73+ get description ( ) {
74+ return this . _description ;
75+ }
76+ get name ( ) {
77+ return this . description . name || '<unknown>' ;
78+ }
6979 createSchematic ( name , allowPrivate = false ) {
7080 return this . _engine . createSchematic ( name , this , allowPrivate ) ;
7181 }
@@ -91,7 +101,7 @@ class TaskScheduler {
91101 if ( ! dependencies ) {
92102 return new Set ( ) ;
93103 }
94- const tasks = dependencies . map ( dep => {
104+ const tasks = dependencies . map ( ( dep ) => {
95105 const task = this . _taskIds . get ( dep ) ;
96106 if ( ! task ) {
97107 throw new UnknownTaskDependencyException ( dep ) ;
@@ -131,8 +141,12 @@ class SchematicEngine {
131141 this . _schematicCache = new WeakMap ( ) ;
132142 this . _taskSchedulers = new Array ( ) ;
133143 }
134- get workflow ( ) { return this . _workflow || null ; }
135- get defaultMergeStrategy ( ) { return this . _host . defaultMergeStrategy || interface_1 . MergeStrategy . Default ; }
144+ get workflow ( ) {
145+ return this . _workflow || null ;
146+ }
147+ get defaultMergeStrategy ( ) {
148+ return this . _host . defaultMergeStrategy || interface_1 . MergeStrategy . Default ;
149+ }
136150 createCollection ( name , requester ) {
137151 let collection = this . _collectionCache . get ( name ) ;
138152 if ( collection ) {
@@ -175,13 +189,12 @@ class SchematicEngine {
175189 interactive = parent . interactive ;
176190 }
177191 let context = {
178- debug : parent && parent . debug || false ,
192+ debug : ( parent && parent . debug ) || false ,
179193 engine : this ,
180- logger : ( parent && parent . logger && parent . logger . createChild ( schematic . description . name ) )
181- || new core_1 . logging . NullLogger ( ) ,
194+ logger : ( parent && parent . logger && parent . logger . createChild ( schematic . description . name ) ) ||
195+ new core_1 . logging . NullLogger ( ) ,
182196 schematic,
183- strategy : ( parent && parent . strategy !== undefined )
184- ? parent . strategy : this . defaultMergeStrategy ,
197+ strategy : parent && parent . strategy !== undefined ? parent . strategy : this . defaultMergeStrategy ,
185198 interactive,
186199 addTask,
187200 } ;
@@ -251,8 +264,10 @@ class SchematicEngine {
251264 }
252265 createSourceFromUrl ( url , context ) {
253266 switch ( url . protocol ) {
254- case 'null:' : return ( ) => new null_1 . NullTree ( ) ;
255- case 'empty:' : return ( ) => static_1 . empty ( ) ;
267+ case 'null:' :
268+ return ( ) => new null_1 . NullTree ( ) ;
269+ case 'empty:' :
270+ return ( ) => static_1 . empty ( ) ;
256271 default :
257272 const hostSource = this . _host . createSourceFromUrl ( url , context ) ;
258273 if ( ! hostSource ) {
@@ -263,15 +278,13 @@ class SchematicEngine {
263278 }
264279 executePostTasks ( ) {
265280 const executors = new Map ( ) ;
266- const taskObservable = rxjs_1 . from ( this . _taskSchedulers )
267- . pipe ( operators_1 . concatMap ( scheduler => scheduler . finalize ( ) ) , operators_1 . concatMap ( task => {
281+ const taskObservable = rxjs_1 . from ( this . _taskSchedulers ) . pipe ( operators_1 . concatMap ( ( scheduler ) => scheduler . finalize ( ) ) , operators_1 . concatMap ( ( task ) => {
268282 const { name, options } = task . configuration ;
269283 const executor = executors . get ( name ) ;
270284 if ( executor ) {
271285 return executor ( options , task . context ) ;
272286 }
273- return this . _host . createTaskExecutor ( name )
274- . pipe ( operators_1 . concatMap ( executor => {
287+ return this . _host . createTaskExecutor ( name ) . pipe ( operators_1 . concatMap ( ( executor ) => {
275288 executors . set ( name , executor ) ;
276289 return executor ( options , task . context ) ;
277290 } ) ) ;
0 commit comments