Purged all references to the schema factory, use SCHEMA_OPTIONS constant instead
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import schema from '/imports/api/schema.js';
|
||||
|
||||
let Encounters = new Mongo.Collection("encounters");
|
||||
|
||||
let EncounterSchema = schema({
|
||||
let EncounterSchema = new SimpleSchema({
|
||||
//an encounter is a single flow of time all parties in an encounter are in-sync time wise
|
||||
});
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import schema from '/imports/api/schema.js';
|
||||
|
||||
let Parties = new Mongo.Collection("parties");
|
||||
|
||||
let partySchema = schema({
|
||||
let partySchema = new SimpleSchema({
|
||||
name: {
|
||||
type: String,
|
||||
defaultValue: "New Party",
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import schema from '/imports/api/schema.js';
|
||||
import ChildSchema from '/imports/api/parenting/ChildSchema.js';
|
||||
import propertySchemas from '/imports/api/properties/propertySchemas.js';
|
||||
import Libraries from '/imports/api/library/Libraries.js';
|
||||
@@ -8,7 +7,7 @@ import getModifierFields from '/imports/api/getModifierFields.js';
|
||||
|
||||
let CreatureProperties = new Mongo.Collection('creatureProperties');
|
||||
|
||||
let CreaturePropertySchema = schema({
|
||||
let CreaturePropertySchema = new SimpleSchema({
|
||||
creaturePropertyType: {
|
||||
type: String,
|
||||
allowedValues: Object.keys(propertySchemas),
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import schema from '/imports/api/schema.js';
|
||||
import deathSaveSchema from "/imports/api/creature/subSchemas/DeathSavesSchema.js"
|
||||
import ColorSchema from "/imports/api/creature/subSchemas/ColorSchema.js";
|
||||
import SharingSchema from '/imports/api/sharing/SharingSchema.js';
|
||||
@@ -29,7 +28,7 @@ let CreatureSettingsSchema = new SimpleSchema({
|
||||
},
|
||||
});
|
||||
|
||||
let CreatureSchema = schema({
|
||||
let CreatureSchema = new SimpleSchema({
|
||||
// Strings
|
||||
name: {
|
||||
type: String,
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import schema from '/imports/api/schema.js';
|
||||
|
||||
let Icons = new Mongo.Collection('icons');
|
||||
|
||||
iconsSchema = schema({
|
||||
iconsSchema = new SimpleSchema({
|
||||
name: {
|
||||
type: String,
|
||||
unique: true,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import schema from '/imports/api/schema.js';
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import SharingSchema from '/imports/api/sharing/SharingSchema.js';
|
||||
import simpleSchemaMixin from '/imports/api/creature/mixins/simpleSchemaMixin.js';
|
||||
|
||||
@@ -13,7 +13,7 @@ import simpleSchemaMixin from '/imports/api/creature/mixins/simpleSchemaMixin.js
|
||||
*/
|
||||
let Libraries = new Mongo.Collection('libraries');
|
||||
|
||||
let LibrarySchema = schema({
|
||||
let LibrarySchema = new SimpleSchema({
|
||||
name: {
|
||||
type: String,
|
||||
},
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import schema from '/imports/api/schema.js';
|
||||
import ChildSchema from '/imports/api/parenting/ChildSchema.js';
|
||||
import librarySchemas from '/imports/api/library/librarySchemas.js';
|
||||
import Libraries from '/imports/api/library/Libraries.js';
|
||||
@@ -8,7 +7,7 @@ import getModifierFields from '/imports/api/getModifierFields.js';
|
||||
|
||||
let LibraryNodes = new Mongo.Collection('libraryNodes');
|
||||
|
||||
let LibraryNodeSchema = schema({
|
||||
let LibraryNodeSchema = new SimpleSchema({
|
||||
libraryNodeType: {
|
||||
type: String,
|
||||
allowedValues: Object.keys(librarySchemas),
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
|
||||
Blacklist = new Mongo.Collection("blacklist");
|
||||
|
||||
Schemas.Blacklist = schema({
|
||||
Schemas.Blacklist = new SimpleSchema({
|
||||
userId: {
|
||||
type: String,
|
||||
},
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
|
||||
ChangeLogs = new Mongo.Collection("changeLogs");
|
||||
|
||||
Schemas.ChangeLog = schema({
|
||||
Schemas.ChangeLog = new SimpleSchema({
|
||||
version: {
|
||||
type: String,
|
||||
},
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
|
||||
Reports = new Mongo.Collection("reports");
|
||||
|
||||
Schemas.Report = schema({
|
||||
Schemas.Report = new SimpleSchema({
|
||||
owner: {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import schema from '/imports/api/schema.js';
|
||||
|
||||
const RefSchema = new SimpleSchema({
|
||||
id: {
|
||||
@@ -12,7 +11,7 @@ const RefSchema = new SimpleSchema({
|
||||
},
|
||||
});
|
||||
|
||||
let ChildSchema = schema({
|
||||
let ChildSchema = new SimpleSchema({
|
||||
order: {
|
||||
type: Number,
|
||||
min: 0,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import schema from '/imports/api/schema.js';
|
||||
import AdjustmentSchema from '/imports/api/creature/subSchemas/AdjustmentSchema.js';
|
||||
import StoredBuffSchema from '/imports/api/properties/Buffs.js';
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ let AttributeSchema = new SimpleSchema({
|
||||
},
|
||||
});
|
||||
|
||||
let ComputedAttributeSchema = schema({
|
||||
let ComputedAttributeSchema = new SimpleSchema({
|
||||
// The computed value of the attribute
|
||||
value: {
|
||||
type: Number,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import { PropertySchema } from '/imports/api/properties/Properties.js'
|
||||
import VARIABLE_NAME_REGEX from '/imports/constants/VARIABLE_NAME_REGEX.js';
|
||||
|
||||
let ClassLevelSchema = new SimpleSchema({
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import ColorSchema from "/imports/api/creature/subSchemas/ColorSchema.js";
|
||||
import { PropertySchema } from '/imports/api/properties/Properties.js'
|
||||
import ChildSchema from '/imports/api/parenting/ChildSchema.js';
|
||||
|
||||
let ContainerSchema = new SimpleSchema({
|
||||
name: {
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import { PropertySchema } from '/imports/api/properties/Properties.js'
|
||||
|
||||
let Effects = new Mongo.Collection('effects');
|
||||
|
||||
/*
|
||||
* Effects are reason-value attached to skills and abilities
|
||||
|
||||
@@ -1,22 +1,10 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import schema from '/imports/api/schema.js';
|
||||
import { PropertySchema } from '/imports/api/properties/Properties.js'
|
||||
import ColorSchema from '/imports/api/creature/subSchemas/ColorSchema.js';
|
||||
|
||||
// Mixins
|
||||
import recomputeCreatureMixin from '/imports/api/creature/mixins/recomputeCreatureMixin.js';
|
||||
import creaturePermissionMixin from '/imports/api/creature/mixins/creaturePermissionMixin.js';
|
||||
import { setDocToLastMixin } from '/imports/api/creature/mixins/setDocToLastMixin.js';
|
||||
import { setDocAncestryMixin, ensureAncestryContainsCharIdMixin } from '/imports/api/parenting/parenting.js';
|
||||
import simpleSchemaMixin from '/imports/api/creature/mixins/simpleSchemaMixin.js';
|
||||
import propagateInheritanceUpdateMixin from '/imports/api/creature/mixins/propagateInheritanceUpdateMixin.js';
|
||||
import updateSchemaMixin from '/imports/api/creature/mixins/updateSchemaMixin.js';
|
||||
|
||||
/*
|
||||
* Skills are anything that results in a modifier to be added to a D20
|
||||
* Skills have an ability score modifier that they use as their basis
|
||||
*/
|
||||
let SkillSchema = schema({
|
||||
let SkillSchema = new SimpleSchema({
|
||||
name: {
|
||||
type: String,
|
||||
optional: true,
|
||||
|
||||
@@ -1,15 +1,4 @@
|
||||
import ColorSchema from '/imports/api/creature/subSchemas/ColorSchema.js';
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import schema from '/imports/api/schema.js';
|
||||
import { PropertySchema } from '/imports/api/properties/Properties.js'
|
||||
|
||||
// Mixins
|
||||
import creaturePermissionMixin from '/imports/api/creature/mixins/creaturePermissionMixin.js';
|
||||
import { setDocToLastMixin } from '/imports/api/creature/mixins/setDocToLastMixin.js';
|
||||
import { setDocAncestryMixin, ensureAncestryContainsCharIdMixin } from '/imports/api/parenting/parenting.js';
|
||||
import simpleSchemaMixin from '/imports/api/creature/mixins/simpleSchemaMixin.js';
|
||||
import propagateInheritanceUpdateMixin from '/imports/api/creature/mixins/propagateInheritanceUpdateMixin.js';
|
||||
import updateSchemaMixin from '/imports/api/creature/mixins/updateSchemaMixin.js';
|
||||
|
||||
const magicSchools = [
|
||||
'abjuration',
|
||||
@@ -22,7 +11,7 @@ const magicSchools = [
|
||||
'transmutation',
|
||||
];
|
||||
|
||||
let SpellSchema = schema({
|
||||
let SpellSchema = new SimpleSchema({
|
||||
name: {
|
||||
type: String,
|
||||
optional: true,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import schema from '/imports/api/schema.js';
|
||||
|
||||
const userSchema = schema({
|
||||
const userSchema = new SimpleSchema({
|
||||
username: {
|
||||
type: String,
|
||||
optional: true,
|
||||
@@ -95,7 +94,7 @@ Meteor.users.setDarkMode = new ValidatedMethod({
|
||||
|
||||
Meteor.users.sendVerificationEmail = new ValidatedMethod({
|
||||
name: 'Users.methods.sendVerificationEmail',
|
||||
validate: schema({
|
||||
validate: new SimpleSchema({
|
||||
userId:{
|
||||
type: String,
|
||||
optional: true,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import schema from '/imports/api/schema.js';
|
||||
|
||||
if (Meteor.isDevelopment){
|
||||
SimpleSchema.debug = true
|
||||
|
||||
Reference in New Issue
Block a user