1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.mergePluginOptions = void 0;
|
4 | const shared_utils_1 = require("@nestjs/common/utils/shared.utils");
|
5 | const defaultOptions = {
|
6 | dtoFileNameSuffix: ['.dto.ts', '.entity.ts'],
|
7 | controllerFileNameSuffix: ['.controller.ts'],
|
8 | classValidatorShim: true,
|
9 | dtoKeyOfComment: 'description',
|
10 | controllerKeyOfComment: 'description',
|
11 | introspectComments: false
|
12 | };
|
13 | const 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 | };
|
22 | exports.mergePluginOptions = mergePluginOptions;
|