<commit_before>const recipe = require('./recipe.js')
const serialize = require('./serialize.js')
const shortid = require('shortid')
const fs = require('fs')
const path = require('path')
const Promise = require('bluebird')
const vm = require('vm')
const responseXlsx = require('./responseXlsx.js')

const FS = Promise.promisifyAll(fs)
let defaultXlsxTemplate

module.exports = (reporter, definition) => {
  // used by html-to-xlsx recipe
  reporter.xlsx = { responseXlsx: responseXlsx }

  reporter.extensionsManager.recipes.push({
    name: 'xlsx',
    execute: (req, res) => recipe(reporter, req, res)
  })

  if (reporter.compilation) {
    reporter.compilation.resource('defaultXlsxTemplate.json', path.join(__dirname, '../static', 'defaultXlsxTemplate.json'))
    reporter.compilation.resource('helpers.js', path.join(__dirname, '../static', 'helpers.js'))
  }

  reporter.options.tasks.modules.push({
    alias: 'fsproxy.js',
    path: path.join(__dirname, '../lib/fsproxy.js')<commit_msg>remove exposing preview function to html to xlsx<commit_after>const recipe = require('./recipe.js')
const serialize = require('./serialize.js')
const shortid = require('shortid')
const fs = require('fs')
const path = require('path')
const Promise = require('bluebird')
const vm = require('vm')
const responseXlsx = require('./responseXlsx.js')

const FS = Promise.promisifyAll(fs)
let defaultXlsxTemplate

module.exports = (reporter, definition) => {
  reporter.extensionsManager.recipes.push({
    name: 'xlsx',
    execute: (req, res) => recipe(reporter, req, res)
  })

  if (reporter.compilation) {
    reporter.compilation.resource('defaultXlsxTemplate.json', path.join(__dirname, '../static', 'defaultXlsxTemplate.json'))
    reporter.compilation.resource('helpers.js', path.join(__dirname, '../static', 'helpers.js'))
  }

  reporter.options.tasks.modules.push({
    alias: 'fsproxy.js',
    path: path.join(__dirname, '../lib/fsproxy.js')
{'fraction_non_alphanumeric': 0.16443298969072165, 'fraction_numerical': 0.0, 'mean_word_length': 4.828828828828829, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3981226', 'n_tokens_mistral': 614, 'n_tokens_neox': 618, 'n_words': 127}