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 SimpleSchema from 'simpl-schema';
|
||||||
import schema from '/imports/api/schema.js';
|
|
||||||
|
|
||||||
let Encounters = new Mongo.Collection("encounters");
|
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
|
//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 SimpleSchema from 'simpl-schema';
|
||||||
import schema from '/imports/api/schema.js';
|
|
||||||
|
|
||||||
let Parties = new Mongo.Collection("parties");
|
let Parties = new Mongo.Collection("parties");
|
||||||
|
|
||||||
let partySchema = schema({
|
let partySchema = new SimpleSchema({
|
||||||
name: {
|
name: {
|
||||||
type: String,
|
type: String,
|
||||||
defaultValue: "New Party",
|
defaultValue: "New Party",
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import SimpleSchema from 'simpl-schema';
|
import SimpleSchema from 'simpl-schema';
|
||||||
import schema from '/imports/api/schema.js';
|
|
||||||
import ChildSchema from '/imports/api/parenting/ChildSchema.js';
|
import ChildSchema from '/imports/api/parenting/ChildSchema.js';
|
||||||
import propertySchemas from '/imports/api/properties/propertySchemas.js';
|
import propertySchemas from '/imports/api/properties/propertySchemas.js';
|
||||||
import Libraries from '/imports/api/library/Libraries.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 CreatureProperties = new Mongo.Collection('creatureProperties');
|
||||||
|
|
||||||
let CreaturePropertySchema = schema({
|
let CreaturePropertySchema = new SimpleSchema({
|
||||||
creaturePropertyType: {
|
creaturePropertyType: {
|
||||||
type: String,
|
type: String,
|
||||||
allowedValues: Object.keys(propertySchemas),
|
allowedValues: Object.keys(propertySchemas),
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import SimpleSchema from 'simpl-schema';
|
import SimpleSchema from 'simpl-schema';
|
||||||
import schema from '/imports/api/schema.js';
|
|
||||||
import deathSaveSchema from "/imports/api/creature/subSchemas/DeathSavesSchema.js"
|
import deathSaveSchema from "/imports/api/creature/subSchemas/DeathSavesSchema.js"
|
||||||
import ColorSchema from "/imports/api/creature/subSchemas/ColorSchema.js";
|
import ColorSchema from "/imports/api/creature/subSchemas/ColorSchema.js";
|
||||||
import SharingSchema from '/imports/api/sharing/SharingSchema.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
|
// Strings
|
||||||
name: {
|
name: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import SimpleSchema from 'simpl-schema';
|
import SimpleSchema from 'simpl-schema';
|
||||||
import schema from '/imports/api/schema.js';
|
|
||||||
|
|
||||||
let Icons = new Mongo.Collection('icons');
|
let Icons = new Mongo.Collection('icons');
|
||||||
|
|
||||||
iconsSchema = schema({
|
iconsSchema = new SimpleSchema({
|
||||||
name: {
|
name: {
|
||||||
type: String,
|
type: String,
|
||||||
unique: true,
|
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 SharingSchema from '/imports/api/sharing/SharingSchema.js';
|
||||||
import simpleSchemaMixin from '/imports/api/creature/mixins/simpleSchemaMixin.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 Libraries = new Mongo.Collection('libraries');
|
||||||
|
|
||||||
let LibrarySchema = schema({
|
let LibrarySchema = new SimpleSchema({
|
||||||
name: {
|
name: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import SimpleSchema from 'simpl-schema';
|
import SimpleSchema from 'simpl-schema';
|
||||||
import schema from '/imports/api/schema.js';
|
|
||||||
import ChildSchema from '/imports/api/parenting/ChildSchema.js';
|
import ChildSchema from '/imports/api/parenting/ChildSchema.js';
|
||||||
import librarySchemas from '/imports/api/library/librarySchemas.js';
|
import librarySchemas from '/imports/api/library/librarySchemas.js';
|
||||||
import Libraries from '/imports/api/library/Libraries.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 LibraryNodes = new Mongo.Collection('libraryNodes');
|
||||||
|
|
||||||
let LibraryNodeSchema = schema({
|
let LibraryNodeSchema = new SimpleSchema({
|
||||||
libraryNodeType: {
|
libraryNodeType: {
|
||||||
type: String,
|
type: String,
|
||||||
allowedValues: Object.keys(librarySchemas),
|
allowedValues: Object.keys(librarySchemas),
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
import SimpleSchema from 'simpl-schema';
|
||||||
|
|
||||||
Blacklist = new Mongo.Collection("blacklist");
|
Blacklist = new Mongo.Collection("blacklist");
|
||||||
|
|
||||||
Schemas.Blacklist = schema({
|
Schemas.Blacklist = new SimpleSchema({
|
||||||
userId: {
|
userId: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
import SimpleSchema from 'simpl-schema';
|
||||||
|
|
||||||
ChangeLogs = new Mongo.Collection("changeLogs");
|
ChangeLogs = new Mongo.Collection("changeLogs");
|
||||||
|
|
||||||
Schemas.ChangeLog = schema({
|
Schemas.ChangeLog = new SimpleSchema({
|
||||||
version: {
|
version: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
import SimpleSchema from 'simpl-schema';
|
||||||
|
|
||||||
Reports = new Mongo.Collection("reports");
|
Reports = new Mongo.Collection("reports");
|
||||||
|
|
||||||
Schemas.Report = schema({
|
Schemas.Report = new SimpleSchema({
|
||||||
owner: {
|
owner: {
|
||||||
type: String,
|
type: String,
|
||||||
regEx: SimpleSchema.RegEx.Id,
|
regEx: SimpleSchema.RegEx.Id,
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import SimpleSchema from 'simpl-schema';
|
import SimpleSchema from 'simpl-schema';
|
||||||
import schema from '/imports/api/schema.js';
|
|
||||||
|
|
||||||
const RefSchema = new SimpleSchema({
|
const RefSchema = new SimpleSchema({
|
||||||
id: {
|
id: {
|
||||||
@@ -12,7 +11,7 @@ const RefSchema = new SimpleSchema({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
let ChildSchema = schema({
|
let ChildSchema = new SimpleSchema({
|
||||||
order: {
|
order: {
|
||||||
type: Number,
|
type: Number,
|
||||||
min: 0,
|
min: 0,
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import SimpleSchema from 'simpl-schema';
|
import SimpleSchema from 'simpl-schema';
|
||||||
import schema from '/imports/api/schema.js';
|
|
||||||
import AdjustmentSchema from '/imports/api/creature/subSchemas/AdjustmentSchema.js';
|
import AdjustmentSchema from '/imports/api/creature/subSchemas/AdjustmentSchema.js';
|
||||||
import StoredBuffSchema from '/imports/api/properties/Buffs.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
|
// The computed value of the attribute
|
||||||
value: {
|
value: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import SimpleSchema from 'simpl-schema';
|
import SimpleSchema from 'simpl-schema';
|
||||||
import { PropertySchema } from '/imports/api/properties/Properties.js'
|
|
||||||
import VARIABLE_NAME_REGEX from '/imports/constants/VARIABLE_NAME_REGEX.js';
|
import VARIABLE_NAME_REGEX from '/imports/constants/VARIABLE_NAME_REGEX.js';
|
||||||
|
|
||||||
let ClassLevelSchema = new SimpleSchema({
|
let ClassLevelSchema = new SimpleSchema({
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
import SimpleSchema from 'simpl-schema';
|
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({
|
let ContainerSchema = new SimpleSchema({
|
||||||
name: {
|
name: {
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
import SimpleSchema from 'simpl-schema';
|
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
|
* Effects are reason-value attached to skills and abilities
|
||||||
|
|||||||
@@ -1,22 +1,10 @@
|
|||||||
import SimpleSchema from 'simpl-schema';
|
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 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
|
* Skills have an ability score modifier that they use as their basis
|
||||||
*/
|
*/
|
||||||
let SkillSchema = schema({
|
let SkillSchema = new SimpleSchema({
|
||||||
name: {
|
name: {
|
||||||
type: String,
|
type: String,
|
||||||
optional: true,
|
optional: true,
|
||||||
|
|||||||
@@ -1,15 +1,4 @@
|
|||||||
import ColorSchema from '/imports/api/creature/subSchemas/ColorSchema.js';
|
|
||||||
import SimpleSchema from 'simpl-schema';
|
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 = [
|
const magicSchools = [
|
||||||
'abjuration',
|
'abjuration',
|
||||||
@@ -22,7 +11,7 @@ const magicSchools = [
|
|||||||
'transmutation',
|
'transmutation',
|
||||||
];
|
];
|
||||||
|
|
||||||
let SpellSchema = schema({
|
let SpellSchema = new SimpleSchema({
|
||||||
name: {
|
name: {
|
||||||
type: String,
|
type: String,
|
||||||
optional: true,
|
optional: true,
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import SimpleSchema from 'simpl-schema';
|
import SimpleSchema from 'simpl-schema';
|
||||||
import schema from '/imports/api/schema.js';
|
|
||||||
|
|
||||||
const userSchema = schema({
|
const userSchema = new SimpleSchema({
|
||||||
username: {
|
username: {
|
||||||
type: String,
|
type: String,
|
||||||
optional: true,
|
optional: true,
|
||||||
@@ -95,7 +94,7 @@ Meteor.users.setDarkMode = new ValidatedMethod({
|
|||||||
|
|
||||||
Meteor.users.sendVerificationEmail = new ValidatedMethod({
|
Meteor.users.sendVerificationEmail = new ValidatedMethod({
|
||||||
name: 'Users.methods.sendVerificationEmail',
|
name: 'Users.methods.sendVerificationEmail',
|
||||||
validate: schema({
|
validate: new SimpleSchema({
|
||||||
userId:{
|
userId:{
|
||||||
type: String,
|
type: String,
|
||||||
optional: true,
|
optional: true,
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import SimpleSchema from 'simpl-schema';
|
import SimpleSchema from 'simpl-schema';
|
||||||
import schema from '/imports/api/schema.js';
|
|
||||||
|
|
||||||
if (Meteor.isDevelopment){
|
if (Meteor.isDevelopment){
|
||||||
SimpleSchema.debug = true
|
SimpleSchema.debug = true
|
||||||
|
|||||||
Reference in New Issue
Block a user