@nest-omni/core 1.0.11 → 1.0.14
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 +3 -16
- package/common/abstract-client.service.d.ts +0 -16
- package/common/abstract-client.service.js +0 -35
- package/common/abstract.entity.d.ts +0 -17
- package/common/abstract.entity.js +0 -64
- package/common/dto/abstract.dto.d.ts +0 -13
- package/common/dto/abstract.dto.js +0 -59
- package/common/dto/bulk-id.dto.d.ts +0 -3
- package/common/dto/bulk-id.dto.js +0 -27
- package/common/dto/create-translation.dto.d.ts +0 -5
- package/common/dto/create-translation.dto.js +0 -25
- package/common/dto/index.d.ts +0 -6
- package/common/dto/index.js +0 -22
- package/common/dto/page-meta.dto.d.ts +0 -15
- package/common/dto/page-meta.dto.js +0 -48
- package/common/dto/page-options.dto.d.ts +0 -8
- package/common/dto/page-options.dto.js +0 -52
- package/common/dto/page.dto.d.ts +0 -11
- package/common/dto/page.dto.js +0 -53
- package/common/index.d.ts +0 -4
- package/common/index.js +0 -20
- package/common/utils.d.ts +0 -3
- package/common/utils.js +0 -25
- package/constants/index.d.ts +0 -2
- package/constants/index.js +0 -18
- package/constants/language-code.d.ts +0 -5
- package/constants/language-code.js +0 -9
- package/constants/order.d.ts +0 -4
- package/constants/order.js +0 -8
- package/decorators/api-page-ok-response.decorator.d.ts +0 -5
- package/decorators/api-page-ok-response.decorator.js +0 -25
- package/decorators/auth-user.decorator.d.ts +0 -1
- package/decorators/auth-user.decorator.js +0 -15
- package/decorators/controller.decorator.d.ts +0 -1
- package/decorators/controller.decorator.js +0 -11
- package/decorators/field.decorators.d.ts +0 -71
- package/decorators/field.decorators.js +0 -449
- package/decorators/http.decorators.d.ts +0 -3
- package/decorators/http.decorators.js +0 -8
- package/decorators/index.d.ts +0 -12
- package/decorators/index.js +0 -28
- package/decorators/omni-auth.decorator.d.ts +0 -8
- package/decorators/omni-auth.decorator.js +0 -35
- package/decorators/operation.decorator.d.ts +0 -1
- package/decorators/operation.decorator.js +0 -6
- package/decorators/property.decorators.d.ts +0 -15
- package/decorators/property.decorators.js +0 -32
- package/decorators/public-route.decorator.d.ts +0 -3
- package/decorators/public-route.decorator.js +0 -7
- package/decorators/swagger.schema.d.ts +0 -5
- package/decorators/swagger.schema.js +0 -79
- package/decorators/timestamp-column.decorator.d.ts +0 -1
- package/decorators/timestamp-column.decorator.js +0 -28
- package/decorators/transform.decorators.d.ts +0 -8
- package/decorators/transform.decorators.js +0 -95
- package/decorators/translate.decorator.d.ts +0 -5
- package/decorators/translate.decorator.js +0 -17
- package/decorators/use-dto.decorator.d.ts +0 -4
- package/decorators/use-dto.decorator.js +0 -9
- package/decorators/user-check.decorator.d.ts +0 -6
- package/decorators/user-check.decorator.js +0 -21
- package/decorators/user.decorator.d.ts +0 -8
- package/decorators/user.decorator.js +0 -38
- package/decorators/user_auth.decorator.d.ts +0 -1
- package/decorators/user_auth.decorator.js +0 -16
- package/decorators/validator.decorators.d.ts +0 -10
- package/decorators/validator.decorators.js +0 -59
- package/exceptions/file-not-image.exception.d.ts +0 -4
- package/exceptions/file-not-image.exception.js +0 -10
- package/exceptions/index.d.ts +0 -2
- package/exceptions/index.js +0 -18
- package/exceptions/page-type.exception.d.ts +0 -4
- package/exceptions/page-type.exception.js +0 -10
- package/exceptions/user-not-found.exception.d.ts +0 -4
- package/exceptions/user-not-found.exception.js +0 -10
- package/filters/bad-request.filter.d.ts +0 -5
- package/filters/bad-request.filter.js +0 -60
- package/filters/constraint-errors.d.ts +0 -1
- package/filters/constraint-errors.js +0 -6
- package/filters/index.d.ts +0 -3
- package/filters/index.js +0 -19
- package/filters/query-failed.filter.d.ts +0 -10
- package/filters/query-failed.filter.js +0 -42
- package/health-checker/health-checker.controller.d.ts +0 -15
- package/health-checker/health-checker.controller.js +0 -72
- package/health-checker/health-checker.module.d.ts +0 -2
- package/health-checker/health-checker.module.js +0 -25
- package/health-checker/health-indicators/service.indicator.d.ts +0 -8
- package/health-checker/health-indicators/service.indicator.js +0 -66
- package/helpers/common.helper.d.ts +0 -3
- package/helpers/common.helper.js +0 -36
- package/helpers/date.helper.d.ts +0 -10
- package/helpers/date.helper.js +0 -58
- package/helpers/index.d.ts +0 -2
- package/helpers/index.js +0 -18
- package/i18n/en_US/validation.json +0 -38
- package/i18n/zh_CN/validation.json +0 -38
- package/index.js +0 -29
- package/interceptors/auth-user.interceptor.d.ts +0 -4
- package/interceptors/auth-user.interceptor.js +0 -24
- package/interceptors/index.d.ts +0 -2
- package/interceptors/index.js +0 -18
- package/interceptors/language-interceptor.service.d.ts +0 -6
- package/interceptors/language-interceptor.service.js +0 -30
- package/interceptors/translation-interceptor.service.d.ts +0 -5
- package/interceptors/translation-interceptor.service.js +0 -34
- package/interfaces/IApiFile.d.ts +0 -4
- package/interfaces/IApiFile.js +0 -2
- package/interfaces/IFile.d.ts +0 -9
- package/interfaces/IFile.js +0 -2
- package/interfaces/ITranslationDecoratorInterface.d.ts +0 -3
- package/interfaces/ITranslationDecoratorInterface.js +0 -2
- package/interfaces/index.d.ts +0 -3
- package/interfaces/index.js +0 -19
- package/interfaces/response.d.ts +0 -25
- package/interfaces/response.js +0 -2
- package/middlewares/index.d.ts +0 -3
- package/middlewares/index.js +0 -19
- package/middlewares/omni-auth.middleware.d.ts +0 -1
- package/middlewares/omni-auth.middleware.js +0 -13
- package/middlewares/powerby.middleware.d.ts +0 -1
- package/middlewares/powerby.middleware.js +0 -10
- package/middlewares/request-id.middleware.d.ts +0 -7
- package/middlewares/request-id.middleware.js +0 -22
- package/providers/context.provider.d.ts +0 -32
- package/providers/context.provider.js +0 -71
- package/providers/generator.provider.d.ts +0 -9
- package/providers/generator.provider.js +0 -50
- package/providers/index.d.ts +0 -2
- package/providers/index.js +0 -18
- package/setup/bootstrap.setup.d.ts +0 -5
- package/setup/bootstrap.setup.js +0 -112
- package/setup/index.d.ts +0 -1
- package/setup/index.js +0 -17
- package/shared/index.d.ts +0 -2
- package/shared/index.js +0 -18
- package/shared/serviceRegistryModule.d.ts +0 -2
- package/shared/serviceRegistryModule.js +0 -110
- package/shared/services/api-config.service.d.ts +0 -70
- package/shared/services/api-config.service.js +0 -290
- package/shared/services/aws-s3.service.d.ts +0 -10
- package/shared/services/aws-s3.service.js +0 -56
- package/shared/services/generator.service.d.ts +0 -4
- package/shared/services/generator.service.js +0 -23
- package/shared/services/index.d.ts +0 -5
- package/shared/services/index.js +0 -21
- package/shared/services/translation.service.d.ts +0 -9
- package/shared/services/translation.service.js +0 -70
- package/shared/services/validator.service.d.ts +0 -3
- package/shared/services/validator.service.js +0 -20
- package/validators/file-mimetype.validator.d.ts +0 -13
- package/validators/file-mimetype.validator.js +0 -21
- package/validators/index.d.ts +0 -6
- package/validators/index.js +0 -22
- package/validators/is-exists.validator.d.ts +0 -18
- package/validators/is-exists.validator.js +0 -61
- package/validators/is-unique.validator.d.ts +0 -17
- package/validators/is-unique.validator.js +0 -92
- package/validators/phone-country-code.validator.d.ts +0 -2
- package/validators/phone-country-code.validator.js +0 -30
- package/validators/same-as.validator.d.ts +0 -2
- package/validators/same-as.validator.js +0 -25
- package/validators/skip-empty.validator.d.ts +0 -1
- package/validators/skip-empty.validator.js +0 -18
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.ServiceRegistryModule = void 0;
|
|
19
|
-
const path = require("path");
|
|
20
|
-
const process = require("process");
|
|
21
|
-
const typeorm_1 = require("typeorm");
|
|
22
|
-
const bull_1 = require("@nestjs/bull");
|
|
23
|
-
const nestjs_pino_1 = require("nestjs-pino");
|
|
24
|
-
const config_1 = require("@nestjs/config");
|
|
25
|
-
const common_1 = require("@nestjs/common");
|
|
26
|
-
const typeorm_2 = require("@nestjs/typeorm");
|
|
27
|
-
const schedule_1 = require("@nestjs/schedule");
|
|
28
|
-
const nestjs_sentry_1 = require("@ntegral/nestjs-sentry");
|
|
29
|
-
const cache_manager_1 = require("@nestjs/cache-manager");
|
|
30
|
-
const typeorm_transactional_1 = require("typeorm-transactional");
|
|
31
|
-
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
32
|
-
const health_checker_module_1 = require("../health-checker/health-checker.module");
|
|
33
|
-
const services_1 = require("./services");
|
|
34
|
-
const fs_1 = require("fs");
|
|
35
|
-
const providers = [
|
|
36
|
-
services_1.ApiConfigService,
|
|
37
|
-
services_1.ValidatorService,
|
|
38
|
-
services_1.AwsS3Service,
|
|
39
|
-
services_1.GeneratorService,
|
|
40
|
-
services_1.TranslationService,
|
|
41
|
-
];
|
|
42
|
-
services_1.ApiConfigService.rootPath =
|
|
43
|
-
process.env.NODE_ENV === 'test' ? process.cwd() : __dirname;
|
|
44
|
-
const envFilePath = path.join(services_1.ApiConfigService.rootPath, 'config', `${process.env.NODE_ENV || ''}.env`);
|
|
45
|
-
if (!(0, fs_1.existsSync)(envFilePath)) {
|
|
46
|
-
throw new Error(`*.env file not found in ${envFilePath}`);
|
|
47
|
-
}
|
|
48
|
-
const modules = [
|
|
49
|
-
config_1.ConfigModule.forRoot({
|
|
50
|
-
isGlobal: true,
|
|
51
|
-
expandVariables: true,
|
|
52
|
-
envFilePath: envFilePath,
|
|
53
|
-
}),
|
|
54
|
-
nestjs_sentry_1.SentryModule.forRootAsync({
|
|
55
|
-
inject: [services_1.ApiConfigService],
|
|
56
|
-
useFactory(configService) {
|
|
57
|
-
return configService.sentryConfig;
|
|
58
|
-
},
|
|
59
|
-
}),
|
|
60
|
-
nestjs_pino_1.LoggerModule.forRootAsync({
|
|
61
|
-
inject: [services_1.ApiConfigService],
|
|
62
|
-
useFactory: (config) => config.pinoConfig,
|
|
63
|
-
}),
|
|
64
|
-
typeorm_2.TypeOrmModule.forRootAsync({
|
|
65
|
-
inject: [services_1.ApiConfigService],
|
|
66
|
-
useFactory: (config) => config.typeormConfig,
|
|
67
|
-
dataSourceFactory: (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
68
|
-
return (0, typeorm_transactional_1.addTransactionalDataSource)(new typeorm_1.DataSource(options));
|
|
69
|
-
}),
|
|
70
|
-
}),
|
|
71
|
-
nestjs_i18n_1.I18nModule.forRootAsync({
|
|
72
|
-
inject: [services_1.ApiConfigService],
|
|
73
|
-
useFactory: (config) => ({
|
|
74
|
-
fallbackLanguage: config.fallbackLanguage,
|
|
75
|
-
loaderOptions: {
|
|
76
|
-
path: path.join(__dirname, '/i18n/'),
|
|
77
|
-
watch: config.isDev,
|
|
78
|
-
},
|
|
79
|
-
logging: config.isDev,
|
|
80
|
-
}),
|
|
81
|
-
resolvers: [new nestjs_i18n_1.QueryResolver(['lang']), nestjs_i18n_1.AcceptLanguageResolver],
|
|
82
|
-
}),
|
|
83
|
-
health_checker_module_1.HealthCheckerModule,
|
|
84
|
-
];
|
|
85
|
-
if (services_1.ApiConfigService.toBoolean(process.env.BULL_ENABLED)) {
|
|
86
|
-
modules.push(bull_1.BullModule.forRootAsync({
|
|
87
|
-
inject: [services_1.ApiConfigService],
|
|
88
|
-
useFactory: (config) => config.bullConfig,
|
|
89
|
-
}));
|
|
90
|
-
}
|
|
91
|
-
if (services_1.ApiConfigService.toBoolean(process.env.CACHE_ENABLED)) {
|
|
92
|
-
modules.push(cache_manager_1.CacheModule.registerAsync({
|
|
93
|
-
inject: [services_1.ApiConfigService],
|
|
94
|
-
useFactory: (config) => config.cacheConfig(),
|
|
95
|
-
}));
|
|
96
|
-
}
|
|
97
|
-
if (services_1.ApiConfigService.toBoolean(process.env.SCHEDULE_ENABLED)) {
|
|
98
|
-
modules.push(schedule_1.ScheduleModule.forRoot());
|
|
99
|
-
}
|
|
100
|
-
let ServiceRegistryModule = class ServiceRegistryModule {
|
|
101
|
-
};
|
|
102
|
-
exports.ServiceRegistryModule = ServiceRegistryModule;
|
|
103
|
-
exports.ServiceRegistryModule = ServiceRegistryModule = __decorate([
|
|
104
|
-
(0, common_1.Global)(),
|
|
105
|
-
(0, common_1.Module)({
|
|
106
|
-
providers,
|
|
107
|
-
imports: modules,
|
|
108
|
-
exports: [...providers, ...modules],
|
|
109
|
-
})
|
|
110
|
-
], ServiceRegistryModule);
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { ConfigService } from '@nestjs/config';
|
|
2
|
-
import type { TypeOrmModuleOptions } from '@nestjs/typeorm';
|
|
3
|
-
import { SentryModuleOptions } from '@ntegral/nestjs-sentry/lib/sentry.interfaces';
|
|
4
|
-
import session from 'express-session';
|
|
5
|
-
import { Params } from 'nestjs-pino';
|
|
6
|
-
import { BullRootModuleOptions } from '@nestjs/bull/dist/interfaces/bull-module-options.interface';
|
|
7
|
-
import { AxiosProxyConfig } from 'axios';
|
|
8
|
-
import { CorsOptions } from '@nestjs/common/interfaces/external/cors-options.interface';
|
|
9
|
-
export declare class ApiConfigService {
|
|
10
|
-
private configService;
|
|
11
|
-
static rootPath: string;
|
|
12
|
-
constructor(configService: ConfigService);
|
|
13
|
-
static getRootPath(): string;
|
|
14
|
-
get isDev(): boolean;
|
|
15
|
-
get isProd(): boolean;
|
|
16
|
-
get isSit(): boolean;
|
|
17
|
-
get isUat(): boolean;
|
|
18
|
-
get isTest(): boolean;
|
|
19
|
-
getNumber(key: string): number;
|
|
20
|
-
getBoolean(key: string): boolean;
|
|
21
|
-
static toBoolean(value: string): boolean;
|
|
22
|
-
getString(key: string): string;
|
|
23
|
-
get nodeEnv(): string;
|
|
24
|
-
get fallbackLanguage(): string;
|
|
25
|
-
get sentryConfig(): SentryModuleOptions;
|
|
26
|
-
get typeormConfig(): TypeOrmModuleOptions;
|
|
27
|
-
get awsS3Config(): {
|
|
28
|
-
bucketRegion: string;
|
|
29
|
-
bucketApiVersion: string;
|
|
30
|
-
bucketName: string;
|
|
31
|
-
};
|
|
32
|
-
get documentationEnabled(): boolean;
|
|
33
|
-
get documentationPath(): string;
|
|
34
|
-
get skywalkingEnabled(): boolean;
|
|
35
|
-
get viewsEnabled(): boolean;
|
|
36
|
-
get sessionEnabled(): boolean;
|
|
37
|
-
get corsEnabled(): boolean;
|
|
38
|
-
get corsConfig(): CorsOptions;
|
|
39
|
-
get sessionConfig(): session.SessionOptions;
|
|
40
|
-
get natsEnabled(): boolean;
|
|
41
|
-
get natsConfig(): {
|
|
42
|
-
host: string;
|
|
43
|
-
port: number;
|
|
44
|
-
};
|
|
45
|
-
get authConfig(): {
|
|
46
|
-
privateKey: string;
|
|
47
|
-
publicKey: string;
|
|
48
|
-
jwtExpirationTime: number;
|
|
49
|
-
};
|
|
50
|
-
get appConfig(): {
|
|
51
|
-
port: string;
|
|
52
|
-
};
|
|
53
|
-
get apiKey(): string;
|
|
54
|
-
get ioRedisConfig(): {
|
|
55
|
-
host: string;
|
|
56
|
-
port: number;
|
|
57
|
-
username: string;
|
|
58
|
-
password: string;
|
|
59
|
-
db: number;
|
|
60
|
-
};
|
|
61
|
-
get isRedisEnabled(): boolean;
|
|
62
|
-
get bullConfig(): BullRootModuleOptions;
|
|
63
|
-
cacheConfig(): Promise<{
|
|
64
|
-
isGlobal: boolean;
|
|
65
|
-
store: import("cache-manager-ioredis-yet").RedisStore;
|
|
66
|
-
}>;
|
|
67
|
-
get pinoConfig(): Params;
|
|
68
|
-
get axiosProxyConfig(): AxiosProxyConfig | false;
|
|
69
|
-
private get;
|
|
70
|
-
}
|
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
var ApiConfigService_1;
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.ApiConfigService = void 0;
|
|
23
|
-
const common_1 = require("@nestjs/common");
|
|
24
|
-
const config_1 = require("@nestjs/config");
|
|
25
|
-
const lodash_1 = require("lodash");
|
|
26
|
-
const snake_naming_strategy_1 = require("../../snake-naming.strategy");
|
|
27
|
-
const cache_manager_ioredis_yet_1 = require("cache-manager-ioredis-yet");
|
|
28
|
-
const connect_redis_1 = require("connect-redis");
|
|
29
|
-
const ioredis_1 = require("ioredis");
|
|
30
|
-
let ApiConfigService = ApiConfigService_1 = class ApiConfigService {
|
|
31
|
-
constructor(configService) {
|
|
32
|
-
this.configService = configService;
|
|
33
|
-
}
|
|
34
|
-
static getRootPath() {
|
|
35
|
-
if (!ApiConfigService_1.rootPath) {
|
|
36
|
-
throw new Error(`rootPath is not set`);
|
|
37
|
-
}
|
|
38
|
-
return ApiConfigService_1.rootPath;
|
|
39
|
-
}
|
|
40
|
-
get isDev() {
|
|
41
|
-
return this.nodeEnv === 'dev';
|
|
42
|
-
}
|
|
43
|
-
get isProd() {
|
|
44
|
-
return this.nodeEnv === 'prod';
|
|
45
|
-
}
|
|
46
|
-
get isSit() {
|
|
47
|
-
return this.nodeEnv === 'sit';
|
|
48
|
-
}
|
|
49
|
-
get isUat() {
|
|
50
|
-
return this.nodeEnv === 'uat';
|
|
51
|
-
}
|
|
52
|
-
get isTest() {
|
|
53
|
-
return this.nodeEnv === 'test';
|
|
54
|
-
}
|
|
55
|
-
getNumber(key) {
|
|
56
|
-
const value = this.get(key);
|
|
57
|
-
try {
|
|
58
|
-
return Number(value);
|
|
59
|
-
}
|
|
60
|
-
catch (_a) {
|
|
61
|
-
throw new Error(key + ' environment variable is not a number');
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
getBoolean(key) {
|
|
65
|
-
const value = this.get(key);
|
|
66
|
-
return ApiConfigService_1.toBoolean(value);
|
|
67
|
-
}
|
|
68
|
-
static toBoolean(value) {
|
|
69
|
-
try {
|
|
70
|
-
return Boolean(JSON.parse(value));
|
|
71
|
-
}
|
|
72
|
-
catch (_a) {
|
|
73
|
-
throw new Error(value + ' is not a boolean');
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
getString(key) {
|
|
77
|
-
const value = this.get(key);
|
|
78
|
-
return value.replace(/\\n/g, '\n');
|
|
79
|
-
}
|
|
80
|
-
get nodeEnv() {
|
|
81
|
-
return this.getString('NODE_ENV');
|
|
82
|
-
}
|
|
83
|
-
get fallbackLanguage() {
|
|
84
|
-
return this.getString('FALLBACK_LANGUAGE');
|
|
85
|
-
}
|
|
86
|
-
get sentryConfig() {
|
|
87
|
-
return {
|
|
88
|
-
dsn: this.getString('SENTRY_DSN'),
|
|
89
|
-
debug: this.isDev,
|
|
90
|
-
environment: this.nodeEnv,
|
|
91
|
-
tracesSampleRate: 1.0,
|
|
92
|
-
release: '0.0.1',
|
|
93
|
-
logLevels: ['warn', 'error'],
|
|
94
|
-
close: {
|
|
95
|
-
enabled: true,
|
|
96
|
-
timeout: 10 * 1000,
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
get typeormConfig() {
|
|
101
|
-
return {
|
|
102
|
-
autoLoadEntities: true,
|
|
103
|
-
keepConnectionAlive: !this.isDev,
|
|
104
|
-
dropSchema: this.isTest,
|
|
105
|
-
type: 'mysql',
|
|
106
|
-
host: this.getString('DB_HOST'),
|
|
107
|
-
port: this.getNumber('DB_PORT'),
|
|
108
|
-
username: this.getString('DB_USERNAME'),
|
|
109
|
-
password: this.getString('DB_PASSWORD'),
|
|
110
|
-
database: this.getString('DB_DATABASE'),
|
|
111
|
-
subscribers: [],
|
|
112
|
-
synchronize: this.isDev,
|
|
113
|
-
migrationsRun: true,
|
|
114
|
-
logging: this.getBoolean('DB_LOG_ENABLED'),
|
|
115
|
-
maxQueryExecutionTime: 3000,
|
|
116
|
-
namingStrategy: new snake_naming_strategy_1.SnakeNamingStrategy(),
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
get awsS3Config() {
|
|
120
|
-
return {
|
|
121
|
-
bucketRegion: this.getString('AWS_S3_BUCKET_REGION'),
|
|
122
|
-
bucketApiVersion: this.getString('AWS_S3_API_VERSION'),
|
|
123
|
-
bucketName: this.getString('AWS_S3_BUCKET_NAME'),
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
get documentationEnabled() {
|
|
127
|
-
return this.getBoolean('SWAGGER_ENABLED');
|
|
128
|
-
}
|
|
129
|
-
get documentationPath() {
|
|
130
|
-
return this.getString('SWAGGER_PATH');
|
|
131
|
-
}
|
|
132
|
-
get skywalkingEnabled() {
|
|
133
|
-
return this.getBoolean('SW_ENABLED');
|
|
134
|
-
}
|
|
135
|
-
get viewsEnabled() {
|
|
136
|
-
return this.getBoolean('VIEWS_ENABLED');
|
|
137
|
-
}
|
|
138
|
-
get sessionEnabled() {
|
|
139
|
-
return this.getBoolean('SESSION_ENABLED');
|
|
140
|
-
}
|
|
141
|
-
get corsEnabled() {
|
|
142
|
-
try {
|
|
143
|
-
return this.getBoolean('CORS_ENABLED');
|
|
144
|
-
}
|
|
145
|
-
catch (error) {
|
|
146
|
-
return false;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
get corsConfig() {
|
|
150
|
-
const allowedDomains = this.getString('CORS_ORIGIN').split(',');
|
|
151
|
-
return {
|
|
152
|
-
origin: (origin, callback) => {
|
|
153
|
-
if (!origin ||
|
|
154
|
-
allowedDomains.some((domain) => origin.endsWith(domain))) {
|
|
155
|
-
callback(null, origin);
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
callback(new common_1.BadRequestException('Not allowed by CORS'));
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
methods: this.getString('CORS_METHODS'),
|
|
162
|
-
allowedHeaders: this.getString('CORS_ALLOWED_HEADERS'),
|
|
163
|
-
exposedHeaders: this.getString('CORS_EXPOSED_HEADERS'),
|
|
164
|
-
credentials: this.getBoolean('CORS_CREDENTIALS'),
|
|
165
|
-
optionsSuccessStatus: 200,
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
get sessionConfig() {
|
|
169
|
-
const config = {
|
|
170
|
-
secret: this.getString('SESSION_KEY'),
|
|
171
|
-
resave: false,
|
|
172
|
-
saveUninitialized: false,
|
|
173
|
-
};
|
|
174
|
-
if (this.getBoolean('SESSION_REDIS_ENABLED')) {
|
|
175
|
-
config.store = new connect_redis_1.default({
|
|
176
|
-
client: new ioredis_1.default(this.ioRedisConfig),
|
|
177
|
-
prefix: this.getString('SESSION_REDIS_PREFIX'),
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
return config;
|
|
181
|
-
}
|
|
182
|
-
get natsEnabled() {
|
|
183
|
-
return this.getBoolean('NATS_ENABLED');
|
|
184
|
-
}
|
|
185
|
-
get natsConfig() {
|
|
186
|
-
return {
|
|
187
|
-
host: this.getString('NATS_HOST'),
|
|
188
|
-
port: this.getNumber('NATS_PORT'),
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
get authConfig() {
|
|
192
|
-
return {
|
|
193
|
-
privateKey: this.getString('JWT_PRIVATE_KEY'),
|
|
194
|
-
publicKey: this.getString('JWT_PUBLIC_KEY'),
|
|
195
|
-
jwtExpirationTime: this.getNumber('JWT_EXPIRATION_TIME'),
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
get appConfig() {
|
|
199
|
-
return {
|
|
200
|
-
port: this.getString('PORT'),
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
get apiKey() {
|
|
204
|
-
return this.getString('API_KEY');
|
|
205
|
-
}
|
|
206
|
-
get ioRedisConfig() {
|
|
207
|
-
return {
|
|
208
|
-
host: this.getString('REDIS_HOST'),
|
|
209
|
-
port: this.getNumber('REDIS_PORT'),
|
|
210
|
-
username: this.getString('REDIS_USERNAME'),
|
|
211
|
-
password: this.getString('REDIS_PASSWORD'),
|
|
212
|
-
db: this.getNumber('REDIS_DB'),
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
get isRedisEnabled() {
|
|
216
|
-
return (this.getBoolean('BULL_ENABLED') ||
|
|
217
|
-
this.getBoolean('CACHE_ENABLED') ||
|
|
218
|
-
(this.sessionEnabled && this.getBoolean('SESSION_REDIS_ENABLED')));
|
|
219
|
-
}
|
|
220
|
-
get bullConfig() {
|
|
221
|
-
return {
|
|
222
|
-
redis: this.ioRedisConfig,
|
|
223
|
-
prefix: this.getString('BULL_PREFIX'),
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
cacheConfig() {
|
|
227
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
228
|
-
return {
|
|
229
|
-
isGlobal: true,
|
|
230
|
-
store: yield (0, cache_manager_ioredis_yet_1.redisStore)(Object.assign(Object.assign({}, this.ioRedisConfig), { ttl: this.getNumber('CACHE_TTL') })),
|
|
231
|
-
};
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
get pinoConfig() {
|
|
235
|
-
const transport = this.isDev
|
|
236
|
-
? {
|
|
237
|
-
target: 'pino-pretty',
|
|
238
|
-
}
|
|
239
|
-
: null;
|
|
240
|
-
return {
|
|
241
|
-
pinoHttp: {
|
|
242
|
-
genReqId: (req) => req.id,
|
|
243
|
-
transport,
|
|
244
|
-
level: this.isDev ? 'debug' : 'info',
|
|
245
|
-
customLogLevel: function (res) {
|
|
246
|
-
if (res.statusCode < 300) {
|
|
247
|
-
return 'info';
|
|
248
|
-
}
|
|
249
|
-
else if (res.statusCode >= 300 && res.statusCode < 500) {
|
|
250
|
-
return 'warn';
|
|
251
|
-
}
|
|
252
|
-
return 'error';
|
|
253
|
-
},
|
|
254
|
-
customProps: (req) => {
|
|
255
|
-
return {
|
|
256
|
-
env: this.nodeEnv,
|
|
257
|
-
appName: this.getString('NAME'),
|
|
258
|
-
user: req === null || req === void 0 ? void 0 : req.user,
|
|
259
|
-
body: req === null || req === void 0 ? void 0 : req.body,
|
|
260
|
-
};
|
|
261
|
-
},
|
|
262
|
-
redact: {
|
|
263
|
-
paths: ['req.headers.authorization', 'req.headers.apikey'],
|
|
264
|
-
remove: true,
|
|
265
|
-
},
|
|
266
|
-
},
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
get axiosProxyConfig() {
|
|
270
|
-
if (!this.getBoolean('DIRECT_PROXY_ENABLED')) {
|
|
271
|
-
return false;
|
|
272
|
-
}
|
|
273
|
-
return {
|
|
274
|
-
host: this.getString('DIRECT_PROXY_HOST'),
|
|
275
|
-
port: this.getNumber('DIRECT_PROXY_PORT'),
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
get(key) {
|
|
279
|
-
const value = this.configService.get(key);
|
|
280
|
-
if ((0, lodash_1.isNil)(value)) {
|
|
281
|
-
throw new Error(key + ' environment variable does not set');
|
|
282
|
-
}
|
|
283
|
-
return value;
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
exports.ApiConfigService = ApiConfigService;
|
|
287
|
-
exports.ApiConfigService = ApiConfigService = ApiConfigService_1 = __decorate([
|
|
288
|
-
(0, common_1.Injectable)(),
|
|
289
|
-
__metadata("design:paramtypes", [config_1.ConfigService])
|
|
290
|
-
], ApiConfigService);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { IFile } from '../../interfaces';
|
|
2
|
-
import { ApiConfigService } from './api-config.service';
|
|
3
|
-
import { GeneratorService } from './generator.service';
|
|
4
|
-
export declare class AwsS3Service {
|
|
5
|
-
configService: ApiConfigService;
|
|
6
|
-
generatorService: GeneratorService;
|
|
7
|
-
private readonly s3;
|
|
8
|
-
constructor(configService: ApiConfigService, generatorService: GeneratorService);
|
|
9
|
-
uploadImage(file: IFile): Promise<string>;
|
|
10
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.AwsS3Service = void 0;
|
|
22
|
-
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
23
|
-
const common_1 = require("@nestjs/common");
|
|
24
|
-
const mime_types_1 = require("mime-types");
|
|
25
|
-
const api_config_service_1 = require("./api-config.service");
|
|
26
|
-
const generator_service_1 = require("./generator.service");
|
|
27
|
-
let AwsS3Service = class AwsS3Service {
|
|
28
|
-
constructor(configService, generatorService) {
|
|
29
|
-
this.configService = configService;
|
|
30
|
-
this.generatorService = generatorService;
|
|
31
|
-
const awsS3Config = configService.awsS3Config;
|
|
32
|
-
this.s3 = new client_s3_1.S3({
|
|
33
|
-
apiVersion: awsS3Config.bucketApiVersion,
|
|
34
|
-
region: awsS3Config.bucketRegion,
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
uploadImage(file) {
|
|
38
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
const fileName = this.generatorService.fileName(mime_types_1.default.extension(file.mimetype));
|
|
40
|
-
const key = 'images/' + fileName;
|
|
41
|
-
yield this.s3.putObject({
|
|
42
|
-
Bucket: this.configService.awsS3Config.bucketName,
|
|
43
|
-
Body: file.buffer,
|
|
44
|
-
ACL: 'public-read',
|
|
45
|
-
Key: key,
|
|
46
|
-
});
|
|
47
|
-
return key;
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
exports.AwsS3Service = AwsS3Service;
|
|
52
|
-
exports.AwsS3Service = AwsS3Service = __decorate([
|
|
53
|
-
(0, common_1.Injectable)(),
|
|
54
|
-
__metadata("design:paramtypes", [api_config_service_1.ApiConfigService,
|
|
55
|
-
generator_service_1.GeneratorService])
|
|
56
|
-
], AwsS3Service);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.GeneratorService = void 0;
|
|
10
|
-
const common_1 = require("@nestjs/common");
|
|
11
|
-
const uuid_1 = require("uuid");
|
|
12
|
-
let GeneratorService = class GeneratorService {
|
|
13
|
-
uuid() {
|
|
14
|
-
return (0, uuid_1.v1)();
|
|
15
|
-
}
|
|
16
|
-
fileName(ext) {
|
|
17
|
-
return this.uuid() + '.' + ext;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
exports.GeneratorService = GeneratorService;
|
|
21
|
-
exports.GeneratorService = GeneratorService = __decorate([
|
|
22
|
-
(0, common_1.Injectable)()
|
|
23
|
-
], GeneratorService);
|
package/shared/services/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./api-config.service"), exports);
|
|
18
|
-
__exportStar(require("./aws-s3.service"), exports);
|
|
19
|
-
__exportStar(require("./generator.service"), exports);
|
|
20
|
-
__exportStar(require("./translation.service"), exports);
|
|
21
|
-
__exportStar(require("./validator.service"), exports);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { TranslateOptions } from 'nestjs-i18n';
|
|
2
|
-
import { I18nService } from 'nestjs-i18n';
|
|
3
|
-
import { AbstractDto } from '../../common/dto/abstract.dto';
|
|
4
|
-
export declare class TranslationService {
|
|
5
|
-
private readonly i18n;
|
|
6
|
-
constructor(i18n: I18nService);
|
|
7
|
-
translate(key: string, options?: TranslateOptions): Promise<string>;
|
|
8
|
-
translateNecessaryKeys<T extends AbstractDto>(dto: T): Promise<T>;
|
|
9
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.TranslationService = void 0;
|
|
22
|
-
const common_1 = require("@nestjs/common");
|
|
23
|
-
const lodash_1 = require("lodash");
|
|
24
|
-
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
25
|
-
const abstract_dto_1 = require("../../common/dto/abstract.dto");
|
|
26
|
-
const decorators_1 = require("../../decorators");
|
|
27
|
-
const providers_1 = require("../../providers");
|
|
28
|
-
let TranslationService = class TranslationService {
|
|
29
|
-
constructor(i18n) {
|
|
30
|
-
this.i18n = i18n;
|
|
31
|
-
}
|
|
32
|
-
translate(key, options) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
return this.i18n.translate(`${key}`, Object.assign(Object.assign({}, options), { lang: providers_1.ContextProvider.getLanguage() }));
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
translateNecessaryKeys(dto) {
|
|
38
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
if ((0, lodash_1.isString)(dto)) {
|
|
40
|
-
return dto;
|
|
41
|
-
}
|
|
42
|
-
yield Promise.all((0, lodash_1.map)(dto, (value, key) => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
var _a;
|
|
44
|
-
if ((0, lodash_1.isString)(value)) {
|
|
45
|
-
const translateDec = Reflect.getMetadata(decorators_1.STATIC_TRANSLATION_DECORATOR_KEY, dto, key);
|
|
46
|
-
if (translateDec) {
|
|
47
|
-
return this.translate(`${(_a = translateDec.translationKey) !== null && _a !== void 0 ? _a : key}.${value}`);
|
|
48
|
-
}
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
if (value instanceof abstract_dto_1.AbstractDto) {
|
|
52
|
-
return this.translateNecessaryKeys(value);
|
|
53
|
-
}
|
|
54
|
-
if ((0, lodash_1.isArray)(value)) {
|
|
55
|
-
return Promise.all((0, lodash_1.map)(value, (v) => {
|
|
56
|
-
if (v instanceof abstract_dto_1.AbstractDto) {
|
|
57
|
-
return this.translateNecessaryKeys(v);
|
|
58
|
-
}
|
|
59
|
-
}));
|
|
60
|
-
}
|
|
61
|
-
})));
|
|
62
|
-
return dto;
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
exports.TranslationService = TranslationService;
|
|
67
|
-
exports.TranslationService = TranslationService = __decorate([
|
|
68
|
-
(0, common_1.Injectable)(),
|
|
69
|
-
__metadata("design:paramtypes", [nestjs_i18n_1.I18nService])
|
|
70
|
-
], TranslationService);
|