message: refactor(bazel): remove metadata collection from `ngc_wrapped`
  The generated metadata is obsolete now that ViewEngine is no longer
  used, so this commit removes the generation of those file from
  `ngc_wrapped`. This is needed to allow removal of the metadata collector
  in a subsequent commit.
  PR Close
diff: @@ -422,13 +422,6 @@ export function compile({
  // Make sure not to crash but report the diagnostics.
  if (!program) return {program, diagnostics};
  - if (!bazelOpts.nodeModulesPrefix) {
  - // If there is no node modules, then metadata.json should be emitted since
  - // there is no other way to obtain the information
  - generateMetadataJson(
  - program.getTsProgram(), files, compilerOpts.rootDirs, bazelBin, tsHost, ng);
  - }
  -
  if (bazelOpts.tsickleExternsPath) {
  // Note: when tsickleExternsPath is provided, we always write a file as a
  // marker that compilation succeeded, even if it's empty (just containing an
  @@ -445,32 +438,6 @@ export function compile({
  return {program, diagnostics};
  }
  -/**
  - * Generate metadata.json for the specified `files`. By default, metadata.json
  - * is only generated by the compiler if --flatModuleOutFile is specified. But
  - * if compiled under blaze, we want the metadata to be generated for each
  - * Angular component.
  - */
  -function generateMetadataJson(
  - program: ts.Program, files: string[], rootDirs: string[], bazelBin: string,
  - tsHost: ts.CompilerHost, ng: CompilerCliModule) {
  - const collector = new ng.MetadataCollector();
  - for (let i = 0; i < files.length; i++) {
  - const file = files[i];
  - const sourceFile = program.getSourceFile(file);
  - if (sourceFile) {
  - const metadata = collector.getMetadata(sourceFile);
  - if (metadata) {
  - const relative = relativeToRootDirs(file, rootDirs);
  - const shortPath = relative.replace(EXT, '.metadata.json');
  - const outFile = resolveNormalizedPath(bazelBin, shortPath);
  - const data = JSON.stringify(metadata);
  - tsHost.writeFile(outFile, data, false, undefined, []);
  - }
  - }
  - }
  -}
  -
  function isCompilationTarget(bazelOpts: BazelOptions, sf: ts.SourceFile): boolean {
  return !NGC_GEN_FILES.test(sf.fileName) &&
  (bazelOpts.compilationTargetSrc.indexOf(sf.fileName) !== -1);
  