55 * Use of this source code is governed by an MIT-style license that can be
66 * found in the LICENSE file at https://angular.io/license
77 */
8- import { experimental , json , logging } from '@angular-devkit/core' ;
8+ import { analytics , experimental , json , logging } from '@angular-devkit/core' ;
99import { EMPTY , Subscription } from 'rxjs' ;
1010import { catchError , first , ignoreElements , map , share , shareReplay , tap } from 'rxjs/operators' ;
11- import { Analytics , AnalyticsReport , AnalyticsReporter } from '../../core/src/analytics' ;
1211import {
1312 BuilderInfo ,
1413 BuilderInput ,
@@ -32,7 +31,7 @@ export async function scheduleByName(
3231 logger : logging . LoggerApi ,
3332 workspaceRoot : string | Promise < string > ,
3433 currentDirectory : string | Promise < string > ,
35- analytics ?: Analytics ,
34+ analytics ?: analytics . Analytics ,
3635 } ,
3736) : Promise < BuilderRun > {
3837 const childLoggerName = options . target ? `{${ targetStringFromTarget ( options . target ) } }` : name ;
@@ -92,8 +91,8 @@ export async function scheduleByName(
9291
9392 // If there's an analytics object, take the job channel and report it to the analytics.
9493 if ( options . analytics ) {
95- const reporter = new AnalyticsReporter ( options . analytics ) ;
96- job . getChannel < AnalyticsReport > ( 'analytics' )
94+ const reporter = new analytics . AnalyticsReporter ( options . analytics ) ;
95+ job . getChannel < analytics . AnalyticsReport > ( 'analytics' )
9796 . subscribe ( report => reporter . report ( report ) ) ;
9897 }
9998 // Start the builder.
@@ -129,7 +128,7 @@ export async function scheduleByTarget(
129128 logger : logging . LoggerApi ,
130129 workspaceRoot : string | Promise < string > ,
131130 currentDirectory : string | Promise < string > ,
132- analytics ?: Analytics ,
131+ analytics ?: analytics . Analytics ,
133132 } ,
134133) : Promise < BuilderRun > {
135134 return scheduleByName ( `{${ targetStringFromTarget ( target ) } }` , overrides , {
0 commit comments