<commit_before>import {fsPromise, translateError} from "../utils/misc"
import Gauge from "gauge"
import debugc from "debug"
import path from "path"

const debug = debugc("fil:staticRenderer")

export class StaticRenderer {
  constructor({project, outputHeaders}) {
    this._project = project
    this._outputHeaders = outputHeaders
    this._gauge = new Gauge()
  }

  async render() {
    debug(`Clearing output directory: ${this._project.outPath()}`)
    await fsPromise.emptyDir(this._project.outPath())

    const urlListPerHandler = await this._project.handledUrlsPerHandler()
    const totalCount = Object.keys(urlListPerHandler)
      .reduce((acc, handlerId) => acc + urlListPerHandler[handlerId].length, 0)
<commit_msg>Remove clearing output folder functionality. It is not fil's responsibility to do this.<commit_after>import {fsPromise, translateError} from "../utils/misc"
import Gauge from "gauge"
import path from "path"

export class StaticRenderer {
  constructor({project, outputHeaders}) {
    this._project = project
    this._outputHeaders = outputHeaders
    this._gauge = new Gauge()
  }

  async render() {
    const urlListPerHandler = await this._project.handledUrlsPerHandler()
    const totalCount = Object.keys(urlListPerHandler)
      .reduce((acc, handlerId) => acc + urlListPerHandler[handlerId].length, 0)

{'fraction_non_alphanumeric': 0.1075429424943988, 'fraction_numerical': 0.0014936519790888724, 'mean_word_length': 4.677966101694915, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2188009', 'n_tokens_mistral': 386, 'n_tokens_neox': 371, 'n_words': 103}