<commit_before>const path = require('path');
const { success, warn } = require('./helpers/log')('proton-i18n');
const { bash } = require('./helpers/cli');
const { I18N_DEPENDENCY_REPO, I18N_DEPENDENCY_BRANCH } = require('../config').getEnv();

const OUTPUT_CLONE = path.join('node_modules', 'proton-translations');

async function main() {
    if (!I18N_DEPENDENCY_REPO) {
        warn('no I18N_DEPENDENCY_REPO available inside env, we "mock" the directory');
        return bash(`mkdir -p ${OUTPUT_CLONE} || echo`);
    }

    const commands = [
        `rm -rf ${OUTPUT_CLONE} || echo`,
        `git clone ${I18N_DEPENDENCY_REPO} --depth 1 --branch ${I18N_DEPENDENCY_BRANCH} ${OUTPUT_CLONE}`
    ].join(' && ');
    await bash(commands);
    success(`added translations inside ${OUTPUT_CLONE}`);
}

module.exports = main;<commit_msg>Remove .git as it seems npm cannot handle it sometimes<commit_after>const path = require('path');
const { success, warn } = require('./helpers/log')('proton-i18n');
const { bash } = require('./helpers/cli');
const { I18N_DEPENDENCY_REPO, I18N_DEPENDENCY_BRANCH } = require('../config').getEnv();

const OUTPUT_CLONE = path.join('node_modules', 'proton-translations');

async function main() {
    if (!I18N_DEPENDENCY_REPO) {
        warn('no I18N_DEPENDENCY_REPO available inside env, we "mock" the directory');
        return bash(`mkdir -p ${OUTPUT_CLONE} || echo`);
    }

    const commands = [
        `rm -rf ${OUTPUT_CLONE} || echo`,
        `git clone ${I18N_DEPENDENCY_REPO} --depth 1 --branch ${I18N_DEPENDENCY_BRANCH} ${OUTPUT_CLONE}`,
        `rm -rf ${path.join(OUTPUT_CLONE, '.git')}`
    ].join(' && ');
    await bash(commands);
    success(`added translations inside ${OUTPUT_CLONE}`);
}

module.exports = main;
{'fraction_non_alphanumeric': 0.16723356009070295, 'fraction_numerical': 0.017006802721088437, 'mean_word_length': 4.042857142857143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2209183', 'n_tokens_mistral': 629, 'n_tokens_neox': 610, 'n_words': 133}