<commit_before>const USER_ID = '1'
const { User } = require('../domain')

/**
 * The initialization service.
 *
 * This initializes the basic data for app.
 */
class InitService {
  /**
   * Initializes the basic data.
   */
  async init () {
    await this.initLanguage()
    t10.scan() // translate
    await this.initUser()
  }

  /**
   * Initializes the language.
   * @return {Promise}
   */
  async initLanguage () {
    const tag = await infrastructure.locale.getLangTag()

    $.ajaxSetup({ cache: true }) // TODO: remove when vinyl-serve is updated

    await $.getScript(`${basepath}/i18n/${tag}.js`)
  }

  /**
   * @return {Promise<User>}
   */
  initUser () {
    return new User.InitService().getOrCreate(USER_ID)
  }
}

module.exports = InitService
<commit_msg>chore: remove old vinyl-serve workaround<commit_after>const USER_ID = '1'
const { User } = require('../domain')

/**
 * The initialization service.
 *
 * This initializes the basic data for app.
 */
class InitService {
  /**
   * Initializes the basic data.
   */
  async init () {
    await this.initLanguage()
    t10.scan() // translate
    await this.initUser()
  }

  /**
   * Initializes the language.
   * @return {Promise}
   */
  async initLanguage () {
    const tag = await infrastructure.locale.getLangTag()

    await $.getScript(`${basepath}/i18n/${tag}.js`)
  }

  /**
   * @return {Promise<User>}
   */
  initUser () {
    return new User.InitService().getOrCreate(USER_ID)
  }
}

module.exports = InitService

{'fraction_non_alphanumeric': 0.15236194278110446, 'fraction_numerical': 0.00665335994677312, 'mean_word_length': 2.797979797979798, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6852264', 'n_tokens_mistral': 493, 'n_tokens_neox': 486, 'n_words': 115}