@bluedot-innovation/models 6.2.7 → 6.2.8

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/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 6.2.8
2
+ - Change `shouldSync` default in Project to false
3
+
1
4
  ## 6.2.7
2
5
  - Add `shouldSync` to Project
3
6
 
@@ -12,7 +12,7 @@
12
12
  "securityToken" : "value"
13
13
  }
14
14
  }],
15
- "shouldSync": false,
15
+ "shouldSync": true,
16
16
  "firebaseApiKey": "88888888-4444-4444-4444-121212121212",
17
17
  "apiKey": "88888888-4444-4444-4444-123412341234",
18
18
  "integrations":{
@@ -39,11 +39,11 @@ testCase('Project', () => {
39
39
  })
40
40
  })
41
41
 
42
- assertions('should set the value of shouldSync to true when it is not defined', (done) => {
42
+ assertions('should set the value of shouldSync to false when it is not defined', (done) => {
43
43
  let project = JSON.parse(JSON.stringify(require('./project.remote.config.json')))
44
44
  delete project.shouldSync
45
45
  let Project = new ProjectModel(project)
46
- assert.equal(Project.shouldSync, true, "shouldSync should be set to true")
46
+ assert.equal(Project.shouldSync, false, "shouldSync should be set to false")
47
47
  Project.validate((err, res) => {
48
48
  assert.notExists(err)
49
49
  done()
package/models/Project.js CHANGED
@@ -38,7 +38,7 @@ let ProjectSchema = new mongoose.Schema({
38
38
  lastUpdateTime: {type: Date, default: Date.now},
39
39
  lastSyncTime: {type: Date, default: Date.now},
40
40
  name: {type: String, required: [true, 'name is required']},
41
- shouldSync: { type: Boolean, default: true },
41
+ shouldSync: { type: Boolean, default: false },
42
42
  accountId: {type: String, required: true, validate: {isAsync: false, validator: helpers.validateUUIDv4, msg: 'default error message'}},
43
43
  webhooks: {type:[WebhookSchema], validate: webhooksValidators},
44
44
  configurationParameters: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluedot-innovation/models",
3
- "version": "6.2.7",
3
+ "version": "6.2.8",
4
4
  "main": "Models.js",
5
5
  "scripts": {
6
6
  "lint": "./node_modules/.bin/eslint -c .eslintrc.js ./models/*.js ./__tests__/**/*.js ./__tests__/**/**/*.js ./schemas/*.js",