5
5
* Use of this source code is governed by an MIT-style license that can be
6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
- import { experimental , json , logging } from '@angular-devkit/core' ;
8
+ import { analytics , experimental , json , logging } from '@angular-devkit/core' ;
9
9
import { EMPTY , Subscription } from 'rxjs' ;
10
10
import { catchError , first , ignoreElements , map , share , shareReplay , tap } from 'rxjs/operators' ;
11
- import { Analytics , AnalyticsReport , AnalyticsReporter } from '../../core/src/analytics' ;
12
11
import {
13
12
BuilderInfo ,
14
13
BuilderInput ,
@@ -32,7 +31,7 @@ export async function scheduleByName(
32
31
logger : logging . LoggerApi ,
33
32
workspaceRoot : string | Promise < string > ,
34
33
currentDirectory : string | Promise < string > ,
35
- analytics ?: Analytics ,
34
+ analytics ?: analytics . Analytics ,
36
35
} ,
37
36
) : Promise < BuilderRun > {
38
37
const childLoggerName = options . target ? `{${ targetStringFromTarget ( options . target ) } }` : name ;
@@ -92,8 +91,8 @@ export async function scheduleByName(
92
91
93
92
// If there's an analytics object, take the job channel and report it to the analytics.
94
93
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' )
97
96
. subscribe ( report => reporter . report ( report ) ) ;
98
97
}
99
98
// Start the builder.
@@ -129,7 +128,7 @@ export async function scheduleByTarget(
129
128
logger : logging . LoggerApi ,
130
129
workspaceRoot : string | Promise < string > ,
131
130
currentDirectory : string | Promise < string > ,
132
- analytics ?: Analytics ,
131
+ analytics ?: analytics . Analytics ,
133
132
} ,
134
133
) : Promise < BuilderRun > {
135
134
return scheduleByName ( `{${ targetStringFromTarget ( target ) } }` , overrides , {
0 commit comments