private async printProjection()

in src/commands/image/reingest.ts [76:92]


  private async printProjection(
    projection: any,
    diffAgainstES: boolean,
  ) {
    if (diffAgainstES) {
      const image = await this.fetchImage(projection.id, '_elasticsearch')
      const imageDiff = diff.diffJson(image.data || {}, projection)
      /* eslint-disable indent */
      // eslint tries to align the `.map`s with the `imageDiff`
      imageDiff
        .map(this.changeToConsoleString)
        .map(_ => this.log(_))
      /* eslint-enable indent */
    } else {
      this.log(JSON.stringify(projection, null, 2))
    }
  }