<commit_before>/**
 * The Bridge
 *
 * The bridge is responsible for handing communication from the server to the frontend.
 * Data should only be flowing server -> frontend.
 * As the architecture improves, the number of cross requires here should go down
 * Eventually, the aim is to make this a component that is initialized on boot and is either handed to or actively creates the frontend, if the frontend is desired.
 *
 * This file is a great place for all the cross-component event handling in lieu of refactoring
 */

const debug = require('@tryghost/debug')('bridge');
const errors = require('@tryghost/errors');
const config = require('./shared/config');
const logging = require('@tryghost/logging');
const tpl = require('@tryghost/tpl');
const themeEngine = require('./frontend/services/theme-engine');
const settingsCache = require('./shared/settings-cache');

// Listen to settings.lang.edited, similar to the member service and models/base/listeners<commit_msg>Added clarifying note to bridge<commit_after>/**
 * The Bridge
 *
 * The bridge is responsible for handing communication from the server to the frontend.
 * Data should only be flowing server -> frontend.
 * As the architecture improves, the number of cross requires here should go down
 * Eventually, the aim is to make this a component that is initialized on boot and is either handed to or actively creates the frontend, if the frontend is desired.
 *
 * This file is a great place for all the cross-component event handling in lieu of refactoring
 * NOTE: You may require anything from shared, the frontend or server here - it is the one place (other than boot) that is allowed :)
 */

const debug = require('@tryghost/debug')('bridge');
const errors = require('@tryghost/errors');
const config = require('./shared/config');
const logging = require('@tryghost/logging');
const tpl = require('@tryghost/tpl');
const themeEngine = require('./frontend/services/theme-engine');
const settingsCache = require('./shared/settings-cache');

// Listen to settings.lang.edited, similar to the member service and models/base/listeners
{'fraction_non_alphanumeric': 0.09705042816365367, 'fraction_numerical': 0.0, 'mean_word_length': 4.668463611859838, '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': '3339992', 'n_tokens_mistral': 526, 'n_tokens_neox': 521, 'n_words': 250}