@maioradv/nestjs-core 1.8.7 → 1.8.9

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.
@@ -6,10 +6,19 @@ const swagger_1 = require("@nestjs/swagger");
6
6
  const class_transformer_1 = require("class-transformer");
7
7
  const class_validator_1 = require("class-validator");
8
8
  const ApiSortingParams = (model) => {
9
- return (0, common_1.applyDecorators)((0, swagger_1.ApiExtraModels)(model));
9
+ return (0, common_1.applyDecorators)((0, swagger_1.ApiExtraModels)(model), (0, swagger_1.ApiQuery)({
10
+ required: false,
11
+ name: 'sorting',
12
+ style: 'simple', // deepObject
13
+ //explode: true,
14
+ description: `A json of ${model.name}`,
15
+ type: 'string', //object
16
+ example: '',
17
+ //schema: { $ref: getSchemaPath(model) },
18
+ }));
10
19
  };
11
20
  exports.ApiSortingParams = ApiSortingParams;
12
21
  const IsSortingObject = (model) => {
13
- return (0, common_1.applyDecorators)((0, swagger_1.ApiPropertyOptional)({ type: model }), (0, class_validator_1.ValidateNested)(), (0, class_transformer_1.Transform)(({ value }) => (0, class_transformer_1.plainToClass)(model, JSON.parse(value))), (0, class_transformer_1.Type)(() => model), (0, class_validator_1.IsOptional)());
22
+ return (0, common_1.applyDecorators)((0, swagger_1.ApiPropertyOptional)(), (0, class_validator_1.ValidateNested)(), (0, class_transformer_1.Transform)(({ value }) => (0, class_transformer_1.plainToClass)(model, JSON.parse(value))), (0, class_transformer_1.Type)(() => model), (0, class_validator_1.IsOptional)());
14
23
  };
15
24
  exports.IsSortingObject = IsSortingObject;
@@ -22,14 +22,14 @@ const LoggerFactoryOptions = (appName) => {
22
22
  format: winston_1.format.combine(winston_1.format.timestamp({ format: 'YYYY-MM-DDTHH:mm:ssZZ' }), winston_1.format.ms(), winston_1.format.json()),
23
23
  datePattern: 'YYYY-MM-DD',
24
24
  zippedArchive: true,
25
- maxFiles: '30d',
25
+ maxFiles: 30,
26
26
  }),
27
27
  new winston_daily_rotate_file_1.default({
28
28
  filename: (0, utils_1.joinFromRoot)(relativePath, `%DATE%-combined.log`),
29
29
  format: winston_1.format.combine(winston_1.format.timestamp({ format: 'YYYY-MM-DDTHH:mm:ssZZ' }), winston_1.format.ms(), winston_1.format.json()),
30
30
  datePattern: 'YYYY-MM-DD',
31
31
  zippedArchive: true,
32
- maxFiles: '30d',
32
+ maxFiles: 30,
33
33
  }),
34
34
  new winston_1.transports.Console({
35
35
  level: 'debug',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maioradv/nestjs-core",
3
- "version": "1.8.7",
3
+ "version": "1.8.9",
4
4
  "description": "NestJS helpers by MaiorADV",
5
5
  "repository": "https://github.com/maioradv/nestjs-core.git",
6
6
  "author": "Maior ADV Srl",