@bee.js/node 0.0.94 → 0.0.96

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/ORM/beeORM.js CHANGED
@@ -122,6 +122,7 @@ module.exports = {
122
122
  modelSqlSelectFields,
123
123
 
124
124
  createPool: function (configs) {
125
+ if (global.beeDBPool) return global.beeDBPool;
125
126
  // TODO criar aviso de error para falta de configs.db. Criar no hive().create
126
127
 
127
128
  // TODO pegar dinamicamnete database utilizada
@@ -146,7 +147,7 @@ module.exports = {
146
147
  password: db.pass,
147
148
  database: db.name,
148
149
  waitForConnections: db.waitForConnections || true,
149
- connectionLimit: db.connectionLimit || 10,
150
+ connectionLimit: db.connectionLimit || 100,
150
151
  queueLimit: db.queueLimit || 0,
151
152
  });
152
153
 
@@ -162,6 +163,8 @@ module.exports = {
162
163
  }
163
164
  }, db.ping);
164
165
 
166
+ global.beeDBPool = pool;
167
+
165
168
  return pool;
166
169
  }
167
170
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bee.js/node",
3
- "version": "0.0.94",
3
+ "version": "0.0.96",
4
4
  "description": "A JavaScript framework for making Node.js API´s",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/tools/guid.js CHANGED
@@ -18,4 +18,6 @@ module.exports = {
18
18
  },
19
19
 
20
20
  uuidToBin: this.guidToBin,
21
+
22
+ isUUID: str => /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(str)
21
23
  };