pangea-server 1.0.30 → 1.0.32
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/dist/database/db.class.js +10 -5
- package/package.json +1 -1
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.Db = void 0;
|
|
4
7
|
const sequelize_1 = require("sequelize");
|
|
@@ -7,6 +10,7 @@ const _1 = require(".");
|
|
|
7
10
|
// helpers
|
|
8
11
|
const helpers_1 = require("../helpers");
|
|
9
12
|
const pangea_helpers_1 = require("pangea-helpers");
|
|
13
|
+
const util_1 = __importDefault(require("util"));
|
|
10
14
|
class Db {
|
|
11
15
|
constructor(tx) {
|
|
12
16
|
this.__tx = tx;
|
|
@@ -19,11 +23,12 @@ class Db {
|
|
|
19
23
|
if (typeof filters === 'number') {
|
|
20
24
|
return scopedModel.findByPk(filters, { ...getIncludeAndWhere(model, include), ...baseOptions });
|
|
21
25
|
}
|
|
22
|
-
console.log({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
console.log(util_1.default.inspect(getIncludeAndWhere(model, include, filters), {
|
|
27
|
+
depth: null,
|
|
28
|
+
colors: true,
|
|
29
|
+
compact: false,
|
|
30
|
+
showHidden: false, // muestra solo propiedades normales
|
|
31
|
+
}));
|
|
27
32
|
return scopedModel.findOne({
|
|
28
33
|
...getIncludeAndWhere(model, include, filters),
|
|
29
34
|
order: getFinalOrder(order),
|