@nest-omni/core 3.1.2-2 → 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 +30 -30
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");
|
|
@@ -119,7 +119,6 @@ const class_validator_1 = require("class-validator");
|
|
|
119
119
|
const setup_1 = require("@sentry/nestjs/setup");
|
|
120
120
|
const vault_1 = require("../vault");
|
|
121
121
|
const dto_1 = require("../common/dto");
|
|
122
|
-
const express_1 = require("express");
|
|
123
122
|
function bootstrapSetup(AppModule, SetupSwagger) {
|
|
124
123
|
return __awaiter(this, void 0, void 0, function* () {
|
|
125
124
|
yield vault_1.VaultConfigLoader.loadVaultConfig();
|
|
@@ -140,7 +139,8 @@ function bootstrapSetup(AppModule, SetupSwagger) {
|
|
|
140
139
|
app.enableShutdownHooks();
|
|
141
140
|
app.enableVersioning();
|
|
142
141
|
app.enable('trust proxy');
|
|
143
|
-
app.
|
|
142
|
+
app.set('query parser', 'extended');
|
|
143
|
+
app.use(bodyParse.urlencoded({
|
|
144
144
|
extended: true,
|
|
145
145
|
parameterLimit: 1000,
|
|
146
146
|
}), bodyParse.json({ limit: '50mb' }), new nestjs_cls_1.ClsMiddleware({
|