<commit_before>import { Meteor } from 'meteor/meteor';
import { Mongo } from 'meteor/mongo';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';

export const Communities = new Mongo.Collection('Communities');

Communities.schema = new SimpleSchema({
  name: {
    type: String,
    label: 'Community name'
  },
  description: {
    type: String,
    label: 'Community description'
  },
  pictureId: {
    type: String,
    label: 'Public ID of Cloudinary image'
  },
  ownerId: {
    type: String,
    regEx: SimpleSchema.RegEx.Id,
    label: 'ID of user who created community'
  },
  count: {
    type: Number,
    label: 'Sum of people in community'
  },
  website: {
    type: String,
    regEx: SimpleSchema.RegEx.Url,
    optional: true
  },
  coordinates:{
    type: [Number],
    decimal: true,
    minCount: 2,
    maxCount: 2,
    label: 'Array of coordinates in MongoDB style \[Lng, Lat\]'
  },
  zoom: {
    type: Number,
    label: 'Zoom level of map',
    defaultValue: 15
  },
  mapURL: {
    type: String,
    regEx: SimpleSchema.RegEx.Url,
    autoValue: function(){
      if(!this.isSet){
        const id = Meteor.settings.public.MapBox.mapID;
        const accessToken = Meteor.settings.public.MapBox.accessToken;
        return "https://api.tiles.mapbox.com/v4/"+ id +"/{z}/{x}/{y}.png?access_token=" + accessToken;
      }
    },
    label: 'Mapbox studio style'
  },
  createdAt: {
    type: Date,
    label: 'Published date/time',
    autoValue: function() {
      if (this.isInsert) {
        return new Date();<commit_msg>Remove autovalue for mapURL<commit_after>import { Meteor } from 'meteor/meteor';
import { Mongo } from 'meteor/mongo';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';

export const Communities = new Mongo.Collection('Communities');

Communities.schema = new SimpleSchema({
  name: {
    type: String,
    label: 'Community name'
  },
  description: {
    type: String,
    label: 'Community description'
  },
  pictureId: {
    type: String,
    label: 'Public ID of Cloudinary image'
  },
  ownerId: {
    type: String,
    regEx: SimpleSchema.RegEx.Id,
    label: 'ID of user who created community'
  },
  count: {
    type: Number,
    label: 'Sum of people in community'
  },
  website: {
    type: String,
    regEx: SimpleSchema.RegEx.Url,
    optional: true
  },
  coordinates:{
    type: [Number],
    decimal: true,
    minCount: 2,
    maxCount: 2,
    label: 'Array of coordinates in MongoDB style \[Lng, Lat\]'
  },
  zoom: {
    type: Number,
    label: 'Zoom level of map',
    defaultValue: 15
  },
  mapURL: {
    type: String,
    regEx: SimpleSchema.RegEx.Url,
    label: 'Mapbox studio style'
  },
  createdAt: {
    type: Date,
    label: 'Published date/time',
    autoValue: function() {
      if (this.isInsert) {
        return new Date();
{'fraction_non_alphanumeric': 0.1314023313316849, 'fraction_numerical': 0.0031790886612504416, 'mean_word_length': 2.8115746971736204, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '1673713', 'n_tokens_mistral': 972, 'n_tokens_neox': 937, 'n_words': 254}