common-rod 1.5.6 → 1.5.7

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/rodSession.js CHANGED
@@ -222,6 +222,9 @@ RodSession.prototype = function () {
222
222
  // this.debug("get cache instance mongo.collection=" + colName)
223
223
  }
224
224
  return this.app._rod.collection[colName];
225
+ },
226
+ getDb : () => {
227
+ return this.db;
225
228
  }
226
229
  }
227
230
  }
@@ -52,7 +52,7 @@ function ipOrHost(obj, key, value){
52
52
  }else{
53
53
  //HOSTS
54
54
  // let port = resolve(key.substring(0,key.lastIndexOf("."))+".port", obj);
55
- console.log(9988899);
55
+ // console.log(9988899);
56
56
  return true;
57
57
  }
58
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "common-rod",
3
- "version": "1.5.6",
3
+ "version": "1.5.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -19,7 +19,7 @@
19
19
  "express": "^4.17.1",
20
20
  "js-yaml": "^3.14.0",
21
21
  "lodash": "^4.17.20",
22
- "mongodb": "^3.3.2",
22
+ "mongodb": "^3.7.1",
23
23
  "randomstring": "^1.1.5",
24
24
  "swagger-ui-express": "^4.1.4"
25
25
  }
package/readme.md CHANGED
@@ -279,4 +279,15 @@ Handle case axios.defaults.transformResponse axios version 0.21.4
279
279
  ```
280
280
  ### Added
281
281
  ### Changed
282
+ ### Fixed
283
+
284
+ # [1.5.7] - 2021-12-03
285
+ ### Added
286
+ ```
287
+ add mongo utils to get db
288
+
289
+ //example
290
+ let db = this.utils().mongo().getDb();
291
+ ```
292
+ ### Changed
282
293
  ### Fixed