<commit_before>// Initialization
AT.prototype.init = function() {
    if (this._initialized)
        return;

    // Checks there is at least one account service installed
    if (!Package["accounts-password"] && (Accounts.oauth.serviceNames().length === 0))
        throw Error("AccountsTemplates: You must add at least one account service!");

    // A password field is strictly required
    var password = this.getField("password");
    if (!password)
        throw Error("A password field is strictly required!");
    if (password.type !== "password")
        throw Error("The type of password field should be password!");

    // Then we can have "username" or "email" or even both of them
    // but at least one of the two is strictly required
    var username = this.getField("username");
    var email = this.getField("email");<commit_msg>better check for no services<commit_after>// Initialization
AT.prototype.init = function() {
    if (this._initialized)
        return;

    // Checks there is at least one account service installed
    console.dir(Accounts.oauth);
    if (!Package["accounts-password"] && (!Accounts.oauth || Accounts.oauth.serviceNames().length === 0))
        throw Error("AccountsTemplates: You must add at least one account service!");

    // A password field is strictly required
    var password = this.getField("password");
    if (!password)
        throw Error("A password field is strictly required!");
    if (password.type !== "password")
        throw Error("The type of password field should be password!");

    // Then we can have "username" or "email" or even both of them
    // but at least one of the two is strictly required
    var username = this.getField("username");
    var email = this.getField("email");
{'fraction_non_alphanumeric': 0.11614730878186968, 'fraction_numerical': 0.0011331444759206798, 'mean_word_length': 3.276029055690073, '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': '6834868', 'n_tokens_mistral': 454, 'n_tokens_neox': 446, 'n_words': 181}