@nest-omni/core 1.0.51 → 1.0.53
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
CHANGED
package/setup/bootstrap.setup.js
CHANGED
|
@@ -23,35 +23,33 @@ const nestjs_sentry_1 = require("@ntegral/nestjs-sentry");
|
|
|
23
23
|
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
24
24
|
const crud_1 = require("@dataui/crud");
|
|
25
25
|
const nestjs_cls_1 = require("nestjs-cls");
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
crud_1.CrudConfigService.load({
|
|
27
|
+
auth: {
|
|
28
|
+
property: 'user',
|
|
29
|
+
},
|
|
30
|
+
params: {
|
|
31
|
+
id: {
|
|
32
|
+
field: 'id',
|
|
33
|
+
type: 'string',
|
|
34
|
+
primary: true,
|
|
30
35
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
},
|
|
37
|
+
query: {
|
|
38
|
+
limit: 10,
|
|
39
|
+
alwaysPaginate: true,
|
|
40
|
+
},
|
|
41
|
+
routes: {
|
|
42
|
+
updateOneBase: {
|
|
43
|
+
allowParamsOverride: false,
|
|
37
44
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
alwaysPaginate: true,
|
|
45
|
+
deleteOneBase: {
|
|
46
|
+
returnDeleted: false,
|
|
41
47
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
allowParamsOverride: false,
|
|
45
|
-
},
|
|
46
|
-
deleteOneBase: {
|
|
47
|
-
returnDeleted: false,
|
|
48
|
-
},
|
|
49
|
-
createOneBase: {
|
|
50
|
-
returnShallow: false,
|
|
51
|
-
},
|
|
48
|
+
createOneBase: {
|
|
49
|
+
returnShallow: false,
|
|
52
50
|
},
|
|
53
|
-
}
|
|
54
|
-
};
|
|
51
|
+
},
|
|
52
|
+
});
|
|
55
53
|
const setupProcessHandlers = (app) => {
|
|
56
54
|
const logger = app.get(nestjs_pino_1.Logger);
|
|
57
55
|
process.on('uncaughtException', (error) => {
|
|
@@ -116,7 +114,6 @@ const setupGracefulShutdown = (app) => {
|
|
|
116
114
|
function bootstrapSetup(AppModule, SetupSwagger) {
|
|
117
115
|
return __awaiter(this, void 0, void 0, function* () {
|
|
118
116
|
(0, typeorm_transactional_1.initializeTransactionalContext)();
|
|
119
|
-
configureCrud();
|
|
120
117
|
const app = yield core_1.NestFactory.create(AppModule, {
|
|
121
118
|
bufferLogs: true,
|
|
122
119
|
});
|
|
@@ -116,6 +116,7 @@ let ApiConfigService = ApiConfigService_1 = class ApiConfigService {
|
|
|
116
116
|
logging: this.getBoolean('DB_LOG_ENABLED'),
|
|
117
117
|
maxQueryExecutionTime: 3000,
|
|
118
118
|
namingStrategy: new common_2.SnakeNamingStrategy(),
|
|
119
|
+
timezone: this.getString('TZ'),
|
|
119
120
|
cache: this.getBoolean('DB_CACHE_ENABLED')
|
|
120
121
|
? {
|
|
121
122
|
type: 'ioredis',
|
|
@@ -231,8 +232,7 @@ let ApiConfigService = ApiConfigService_1 = class ApiConfigService {
|
|
|
231
232
|
redis: Object.assign(Object.assign({}, this.ioRedisConfig), { retryStrategy: (times) => Math.min(times * 1000, 5000) }),
|
|
232
233
|
prefix: this.getString('BULL_PREFIX'),
|
|
233
234
|
defaultJobOptions: {
|
|
234
|
-
removeOnComplete:
|
|
235
|
-
7 * 24 * 3600,
|
|
235
|
+
removeOnComplete: true,
|
|
236
236
|
removeOnFail: this.getNumber('BULL_REMOVE_FAILED_DAYS') * 24 * 3600 ||
|
|
237
237
|
30 * 24 * 3600,
|
|
238
238
|
attempts: this.getNumber('BULL_JOB_ATTEMPTS') || 5,
|