@nest-omni/core 3.1.2-1 → 3.1.2-3
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/package.json +1 -1
- package/setup/bootstrap.setup.js +33 -29
package/package.json
CHANGED
package/setup/bootstrap.setup.js
CHANGED
|
@@ -10,34 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.bootstrapSetup = bootstrapSetup;
|
|
13
|
-
const crud_1 = require("@dataui/crud");
|
|
14
|
-
crud_1.CrudConfigService.load({
|
|
15
|
-
auth: {
|
|
16
|
-
property: 'user',
|
|
17
|
-
},
|
|
18
|
-
params: {
|
|
19
|
-
id: {
|
|
20
|
-
field: 'id',
|
|
21
|
-
type: 'string',
|
|
22
|
-
primary: true,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
query: {
|
|
26
|
-
limit: 10,
|
|
27
|
-
alwaysPaginate: true,
|
|
28
|
-
},
|
|
29
|
-
routes: {
|
|
30
|
-
updateOneBase: {
|
|
31
|
-
allowParamsOverride: false,
|
|
32
|
-
},
|
|
33
|
-
deleteOneBase: {
|
|
34
|
-
returnDeleted: false,
|
|
35
|
-
},
|
|
36
|
-
createOneBase: {
|
|
37
|
-
returnShallow: false,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
13
|
const Sentry = require("@sentry/nestjs");
|
|
42
14
|
const profiling_node_1 = require("@sentry/profiling-node");
|
|
43
15
|
const dotenv = require("dotenv");
|
|
@@ -106,6 +78,34 @@ Sentry.init({
|
|
|
106
78
|
sendDefaultPii: true,
|
|
107
79
|
integrations: [profiling_node_1.nodeProfilingIntegration],
|
|
108
80
|
});
|
|
81
|
+
const crud_1 = require("@dataui/crud");
|
|
82
|
+
crud_1.CrudConfigService.load({
|
|
83
|
+
auth: {
|
|
84
|
+
property: 'user',
|
|
85
|
+
},
|
|
86
|
+
params: {
|
|
87
|
+
id: {
|
|
88
|
+
field: 'id',
|
|
89
|
+
type: 'string',
|
|
90
|
+
primary: true,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
query: {
|
|
94
|
+
limit: 10,
|
|
95
|
+
alwaysPaginate: true,
|
|
96
|
+
},
|
|
97
|
+
routes: {
|
|
98
|
+
updateOneBase: {
|
|
99
|
+
allowParamsOverride: false,
|
|
100
|
+
},
|
|
101
|
+
deleteOneBase: {
|
|
102
|
+
returnDeleted: false,
|
|
103
|
+
},
|
|
104
|
+
createOneBase: {
|
|
105
|
+
returnShallow: false,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
109
|
const core_1 = require("@nestjs/core");
|
|
110
110
|
const nestjs_pino_1 = require("nestjs-pino");
|
|
111
111
|
const session = require("express-session");
|
|
@@ -139,7 +139,11 @@ function bootstrapSetup(AppModule, SetupSwagger) {
|
|
|
139
139
|
app.enableShutdownHooks();
|
|
140
140
|
app.enableVersioning();
|
|
141
141
|
app.enable('trust proxy');
|
|
142
|
-
app.
|
|
142
|
+
app.set('query parser', 'extended');
|
|
143
|
+
app.use(bodyParse.urlencoded({
|
|
144
|
+
extended: true,
|
|
145
|
+
parameterLimit: 1000,
|
|
146
|
+
}), bodyParse.json({ limit: '50mb' }), new nestjs_cls_1.ClsMiddleware({
|
|
143
147
|
saveReq: true,
|
|
144
148
|
}).use, (0, __1.RequestIdMiddleware)(), (0, __1.PowerByMiddleware)(), (0, __1.OmniAuthMiddleware)(), compression());
|
|
145
149
|
const reflector = app.get(core_1.Reflector);
|