@dhyasama/totem-models 8.5.3 → 8.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Account.js CHANGED
@@ -257,7 +257,7 @@ module.exports = function(mongoose, config) {
257
257
  };
258
258
 
259
259
 
260
-
260
+ Account.set('usePushEach', true);
261
261
  Account.set('autoIndex', false);
262
262
  Account.on('index', function(err) { console.log('error building account indexes: ' + err); });
263
263
 
package/lib/Activity.js CHANGED
@@ -123,6 +123,7 @@ module.exports = function(mongoose, config) {
123
123
 
124
124
  };
125
125
 
126
+ Activity.set('usePushEach', true);
126
127
  Activity.set('autoIndex', false);
127
128
  Activity.on('index', function(err) { console.log('error building activity indexes: ' + err); });
128
129
 
@@ -177,6 +177,7 @@ module.exports = function(mongoose, config) {
177
177
  };
178
178
 
179
179
 
180
+ CalendarEvent.set('usePushEach', true);
180
181
  CalendarEvent.set('autoIndex', false);
181
182
  CalendarEvent.on('index', function(err) { console.log('error building calendar event indexes: ' + err); });
182
183
 
package/lib/CapTable.js CHANGED
@@ -418,6 +418,7 @@ module.exports = function(mongoose, config) {
418
418
  // CONFIG
419
419
  ///////////////////////////////////////////////////////////////////////////////////////
420
420
 
421
+ CapTable.set('usePushEach', true);
421
422
  CapTable.set('toJSON', { virtuals: true });
422
423
  CapTable.set('autoIndex', false);
423
424
 
package/lib/Deal.js CHANGED
@@ -450,6 +450,7 @@ module.exports = function(mongoose, config) {
450
450
 
451
451
  Deal.set('toJSON', { virtuals: true });
452
452
  Deal.set('autoIndex', false);
453
+ Deal.set('usePushEach', true);
453
454
 
454
455
  Deal.on('index', function(err) { console.log('error building deal indexes: ' + err); });
455
456
 
package/lib/Document.js CHANGED
@@ -202,6 +202,7 @@ module.exports = function(mongoose, config) {
202
202
  // CONFIG
203
203
  ///////////////////////////////////////////////////////////////////////////////////////
204
204
 
205
+ Document.set('usePushEach', true);
205
206
  Document.set('toJSON', { virtuals: true });
206
207
  Document.set('autoIndex', false);
207
208
  Document.on('index', function(err) { console.log('error building document indexes: ' + err); });
package/lib/Financials.js CHANGED
@@ -523,6 +523,7 @@ module.exports = function(mongoose, config) {
523
523
  // CONFIG
524
524
  ///////////////////////////////////////////////////////////////////////////////////////
525
525
 
526
+ Financials.set('usePushEach', true);
526
527
  Financials.set('toJSON', { virtuals: true });
527
528
  Financials.set('autoIndex', false);
528
529
 
package/lib/Flag.js CHANGED
@@ -118,6 +118,7 @@ module.exports = function(mongoose, config) {
118
118
  self.text = querystring.unescape(self.text);
119
119
  });
120
120
 
121
+ Flag.set('usePushEach', true);
121
122
  Flag.set('autoIndex', false);
122
123
  Flag.on('index', function(err) { console.log('error building Flag indexes: ' + err); });
123
124
 
package/lib/Fund.js CHANGED
@@ -190,6 +190,7 @@ module.exports = function(mongoose, config) {
190
190
 
191
191
  };
192
192
 
193
+ Fund.set('usePushEach', true);
193
194
  Fund.set('autoIndex', false);
194
195
  Fund.on('index', function(err) { console.log('error building fund indexes: ' + err); });
195
196
 
@@ -269,6 +269,7 @@ module.exports = function(mongoose, config) {
269
269
 
270
270
  };
271
271
 
272
+ Interaction.set('usePushEach', true);
272
273
  Interaction.set('autoIndex', false);
273
274
  Interaction.on('index', function(err) { console.log('error building interaction indexes: ' + err); });
274
275
 
package/lib/Investment.js CHANGED
@@ -170,6 +170,7 @@ module.exports = function(mongoose, config) {
170
170
  // CONFIG
171
171
  ///////////////////////////////////////////////////////////////////////////////////////
172
172
 
173
+ Investment.set('usePushEach', true);
173
174
  Investment.set('toJSON', { virtuals: true });
174
175
  Investment.set('autoIndex', false);
175
176
 
@@ -551,10 +551,11 @@ module.exports = function(mongoose, config) {
551
551
 
552
552
  });
553
553
 
554
+ // todo - fix sorting
554
555
  return cb(null, {
555
- all: helpers.sortPeopleSources(all, options.CUSTOMER_ID),
556
- current: helpers.sortPeopleSources(current, options.CUSTOMER_ID),
557
- past: helpers.sortPeopleSources(past, options.CUSTOMER_ID)
556
+ all: all, //helpers.sortPeopleSources(all, options.CUSTOMER_ID),
557
+ current: current, //helpers.sortPeopleSources(current, options.CUSTOMER_ID),
558
+ past: past //helpers.sortPeopleSources(past, options.CUSTOMER_ID)
558
559
  });
559
560
 
560
561
  });
@@ -719,6 +720,7 @@ module.exports = function(mongoose, config) {
719
720
 
720
721
  //////////////////////////////
721
722
 
723
+ LimitedPartner.set('usePushEach', true);
722
724
  LimitedPartner.set('autoIndex', false);
723
725
  LimitedPartner.on('index', function(err) { console.log('error building limited partner indexes: ' + err); });
724
726
 
package/lib/List.js CHANGED
@@ -252,6 +252,7 @@ module.exports = function(mongoose, config) {
252
252
 
253
253
  });
254
254
 
255
+ List.set('usePushEach', true);
255
256
  List.set('autoIndex', (env === 'development'));
256
257
  List.set('toJSON', { virtuals: true });
257
258
  List.set('autoIndex', false);
package/lib/Message.js CHANGED
@@ -378,6 +378,7 @@ module.exports = function(mongoose, config) {
378
378
 
379
379
  ///////////////////////////////////////
380
380
 
381
+ Message.set('usePushEach', true);
381
382
  Message.set('autoIndex', false);
382
383
  Message.set('toJSON', { virtuals: true });
383
384
 
package/lib/News.js CHANGED
@@ -68,6 +68,7 @@ module.exports = function(mongoose, config) {
68
68
  news.save(cb);
69
69
  };
70
70
 
71
+ News.set('usePushEach', true);
71
72
  News.set('autoIndex', false);
72
73
  News.on('index', function(err) { console.log('error building news indexes: ' + err); });
73
74
 
package/lib/Note.js CHANGED
@@ -127,6 +127,7 @@ module.exports = function(mongoose, config) {
127
127
  self.text = querystring.unescape(self.text);
128
128
  });
129
129
 
130
+ Note.set('usePushEach', true);
130
131
  Note.set('autoIndex', false);
131
132
  Note.on('index', function(err) { console.log('error building note indexes: ' + err); });
132
133
 
@@ -2054,6 +2054,7 @@ module.exports = function(mongoose, config) {
2054
2054
  // CONFIG
2055
2055
  ///////////////////////////////////////////////////////////////////////////////////////
2056
2056
 
2057
+ Organization.set('usePushEach', true);
2057
2058
  Organization.set('toJSON', { virtuals: true });
2058
2059
  Organization.set('autoIndex', false);
2059
2060
 
package/lib/Person.js CHANGED
@@ -1075,6 +1075,7 @@ module.exports = function(mongoose, config) {
1075
1075
  Person.set('autoIndex', false);
1076
1076
  Person.on('index', function(err) { console.log('error building person indexes: ' + err); });
1077
1077
 
1078
+ Person.set('usePushEach', true);
1078
1079
  Person.set('toJSON', { virtuals: true });
1079
1080
 
1080
1081
  mongoose.model('Person', Person);
package/lib/Round.js CHANGED
@@ -957,6 +957,7 @@ module.exports = function(mongoose, config) {
957
957
  // CONFIG
958
958
  ///////////////////////////////////////////////////////////////////////////////////////
959
959
 
960
+ Round.set('usePushEach', true);
960
961
  Round.set('toJSON', { virtuals: true });
961
962
  Round.set('autoIndex', false);
962
963
 
package/lib/Snapshot.js CHANGED
@@ -28,6 +28,8 @@ module.exports = function(mongoose, config) {
28
28
  snapshot.save(cb);
29
29
  };
30
30
 
31
+ Snapshot.set('usePushEach', true);
32
+
31
33
  mongoose.model('Snapshot', Snapshot, '_Snapshots');
32
34
 
33
35
  };
package/lib/Sync.js CHANGED
@@ -40,6 +40,7 @@ module.exports = function(mongoose, config) {
40
40
  sync.save(cb);
41
41
  };
42
42
 
43
+ Sync.set('usePushEach', true);
43
44
  Sync.set('autoIndex', false);
44
45
 
45
46
  mongoose.model('Sync', Sync, 'syncs');
package/lib/Webhook.js CHANGED
@@ -21,6 +21,7 @@ module.exports = function(mongoose, config) {
21
21
  webhook.save(cb);
22
22
  };
23
23
 
24
+ Webhook.set('usePushEach', true);
24
25
  Webhook.set('autoIndex', false);
25
26
 
26
27
  mongoose.model('Webhook', Webhook);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.5.3",
3
+ "version": "8.5.5",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",
@@ -18,7 +18,7 @@
18
18
  "@dhyasama/totem-utilities": "^3.0.0",
19
19
  "async": "^2.6.3",
20
20
  "awesome-phonenumber": "^1.0.14",
21
- "bluebird": "^3.7.0",
21
+ "bluebird": "^3.7.2",
22
22
  "escape-string-regexp": "^1.0.5",
23
23
  "moment": "^2.24.0",
24
24
  "mongoose-deep-populate": "^3.0.0",
@@ -31,7 +31,7 @@
31
31
  "devDependencies": {
32
32
  "mocha": "^5.2.0",
33
33
  "mocha-mongoose": "^1.2.0",
34
- "mongoose": "^4.5.10",
34
+ "mongoose": "^4.13.20",
35
35
  "nock": "^7.2.2",
36
36
  "should": "^11.1.1"
37
37
  }
package/test/CapTable.js CHANGED
@@ -27,14 +27,14 @@ describe('Cap Tables', function() {
27
27
  clearDB(done);
28
28
  });
29
29
 
30
- before(function(done) {
31
- CapTable.collection.dropIndexes(function (err, result) {
32
- should.not.exist(err);
33
- should.exist(result);
34
- result.should.equal(true);
35
- return done();
36
- });
37
- });
30
+ // before(function(done) {
31
+ // CapTable.collection.dropIndexes(function (err, result) {
32
+ // should.not.exist(err);
33
+ // should.exist(result);
34
+ // result.should.equal(true);
35
+ // return done();
36
+ // });
37
+ // });
38
38
 
39
39
  before(function(done) {
40
40
 
@@ -22,14 +22,14 @@ describe('Investments', function() {
22
22
  clearDB(done);
23
23
  });
24
24
 
25
- before(function (done) {
26
- Investment.collection.dropIndexes(function (err, result) {
27
- should.not.exist(err);
28
- should.exist(result);
29
- result.should.equal(true);
30
- return done();
31
- });
32
- });
25
+ // before(function (done) {
26
+ // Investment.collection.dropIndexes(function (err, result) {
27
+ // should.not.exist(err);
28
+ // should.exist(result);
29
+ // result.should.equal(true);
30
+ // return done();
31
+ // });
32
+ // });
33
33
 
34
34
  it('creates an investment', function(done) {
35
35
 
package/test/Round.js CHANGED
@@ -29,14 +29,14 @@ describe('Rounds', function() {
29
29
  clearDB(done);
30
30
  });
31
31
 
32
- before(function (done) {
33
- Round.collection.dropIndexes(function (err, result) {
34
- should.not.exist(err);
35
- should.exist(result);
36
- result.should.equal(true);
37
- return done();
38
- });
39
- });
32
+ // before(function (done) {
33
+ // Round.collection.dropIndexes(function (err, result) {
34
+ // should.not.exist(err);
35
+ // should.exist(result);
36
+ // result.should.equal(true);
37
+ // return done();
38
+ // });
39
+ // });
40
40
 
41
41
  before(function(done) {
42
42