pangea-server 3.3.94 → 3.3.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.
@@ -17,7 +17,8 @@ function initDatabase(models, seeds, config = {}) {
17
17
  username: (0, helpers_1.getEnvStr)('DB_USERNAME'),
18
18
  password: (0, helpers_1.getEnvStr)('DB_PASSWORD'),
19
19
  database: (0, helpers_1.getEnvStr)('DB_DATABASE'),
20
- pool: { max: 10, min: 2, idle: 30000, acquire: 60000 },
20
+ pool: { max: 5, min: 0, acquire: 30000, idle: 15000, evict: 5000 },
21
+ timezone: '+00:00',
21
22
  models: Object.values(models),
22
23
  logging: config.logging ? logQuery : false,
23
24
  benchmark: true,
@@ -305,18 +305,23 @@ function getFinalOrder(order, config = {}) {
305
305
  return [...finalOrder, ...(!config.attributes ? [['createdAt', 'DESC']] : [])];
306
306
  }
307
307
  function processInstance(model, instance) {
308
- for (const [relName] of Object.entries(model.Relations)) {
309
- const relInstance = instance[relName];
310
- if (!relInstance)
311
- continue;
312
- const relModel = model.Relations[relName].getModelFn();
313
- if (Array.isArray(relInstance)) {
314
- relInstance.forEach((instance) => processInstance(relModel, instance));
315
- }
316
- else {
317
- processInstance(relModel, relInstance);
318
- }
319
- }
308
+ // ----------------------
309
+ // TODO
310
+ // No necesito esto ahora pero cuando lo active
311
+ // porque agregue el "instance.init?.(lang)"
312
+ // hay varios virtuals de relaciones que se van a romper.
313
+ // Ejemplo: amountInClientCoin en Asset de Spendix
314
+ // ----------------------
315
+ // for (const [relName] of Object.entries(model.Relations)) {
316
+ // const relInstance = (instance as any)[relName];
317
+ // if (!relInstance) continue;
318
+ // const relModel = model.Relations[relName].getModelFn();
319
+ // if (Array.isArray(relInstance)) {
320
+ // relInstance.forEach((instance) => processInstance(relModel, instance));
321
+ // } else {
322
+ // processInstance(relModel, relInstance);
323
+ // }
324
+ // }
320
325
  return instance.toJSON();
321
326
  }
322
327
  function processInstances(model, instances) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pangea-server",
3
3
  "description": "",
4
- "version": "3.3.94",
4
+ "version": "3.3.96",
5
5
  "files": [
6
6
  "dist"
7
7
  ],