UNPKG

916 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.mergePluginOptions = void 0;
4const shared_utils_1 = require("@nestjs/common/utils/shared.utils");
5const defaultOptions = {
6 dtoFileNameSuffix: ['.dto.ts', '.entity.ts'],
7 controllerFileNameSuffix: ['.controller.ts'],
8 classValidatorShim: true,
9 dtoKeyOfComment: 'description',
10 controllerKeyOfComment: 'description',
11 introspectComments: false
12};
13const mergePluginOptions = (options = {}) => {
14 if ((0, shared_utils_1.isString)(options.dtoFileNameSuffix)) {
15 options.dtoFileNameSuffix = [options.dtoFileNameSuffix];
16 }
17 if ((0, shared_utils_1.isString)(options.controllerFileNameSuffix)) {
18 options.controllerFileNameSuffix = [options.controllerFileNameSuffix];
19 }
20 return Object.assign(Object.assign({}, defaultOptions), options);
21};
22exports.mergePluginOptions = mergePluginOptions;