@nest-omni/core 1.0.52 → 1.0.54

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nest-omni/core",
3
- "version": "1.0.52",
3
+ "version": "1.0.54",
4
4
  "description": "framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -55,7 +55,6 @@ class ContextProvider {
55
55
  static getAuthUser() {
56
56
  const auth = ContextProvider.get(ContextProvider.authUserKey);
57
57
  if (!auth) {
58
- console.error(new Error().stack);
59
58
  throw new common_1.BadGatewayException('User information not found.');
60
59
  }
61
60
  return auth;
@@ -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
- const configureCrud = () => {
27
- crud_1.CrudConfigService.load({
28
- auth: {
29
- property: 'user',
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
- params: {
32
- id: {
33
- field: 'id',
34
- type: 'string',
35
- primary: true,
36
- },
36
+ },
37
+ query: {
38
+ limit: 10,
39
+ alwaysPaginate: true,
40
+ },
41
+ routes: {
42
+ updateOneBase: {
43
+ allowParamsOverride: false,
37
44
  },
38
- query: {
39
- limit: 10,
40
- alwaysPaginate: true,
45
+ deleteOneBase: {
46
+ returnDeleted: false,
41
47
  },
42
- routes: {
43
- updateOneBase: {
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',