@open-norantec/herbal 1.0.2-alpha.3 → 1.0.2-alpha.5
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/sequelize-di.js
CHANGED
|
@@ -46,12 +46,10 @@ function Table(_a) {
|
|
|
46
46
|
newOptions.indexes = [];
|
|
47
47
|
newOptions.indexes = Array.from(Array.isArray(indexes) ? indexes : []).map(function (item, index) {
|
|
48
48
|
if (typeof item === 'string') {
|
|
49
|
-
return
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
];
|
|
49
|
+
return {
|
|
50
|
+
name: "sidx__".concat(index),
|
|
51
|
+
fields: [item],
|
|
52
|
+
};
|
|
55
53
|
}
|
|
56
54
|
return item;
|
|
57
55
|
}).concat({
|
|
@@ -102,9 +102,6 @@ var ControllerInterceptor = (function () {
|
|
|
102
102
|
_.attempt(function () {
|
|
103
103
|
_this.getLogger().log("[trace:".concat(request === null || request === void 0 ? void 0 : request.traceId, ":response:url] ").concat(request === null || request === void 0 ? void 0 : request.originalUrl));
|
|
104
104
|
});
|
|
105
|
-
_.attempt(function () {
|
|
106
|
-
return _this.getLogger().log("[trace:".concat(request === null || request === void 0 ? void 0 : request.traceId, ":request:body] ").concat(JSON.stringify(request === null || request === void 0 ? void 0 : request.body)));
|
|
107
|
-
});
|
|
108
105
|
_.attempt(function () {
|
|
109
106
|
return _this.getLogger().log("[trace:".concat(request === null || request === void 0 ? void 0 : request.traceId, ":request:headers] ").concat(JSON.stringify(request === null || request === void 0 ? void 0 : request.headers)));
|
|
110
107
|
});
|
|
@@ -229,6 +226,7 @@ function HerbalGuard(options) {
|
|
|
229
226
|
else {
|
|
230
227
|
request.rawBody = null;
|
|
231
228
|
}
|
|
229
|
+
_.attempt(function () { return _this.getLogger().log("[trace:".concat(request === null || request === void 0 ? void 0 : request.traceId, ":request:body] ").concat(request.rawBody)); });
|
|
232
230
|
authAdapters = auth_adapter_decorator_1.AuthAdapters.getAdapters((_g = (_f = context === null || context === void 0 ? void 0 : context.getClass) === null || _f === void 0 ? void 0 : _f.call(context)) === null || _g === void 0 ? void 0 : _g.prototype, request.methodName);
|
|
233
231
|
_m.label = 18;
|
|
234
232
|
case 18:
|
|
@@ -272,6 +270,16 @@ function HerbalGuard(options) {
|
|
|
272
270
|
});
|
|
273
271
|
});
|
|
274
272
|
};
|
|
273
|
+
HerbalGuardMixin.prototype.getLogger = function () {
|
|
274
|
+
var loggerService = this.ref.get(logger_service_1.LoggerService, { strict: false });
|
|
275
|
+
if (!(loggerService instanceof logger_service_1.LoggerService)) {
|
|
276
|
+
return {
|
|
277
|
+
log: function () { },
|
|
278
|
+
error: function () { },
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
return loggerService;
|
|
282
|
+
};
|
|
275
283
|
HerbalGuardMixin = __decorate([
|
|
276
284
|
(0, common_2.Injectable)(),
|
|
277
285
|
__metadata("design:paramtypes", [core_1.ModuleRef])
|