<commit_before>const fs = require('fs');
const path = require('path');

let paramIndex = 2;
const CONFIG_FILE_PATH = process.argv[paramIndex++];
if(!CONFIG_FILE_PATH) {
    throw new Error('Config file path not set');
}
const API_URL = process.argv[paramIndex++];
if(!API_URL) {
    throw new Error('API URL not set');
}
const ASSETS_BASE_URL = process.argv[paramIndex++] || './';
const GOOGLE_API_KEY = process.argv[paramIndex++];
if(!GOOGLE_API_KEY) {
    throw new Error('Google API key not set');
}
const GOOGLE_TRACKER_ID = process.argv[paramIndex++];
let PARTNER_LOGO_URL = process.argv[paramIndex++];
const THEME_FILE_PATH = process.argv[paramIndex++];
if(!THEME_FILE_PATH) {
    throw new Error('Theme file path not set');
}
const THEME = process.argv[paramIndex++] || 'pink';

if(PARTNER_LOGO_URL) {
    const partnerLogoPath = path.join(__dirname, `../client/src${PARTNER_LOGO_URL}`);
    if(!fs.existsSync(partnerLogoPath)) {
        PARTNER_LOGO_URL = null;
    }
}

const configFilePath = path.join(process.cwd(), CONFIG_FILE_PATH);
let configContent =
`export const params = {
assetsBaseUrl: '${ASSETS_BASE_URL}',
googleApiKey: '${GOOGLE_API_KEY}',
googleTrackerId: '${GOOGLE_TRACKER_ID}',
apiUrl: '${API_URL}',<commit_msg>Fixed empty partner logo URL.<commit_after>const fs = require('fs');
const path = require('path');

let paramIndex = 2;
const CONFIG_FILE_PATH = process.argv[paramIndex++];
if(!CONFIG_FILE_PATH) {
    throw new Error('Config file path not set');
}
const API_URL = process.argv[paramIndex++];
if(!API_URL) {
    throw new Error('API URL not set');
}
const ASSETS_BASE_URL = process.argv[paramIndex++] || './';
const GOOGLE_API_KEY = process.argv[paramIndex++];
if(!GOOGLE_API_KEY) {
    throw new Error('Google API key not set');
}
const GOOGLE_TRACKER_ID = process.argv[paramIndex++];
let PARTNER_LOGO_URL = process.argv[paramIndex++];
const THEME_FILE_PATH = process.argv[paramIndex++];
if(!THEME_FILE_PATH) {
    throw new Error('Theme file path not set');
}
const THEME = process.argv[paramIndex++] || 'pink';

if(PARTNER_LOGO_URL) {
    const partnerLogoPath = path.join(__dirname, `../client/src${PARTNER_LOGO_URL}`);
    if(!fs.existsSync(partnerLogoPath)) {
        PARTNER_LOGO_URL = '';
    }
}

const configFilePath = path.join(process.cwd(), CONFIG_FILE_PATH);
let configContent =
`export const params = {
assetsBaseUrl: '${ASSETS_BASE_URL}',
googleApiKey: '${GOOGLE_API_KEY}',
googleTrackerId: '${GOOGLE_TRACKER_ID}',
apiUrl: '${API_URL}',
{'fraction_non_alphanumeric': 0.15635048231511253, 'fraction_numerical': 0.0008038585209003215, 'mean_word_length': 5.875690607734807, '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': '102623', 'n_tokens_mistral': 870, 'n_tokens_neox': 857, 'n_words': 182}