express-toolkit 0.7.0 → 0.8.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-toolkit",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "files": [
5
5
  "index.js",
6
6
  "src/"
@@ -16,7 +16,7 @@
16
16
  "test": "nyc --reporter=text ava test/*.spec.js --verbose",
17
17
  "test-ci": "npx nyc --reporter=lcov ava test/*.spec.js --verbose",
18
18
  "commit": "npx git-cz",
19
- "pre-commit": "npm run lint && depcheck && npm run test",
19
+ "pre-commit": "npm run lint && npm run test",
20
20
  "changelog": "npx easy-changelog --out=./CHANGELOG.md",
21
21
  "release": "sh scripts/release.sh"
22
22
  },
@@ -34,7 +34,7 @@
34
34
  "express"
35
35
  ],
36
36
  "dependencies": {
37
- "express": "^4.17.1",
37
+ "express": "^4.17.3",
38
38
  "json8-patch": "^1.0.4",
39
39
  "mongoose": "^5.12.3",
40
40
  "throwable-http-errors": "^2.1.0"
@@ -42,16 +42,17 @@
42
42
  "devDependencies": {
43
43
  "ava": "^3.8.1",
44
44
  "body-parser": "^1.19.0",
45
- "eslint": "^5.16.0",
46
- "eslint-config-standard": "^12.0.0",
47
- "eslint-plugin-import": "^2.18.2",
48
- "eslint-plugin-node": "^8.0.1",
49
- "eslint-plugin-promise": "^4.2.1",
45
+ "eslint": "^7.32.0",
46
+ "eslint-config-standard": "^16.0.3",
47
+ "eslint-plugin-import": "^2.25.4",
48
+ "eslint-plugin-node": "^11.1.0",
49
+ "eslint-plugin-promise": "^5.2.0",
50
50
  "eslint-plugin-standard": "^4.0.1",
51
51
  "husky": "^1.3.1",
52
- "mongodb-memory-server": "^5.2.11",
53
- "nyc": "^14.1.1",
52
+ "mongodb-memory-server": "^8.4.0",
53
+ "nyc": "^15.1.0",
54
54
  "sinon": "^7.5.0",
55
- "supertest": "^4.0.2"
55
+ "supertest": "^4.0.2",
56
+ "uuid": "^8.3.2"
56
57
  }
57
58
  }
package/src/controller.js CHANGED
@@ -20,11 +20,13 @@ class Controller {
20
20
  * @param {String} [config.id] The attribute to use as primary key for findById, updateById and deleteById. Defaults to _id.
21
21
  * @param {Number} [config.defaultSkipValue] The default skip value to be used in find() queries
22
22
  * @param {Number} [config.defaultLimitValue] The default skip value to be used in find() queries
23
+ * @param {Number} [config.useUpdateOne] If set to true, updateById method will use mongoose's Model.updateOne() instead of Document.save()
23
24
  */
24
25
  constructor (config) {
25
26
  this.Model = config.model
26
27
  this.id = config.id || '_id'
27
28
  this.name = config.name
29
+ this.useUpdateOne = Boolean(config.useUpdateOne) || false
28
30
  this.defaultSkipValue = config.defaultSkipValue || DEFAULT_SKIP_VALUE
29
31
  this.defaultLimitValue = config.defaultLimitValue || DEFAULT_LIMIT_VALUE
30
32
  this.__hooks = {}
@@ -37,10 +39,10 @@ class Controller {
37
39
  async find (query) {
38
40
  let skip = this.defaultSkipValue
39
41
  let limit = this.defaultLimitValue
40
- if (query.hasOwnProperty('limit')) {
42
+ if (Object.prototype.hasOwnProperty.call(query, 'limit')) {
41
43
  limit = Number(query.limit)
42
44
  }
43
- if (query.hasOwnProperty('skip')) {
45
+ if (Object.prototype.hasOwnProperty.call(query, 'skip')) {
44
46
  skip = Number(query.skip)
45
47
  }
46
48
 
@@ -180,7 +182,7 @@ class Controller {
180
182
  const instances = await this.Model.find(query)
181
183
 
182
184
  for (const instance of instances) {
183
- for (var k in update) {
185
+ for (const k in update) {
184
186
  instance.set(k, update[k])
185
187
  }
186
188
 
@@ -207,7 +209,7 @@ class Controller {
207
209
  throw new Errors.NotFound()
208
210
  }
209
211
 
210
- for (var k in update) {
212
+ for (const k in update) {
211
213
  instance.set(k, update[k])
212
214
  }
213
215
 
@@ -216,7 +218,13 @@ class Controller {
216
218
  throw new Errors.BadRequest(validationError.message)
217
219
  }
218
220
 
219
- return instance.save()
221
+ if (this.useUpdateOne) {
222
+ await this.Model.updateOne({ [this.id]: id }, update)
223
+
224
+ return instance.toJSON()
225
+ } else {
226
+ return instance.save()
227
+ }
220
228
  }
221
229
 
222
230
  /**
@@ -233,7 +241,7 @@ class Controller {
233
241
  throw new Errors.NotFound()
234
242
  }
235
243
  // Primary identifiers cannot be replaced
236
- replacement['_id'] = instance._id
244
+ replacement._id = instance._id
237
245
  replacement[this.id] = instance[this.id]
238
246
  instance.overwrite(replacement)
239
247
 
package/src/router.js CHANGED
@@ -48,10 +48,12 @@ const defaultEndpoints = {
48
48
  * @param {Object} config
49
49
  * @param {Object} config.controller
50
50
  * @param {Object} [config.endpoints] Map<String,Boolean>
51
+ * @param {String} [config.id] The named route parameter to use as id. Defaults to "id"
51
52
  * @param {Object} [config.options] Express router options. As described in https://expressjs.com/en/api.html#express.router
52
53
  */
53
54
  function buildRouter (config) {
54
55
  config.options = config.options || {}
56
+ config.id = config.id || 'id'
55
57
  const router = express.Router(config.options)
56
58
  if (!(config.controller instanceof Controller)) {
57
59
  throw new Error('config.controller must be an instance of Controller')
@@ -64,7 +66,7 @@ function buildRouter (config) {
64
66
  const endpointsMap = Object.assign({}, defaultEndpoints, config.endpoints)
65
67
 
66
68
  const findByIdMiddleware = asyncMiddleware(async (req, res, next) => {
67
- const resource = await config.controller.findById(req.params.id, req.query)
69
+ const resource = await config.controller.findById(req.params[config.id], req.query)
68
70
  req.toSend = resource
69
71
  return next()
70
72
  })
@@ -76,7 +78,7 @@ function buildRouter (config) {
76
78
  })
77
79
 
78
80
  const updateByIdMiddleware = asyncMiddleware(async (req, res, next) => {
79
- const resource = await config.controller.updateById(req.params.id, req.body, req.query)
81
+ const resource = await config.controller.updateById(req.params[config.id], req.body, req.query)
80
82
  req.toSend = resource
81
83
  return next()
82
84
  })
@@ -88,7 +90,7 @@ function buildRouter (config) {
88
90
  })
89
91
 
90
92
  const deleteByIdMiddleware = asyncMiddleware(async (req, res, next) => {
91
- await config.controller.deleteById(req.params.id)
93
+ await config.controller.deleteById(req.params[config.id])
92
94
  req.toSend = null
93
95
  return next()
94
96
  })
@@ -114,13 +116,13 @@ function buildRouter (config) {
114
116
  })
115
117
 
116
118
  const patchByIdMiddleware = asyncMiddleware(async (req, res, next) => {
117
- const resource = await config.controller.patchById(req.params.id, req.body)
119
+ const resource = await config.controller.patchById(req.params[config.id], req.body)
118
120
  req.toSend = resource
119
121
  return next()
120
122
  })
121
123
 
122
124
  const replaceByIdMiddleware = asyncMiddleware(async (req, res, next) => {
123
- const resource = await config.controller.replaceById(req.params.id, req.body)
125
+ const resource = await config.controller.replaceById(req.params[config.id], req.body)
124
126
  req.toSend = resource
125
127
  return next()
126
128
  })
@@ -138,7 +140,7 @@ function buildRouter (config) {
138
140
  },
139
141
  findById: {
140
142
  method: 'get',
141
- path: '/:id',
143
+ path: `/:${config.id}`,
142
144
  middleware: findByIdMiddleware
143
145
  },
144
146
  create: {
@@ -148,7 +150,7 @@ function buildRouter (config) {
148
150
  },
149
151
  updateById: {
150
152
  method: 'put',
151
- path: '/:id',
153
+ path: `/:${config.id}`,
152
154
  middleware: updateByIdMiddleware
153
155
  },
154
156
  updateByQuery: {
@@ -158,7 +160,7 @@ function buildRouter (config) {
158
160
  },
159
161
  deleteById: {
160
162
  method: 'delete',
161
- path: '/:id',
163
+ path: `/:${config.id}`,
162
164
  middleware: deleteByIdMiddleware
163
165
  },
164
166
  deleteByQuery: {
@@ -168,12 +170,12 @@ function buildRouter (config) {
168
170
  },
169
171
  patchById: {
170
172
  method: 'patch',
171
- path: '/:id',
173
+ path: `/:${config.id}`,
172
174
  middleware: patchByIdMiddleware
173
175
  },
174
176
  replaceById: {
175
177
  method: 'put',
176
- path: '/:id/replace',
178
+ path: `/:${config.id}/replace`,
177
179
  middleware: replaceByIdMiddleware
178
180
  }
179
181
 
package/CHANGELOG.md DELETED
@@ -1,130 +0,0 @@
1
- # 📦 0.7.0 (27 Jul 2021)
2
- - [11940](https://github.com/fatmatto/express-toolkit/commit/1194068d0b079d638a4fb7d7328f29ea85f066e2) 📦 Release 0.7.0
3
- - [ba77c](https://github.com/fatmatto/express-toolkit/commit/ba77ca82981334d42d37b9171e9f602bde6248ff) doc: negative projection
4
- - [bc133](https://github.com/fatmatto/express-toolkit/commit/bc133267c092b1cf4319037ee2bac96e44ed32bb) feat: support negative projection
5
- - [9f75e](https://github.com/fatmatto/express-toolkit/commit/9f75e8903fe24fcc0ba8de213d9af0839588532b) chore: update dependencies
6
- - [6292e](https://github.com/fatmatto/express-toolkit/commit/6292ed61b04fd59d463fb563b36e0137d52c64d9) Bump normalize-url from 4.5.0 to 4.5.1 (#37)
7
- - [1ea19](https://github.com/fatmatto/express-toolkit/commit/1ea1932a22aed8cc38e8efad6d3e7dd267d8acbb) Bump glob-parent from 5.1.1 to 5.1.2 (#36)
8
- - [68135](https://github.com/fatmatto/express-toolkit/commit/68135a5fdffdb96f0fabac05e09fd61f57a4c5f5) Bump bson from 1.1.1 to 1.1.6 (#34)
9
- - [8a1c2](https://github.com/fatmatto/express-toolkit/commit/8a1c2665dc466f185857d35649d4ce6160e4572e) Bump hosted-git-info from 2.7.1 to 2.8.9 (#35)
10
- - [ec3ba](https://github.com/fatmatto/express-toolkit/commit/ec3ba3a603fd4a5ebb660788f3fe74a8919f8d09) fix: package.json & package-lock.json to reduce vulnerabilities (#32)
11
- - [3f461](https://github.com/fatmatto/express-toolkit/commit/3f461771eecc6efa48b7e29ad4f96c8a3cc1ded4) Bump y18n from 4.0.0 to 4.0.1 (#31)
12
- - [73e4e](https://github.com/fatmatto/express-toolkit/commit/73e4e18d18c6c6d05baf54319f61904e1ad4e066) fix: package.json & package-lock.json to reduce vulnerabilities (#30)
13
- - [1ed9b](https://github.com/fatmatto/express-toolkit/commit/1ed9ba4d8c699898a70c719f3b42626ec252c96d) 📒 Update CHANGELOG
14
- # 📦 0.6.0 (31 Dec 2020)
15
- - [d1c58](https://github.com/fatmatto/express-toolkit/commit/d1c589e5c4772f92c77bbf9e8294bf05ad76fa20) 📦 Release 0.6.0
16
- - [1f478](https://github.com/fatmatto/express-toolkit/commit/1f47842693f8106bcb8c0be324eee75ecfc530bd) doc: update readme updateByQuery
17
- - [d51e2](https://github.com/fatmatto/express-toolkit/commit/d51e2662c13413c83cead30b352948b697d2a54f) fix: updateByQuery should update multiple matching documents (#29)
18
- - [bdf2f](https://github.com/fatmatto/express-toolkit/commit/bdf2f82ddc2a29928bec807c6fe750a36e8ccfb6) 📒 Update CHANGELOG
19
- # 📦 0.5.1 (19 Dec 2020)
20
- - [f018a](https://github.com/fatmatto/express-toolkit/commit/f018ade73275cd168560bca97c4bdf3583b06bb2) 📦 Release 0.5.1
21
- - [b568d](https://github.com/fatmatto/express-toolkit/commit/b568dcc904c6386c6146db230c439c98d1a37796) chore: update dependencies
22
- - [ebf8a](https://github.com/fatmatto/express-toolkit/commit/ebf8ae87d86dd65234eb2f689ac9ca6a0f930f84) chore: update dependencies
23
- - [de84d](https://github.com/fatmatto/express-toolkit/commit/de84d92c2b62337763c6603d6273a22f03fb9dc1) security: update dependencies
24
- - [3ddc7](https://github.com/fatmatto/express-toolkit/commit/3ddc7799f92780681953d42e38233442a4173421) Bump lodash from 4.17.14 to 4.17.19 (#26)
25
- - [c6830](https://github.com/fatmatto/express-toolkit/commit/c68305084a189787be313e319eb264b40f60bb3c) 📒 Update CHANGELOG
26
- # 📦 0.5.0 (6 May 2020)
27
- - [33232](https://github.com/fatmatto/express-toolkit/commit/33232e8b4405589c10c52afe111a493ef1f94f5c) 📦 Release 0.5.0
28
- - [39086](https://github.com/fatmatto/express-toolkit/commit/39086213eea765b21237cddb2b7a2d264bdea2cf) Resource hooks (#25)
29
- - [5bf27](https://github.com/fatmatto/express-toolkit/commit/5bf2712a23c2d6f57b967e04a79d0745958a429e) 📒 Update CHANGELOG
30
- # 📦 0.4.1 (15 Apr 2020)
31
- - [1b660](https://github.com/fatmatto/express-toolkit/commit/1b660e06e70f93468292133c8899f9410b6f3c9f) 📦 Release 0.4.1
32
- - [359b4](https://github.com/fatmatto/express-toolkit/commit/359b4378d4d6cfb24fd5a7496904c19567bf940f) bugfix: replaceById should correctly handle custom IDs
33
- - [62b07](https://github.com/fatmatto/express-toolkit/commit/62b0729beee92d36077e363b6d1779517619a357) 📒 Update CHANGELOG
34
- # 📦 0.4.0 (14 Apr 2020)
35
- - [1b44c](https://github.com/fatmatto/express-toolkit/commit/1b44caafa2c7c27240bdbe779380170b54949993) 📦 Release 0.4.0
36
- - [d630d](https://github.com/fatmatto/express-toolkit/commit/d630df7a6a565188be27bcc6f56bd7013f2a24b9) Replace resource isntances by Id (#24)
37
- - [5d5f1](https://github.com/fatmatto/express-toolkit/commit/5d5f10137e220d670dc2911da88af89949f6866c) chore: 🤖 Improved package.json scripts
38
- - [e65cf](https://github.com/fatmatto/express-toolkit/commit/e65cf4f09996be48b35d58a1f816f02dcdf42c75) docs: Add docsify documentation
39
- - [6cda1](https://github.com/fatmatto/express-toolkit/commit/6cda1e8c2f3d8347533196d6e03804c316d9206f) Bump acorn from 6.1.1 to 6.4.1 (#22)
40
- - [a7d4c](https://github.com/fatmatto/express-toolkit/commit/a7d4cc5a2ce0b4dfcb9d62ea1adcde9229d29413) Patch resource (#21)
41
- - [884e3](https://github.com/fatmatto/express-toolkit/commit/884e34ae240d9217257d9ad438f3ead26f931608) Resource router fix (#20)
42
- - [f9204](https://github.com/fatmatto/express-toolkit/commit/f920415247e4ee53274705b1e985fa6eb2028e9f) Fix: upgrade dependencies according to npm audit to solve security issues
43
- - [0a3c2](https://github.com/fatmatto/express-toolkit/commit/0a3c292ce87ca3f0cfd4e7a62d040ace0f872a09) Fix changelog
44
- - [8da24](https://github.com/fatmatto/express-toolkit/commit/8da24ee82b0aad9b2f679e09b2ee5a5f810adb83) 📒 Update CHANGELOG
45
- # 📦 0.3.2 (20 Feb 2020)
46
- - [f568a](https://github.com/fatmatto/express-toolkit/commit/f568a6d5a07c3b4285e0facaa23fa2ec9eaeb7c5) 📦 Release 0.3.2
47
- - [4bb43](https://github.com/fatmatto/express-toolkit/commit/4bb438f97b25e99fecdff3d1c4d6e4915760d984) Refactor: use a getter to access the resource's router
48
- # 📦 0.3.1 (8 Feb 2020)
49
- - [677f6](https://github.com/fatmatto/express-toolkit/commit/677f635fea8ba7c67a89b924374c87615c3b51c8) 📦 Release 0.3.1
50
- - [0a93b](https://github.com/fatmatto/express-toolkit/commit/0a93bafdf2ea3b783934a8cd910a6642297fdfa3) Update the release script to generate changelog AFTER the tag is pushed
51
- - [f3c0e](https://github.com/fatmatto/express-toolkit/commit/f3c0e0a42d99018b0a7b40c120e5e89eb997fd8a) Merge pull request #17 from fatmatto/router-refactor
52
- - [24a92](https://github.com/fatmatto/express-toolkit/commit/24a923c5e111c5784f4173483a831e8ba3c42957) Remove node 6 from travis-ci config since we will ot support it, remove deprecated key in travis-ci config.
53
- - [d845e](https://github.com/fatmatto/express-toolkit/commit/d845e466271be50db7c66a8d6f2eb10f06450a3c) Update the travis-ci config to test from node 6 to node lts
54
- - [ab204](https://github.com/fatmatto/express-toolkit/commit/ab2047a2dcd5a363935e0ca3ab22d6430f03228f) Refactor router and add pre:*, post:* hooks
55
- - [3df7e](https://github.com/fatmatto/express-toolkit/commit/3df7ea768c2ce4dda194dd3fdcb078a26ebc2a61) Docs: add changelog
56
- - [e6586](https://github.com/fatmatto/express-toolkit/commit/e6586cc7031789d2b3384332b678c25525ecd21c) Chore: switch to easy-changelog
57
- # 📦 0.3.0 (19 Dec 2019)
58
- - [6286c](https://github.com/fatmatto/express-toolkit/commit/6286cdcbcfe13d15ff7eb7a686156cf12303a552) 📦 Release 0.3.0
59
- - [2c1ea](https://github.com/fatmatto/express-toolkit/commit/2c1ea6f6badfc8fdc3728dc1648deb1c24bbf5e3) Chore: switch to simple-changelog
60
- - [c637b](https://github.com/fatmatto/express-toolkit/commit/c637bd1867f54b5fd51d131b3df8b0c3ac1db4b4) Merge pull request #16 from fatmatto/resources
61
- - [55bf0](https://github.com/fatmatto/express-toolkit/commit/55bf0a14681b5c14152a026f1a1172bc3919bd36) Doc: improve inline docs of controller
62
- - [45f15](https://github.com/fatmatto/express-toolkit/commit/45f15050e98e5438a9458928aa352c96d4b04fe5) Doc: improve inline docs of controller
63
- - [0ff06](https://github.com/fatmatto/express-toolkit/commit/0ff063a983a8ce60a14e91cd02b76c5792a2fb8b) Feat: add the Resource class
64
- - [34dbb](https://github.com/fatmatto/express-toolkit/commit/34dbb1b66980b9355c57748e1da1a2ca6677ba07) Lint: Remove unused variable
65
- - [e122d](https://github.com/fatmatto/express-toolkit/commit/e122da9ec09af5072c41ec7eaec4dce7434a2b0d) Lint: switch let to const for immutable variables
66
- # 📦 0.2.7 (12 Nov 2019)
67
- - [bb2b1](https://github.com/fatmatto/express-toolkit/commit/bb2b162e7c22ddf94a42f7357f93cefdb8fa4133) 📦 Release 0.2.7
68
- - [96903](https://github.com/fatmatto/express-toolkit/commit/96903250e90cae5accf1aeab880f70c482fa121d) Fix #15
69
- - [35946](https://github.com/fatmatto/express-toolkit/commit/35946b1d4455857eaf36e5dd64f667fda9ee2f29) Merge pull request #14 from fatmatto/update-dependencies
70
- - [00f71](https://github.com/fatmatto/express-toolkit/commit/00f713760e2c1844219266a82a7b9beb318c0e87) Update dependencies and test code accordingly
71
- - [77060](https://github.com/fatmatto/express-toolkit/commit/77060e395cbf973b561b6e49da4ef9dd7f19ed71) Merge pull request #13 from fatmatto/fields-selection
72
- - [82dc1](https://github.com/fatmatto/express-toolkit/commit/82dc10075e06da43cb8fb1bb5c2d24e5142e40ec) Implement projection
73
- # 📦 0.2.6 (12 Sep 2019)
74
- - [66f9a](https://github.com/fatmatto/express-toolkit/commit/66f9a4f833ac4e89f7fb8bc9ba68054e74185cc9) 📦 Release 0.2.6
75
- - [edfe4](https://github.com/fatmatto/express-toolkit/commit/edfe4dbe123b5030a75090ccb6e449ee1fcd3110) Merge branch 'master' of https://github.com/fatmatto/express-toolkit
76
- - [9b6fe](https://github.com/fatmatto/express-toolkit/commit/9b6fe381cdc3efe0dd1e88900d44e54090c25614) (feature) Implemented endpoints parameter for buildRouter function
77
- - [a5fd1](https://github.com/fatmatto/express-toolkit/commit/a5fd1825320b3e9d28cdd0cb92a540286afd12fb) Update README.md
78
- - [c1453](https://github.com/fatmatto/express-toolkit/commit/c145378c19476cd11c854c44c98ec03f244d8909) Merge branch '9-implement-bulk-operations'
79
- - [1dc93](https://github.com/fatmatto/express-toolkit/commit/1dc932a762ca2fce780af0c098bceb3b003310f6) Merge branch 'master' of https://github.com/fatmatto/express-toolkit
80
- - [918a4](https://github.com/fatmatto/express-toolkit/commit/918a4d13a2f530fbb451c170ea5ac54f7c1b7152) Update readme
81
- - [d3c73](https://github.com/fatmatto/express-toolkit/commit/d3c731116f44141146014ed9c83c02de76a489f5) Add bulk create and tests
82
- - [43aca](https://github.com/fatmatto/express-toolkit/commit/43aca693d0e0416d126740853c25793b09e479d7) Merge pull request #10 from fatmatto/dependabot/npm_and_yarn/eslint-utils-1.4.2
83
- - [5cd3c](https://github.com/fatmatto/express-toolkit/commit/5cd3c35d12236b9fa68e3024d11967bcde9ac116) Bump eslint-utils from 1.3.1 to 1.4.2
84
- # 📦 0.2.5 (25 Aug 2019)
85
- - [fdeba](https://github.com/fatmatto/express-toolkit/commit/fdebaa018e7dd3648518c78746aa733010d9d6bc) 📦 Release 0.2.5
86
- - [a4c50](https://github.com/fatmatto/express-toolkit/commit/a4c50b3e35f8699f06ae9b560c205d0d67f1cf86) Update release script
87
- # 📦 0.2.4 (25 Aug 2019)
88
- - [cb1bf](https://github.com/fatmatto/express-toolkit/commit/cb1bfff21e5f867100cbaf516644a11c88baa270) 📦 Release 0.2.4
89
- - [25c44](https://github.com/fatmatto/express-toolkit/commit/25c44d9925db75e4ddad1994d4301202da5a34cf) Add the pre:finalize hook
90
- - [a0d6b](https://github.com/fatmatto/express-toolkit/commit/a0d6b71f142e0173432876bd40bcbea7bf9a3707) Merge pull request #8 from fatmatto/codeclimate-coverage
91
- - [146c7](https://github.com/fatmatto/express-toolkit/commit/146c769b2bf46dcf67be5bc37991323fa2b005e9) setup codeclimate coverage
92
- - [9e480](https://github.com/fatmatto/express-toolkit/commit/9e4804259ecf7f0408b18d08e757fa246bd8a21a) fix lint issues
93
- # 📦 0.2.3 (26 Jul 2019)
94
- - [afc24](https://github.com/fatmatto/express-toolkit/commit/afc244df14c25c61fcf24af934a3de156a4e05c0) 📦 Release 0.2.3
95
- - [39b7c](https://github.com/fatmatto/express-toolkit/commit/39b7c3cc7bd778b10916369f070f80e9cc00b334) Using countDocuments instead of count in mongoose models, because of deprecation
96
- - [99d5a](https://github.com/fatmatto/express-toolkit/commit/99d5a62b2c11799b62db531cd1641fcb9f3d0c78) Merge pull request #7 from fatmatto/issue-6
97
- - [6f99f](https://github.com/fatmatto/express-toolkit/commit/6f99f7bbfeb0def5058895186a113e6d10955161) Improved test suite
98
- - [c0590](https://github.com/fatmatto/express-toolkit/commit/c05902d042226b8a1c829d57354619f388d5b031) Allow custom primary key attribute other than _id
99
- # 📦 0.2.2 (22 Jul 2019)
100
- - [128cd](https://github.com/fatmatto/express-toolkit/commit/128cd2148f906b48689bd31555f89b061cac4a5b) 📦 Release 0.2.2
101
- - [b8ea1](https://github.com/fatmatto/express-toolkit/commit/b8ea13a51f658a29a015947d3c0d0f8983dff9b9) Whitelist files for npm release
102
- # 📦 0.2.1 (22 Jul 2019)
103
- - [64661](https://github.com/fatmatto/express-toolkit/commit/6466166cb3b35d3c802e8b38c794949e61967419) 📦 Release 0.2.1
104
- - [04768](https://github.com/fatmatto/express-toolkit/commit/04768d90661d3dab1449e143a3b53d5149de2b5b) Add repository field to package.json
105
- - [c8269](https://github.com/fatmatto/express-toolkit/commit/c8269c1b1debf322f33e5e3c72abdcc65ce5894c) Update lodash dependency
106
- - [48e9f](https://github.com/fatmatto/express-toolkit/commit/48e9f88b1e95c52d7470b57825d1c43e29bd19d6) cherry pick changes from PR #5
107
- - [ca6d6](https://github.com/fatmatto/express-toolkit/commit/ca6d64cb1d21266ba67c59ccfcc5c856c2560cf2) No console logs
108
- - [24823](https://github.com/fatmatto/express-toolkit/commit/248234ab6c26c631d58cfc4ab6b85b28b118d0e8) Switched from Model.remove to new mongoose methods since remove is going to be deprecated
109
- - [0c6fe](https://github.com/fatmatto/express-toolkit/commit/0c6fe9bf3ded257e3283b95a8dd31442fefc6f3a) Using new url parser in mongoose helper since old one is going to be deprecated
110
- - [aad40](https://github.com/fatmatto/express-toolkit/commit/aad40b2a434cec105da883eb0f022c9969a6d741) Merge branch 'master' of https://github.com/fatmatto/express-toolkit
111
- - [eda52](https://github.com/fatmatto/express-toolkit/commit/eda521cda4c4e246031d28dce60f8ea4fd6e7715) (doc) Add hooks documentation to README [ci skip]
112
- - [f2bf9](https://github.com/fatmatto/express-toolkit/commit/f2bf91179c36480357647bb363f6f1a3feec57f6) Added codecov badge
113
- - [7854b](https://github.com/fatmatto/express-toolkit/commit/7854bd2473ffdf96709339a87fd32a3e7f0a17ae) Merge branch 'master' of https://github.com/fatmatto/express-toolkit
114
- - [bb026](https://github.com/fatmatto/express-toolkit/commit/bb026de960f11af9c44c071dd6905a7c14f16ad2) Add codecov.io integration
115
- # 📦 0.2.0 (8 May 2019)
116
- - [7d9ba](https://github.com/fatmatto/express-toolkit/commit/7d9ba145ac496023e15d8b841b22c4dd79b36f83) 📦 Release 0.2.0
117
- - [48336](https://github.com/fatmatto/express-toolkit/commit/483366021b1ce75354ebef6391f2e7668337abba) 🎀 Added badges
118
- - [1507f](https://github.com/fatmatto/express-toolkit/commit/1507f65ccdcb755c25b5743768053ce52ad4e1ee) 📖 added README
119
- # 📦 0.1.0 (7 May 2019)
120
- - [8aed9](https://github.com/fatmatto/express-toolkit/commit/8aed9e2d7030912c1972ea19968e7a6e18714ffd) 📦 Release 0.1.0
121
- - [b84ae](https://github.com/fatmatto/express-toolkit/commit/b84ae63025175af3b59b0c1ec820d2e8ed1eaec3) Added endpoint hooks
122
- # 📦 0.0.3 (29 Apr 2019)
123
- - [99cad](https://github.com/fatmatto/express-toolkit/commit/99cadffd6bb6a00c5288aa6b4bd2c2cf05b98d3e) 📦 Release 0.0.3
124
- - [10b10](https://github.com/fatmatto/express-toolkit/commit/10b10158ce5bc8c8e453ee8d0550bcd32dfe4aad) Add unit tests for isJSON function
125
- - [4bab7](https://github.com/fatmatto/express-toolkit/commit/4bab732dd065556ae4e4de1fab80b305381b20c7) refactored default endpoints
126
- # 📦 0.0.2 (25 Apr 2019)
127
- - [1ef81](https://github.com/fatmatto/express-toolkit/commit/1ef81cb3869d4519d04924775edd34669f21fa21) 📦 Release 0.0.2
128
- - [b3eda](https://github.com/fatmatto/express-toolkit/commit/b3edaf41d1aadef1d4993dfb94a0550283c299a2) (build) Added test-ci command for travis
129
- - [5c2a5](https://github.com/fatmatto/express-toolkit/commit/5c2a5e005d0107db210331291505156733754f89) (chore) added travis
130
- - [b13dd](https://github.com/fatmatto/express-toolkit/commit/b13dd21672352b376f406fe6e4300f8e30b0f0ce) 🚀 First commit