<commit_before>import PublicationUtils from 'meteor/utilities:smart-publications';
import Posts from "meteor/nova:posts";
import Users from 'meteor/nova:users';
import Folders from "./collection.js";

Users.addField([
    /**
     Count of the user's Folders
     */
    {
        fieldName: "folderCount",
        fieldSchema: {
            type: Number,
            optional: true,
            publish: true,
            defaultValue: 0
        }
    },
    /**
     An array containing the `_id`s of folders
     */
    {
        fieldName: "folders",
        fieldSchema: {
            type: [String],
            optional: true,
            publish: true,
            join: {
                joinAs: "foldersArray",
                collection: () => Users,
                limit: 4
            }
        }
    }
]);

PublicationUtils.addToFields(Users.publishedFields.list, ["folderCount", "folders"]);
<commit_msg>add nova-tags copy from nova-categories.<commit_after>import PublicationUtils from 'meteor/utilities:smart-publications';
import Posts from "meteor/nova:posts";
import Users from 'meteor/nova:users';
import Folders from "./collection.js";

Users.addField([
    /**
     Count of the user's Folders
     */
    {
        fieldName: "telescope.folderCount",
        fieldSchema: {
            type: Number,
            optional: true,
            publish: true,
            defaultValue: 0
        }
    },
    /**
     An array containing the `_id`s of folders
     */
    {
        fieldName: "telescope..folders",
        fieldSchema: {
            type: [String],
            optional: true,
            publish: true,
            join: {
                joinAs: "foldersArray",
                collection: () => Users,
                limit: 4
            }
        }
    }
]);

PublicationUtils.addToFields(Users.publishedFields.list, ["folderCount", "folders"]);

{'fraction_non_alphanumeric': 0.11546610169491525, 'fraction_numerical': 0.00211864406779661, 'mean_word_length': 1.725829725829726, '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': '5819892', 'n_tokens_mistral': 551, 'n_tokens_neox': 522, 'n_words': 122}