@@ -265,48 +265,12 @@ export abstract class SchematicCommand<
265
265
analytics : this . analytics ,
266
266
} ;
267
267
} else {
268
- return {
269
- ...context ,
270
- analytics : new analytics . NoopAnalytics ( ) ,
271
- } ;
268
+ return context ;
272
269
}
273
270
} ) ;
274
271
275
272
workflow . engineHost . registerOptionsTransform ( validateOptionsWithSchema ( workflow . registry ) ) ;
276
273
277
- // This needs to be the last transform as it reports the flags to analytics (if enabled).
278
- workflow . engineHost . registerOptionsTransform ( async (
279
- schematic ,
280
- options : { [ prop : string ] : number | string } ,
281
- context ,
282
- ) : Promise < { [ prop : string ] : number | string } > => {
283
- const analytics = context && context . analytics ;
284
- if ( ! schematic . schemaJson || ! context || ! analytics ) {
285
- return options ;
286
- }
287
-
288
- const collectionName = context . schematic . collection . description . name ;
289
- const schematicName = context . schematic . description . name ;
290
-
291
- if ( ! isPackageNameSafeForAnalytics ( collectionName ) ) {
292
- return options ;
293
- }
294
-
295
- const args = await parseJsonSchemaToOptions ( this . _workflow . registry , schematic . schemaJson ) ;
296
- const dimensions : ( boolean | number | string ) [ ] = [ ] ;
297
- for ( const option of args ) {
298
- const ua = option . userAnalytics ;
299
-
300
- if ( option . name in options && ua ) {
301
- dimensions [ ua ] = options [ option . name ] ;
302
- }
303
- }
304
-
305
- analytics . event ( 'schematics' , collectionName + ':' + schematicName , { dimensions } ) ;
306
-
307
- return options ;
308
- } ) ;
309
-
310
274
if ( options . defaults ) {
311
275
workflow . registry . addPreTransform ( schema . transforms . addUndefinedDefaults ) ;
312
276
} else {
0 commit comments