@nest-omni/core 1.0.26 → 1.0.28

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.
@@ -242,7 +242,7 @@ function ClassField(getClass, options = {}) {
242
242
  decorators.push((0, class_validator_1.NotEquals)(null));
243
243
  }
244
244
  if (options.swagger !== false) {
245
- decorators.push((0, swagger_1.ApiProperty)(Object.assign({ type: () => classValue }, options)));
245
+ decorators.push((0, swagger_1.ApiProperty)(Object.assign({ type: () => classValue, isArray: options.each }, options)));
246
246
  }
247
247
  if (options.each) {
248
248
  decorators.push((0, transform_decorators_1.ToArray)());
@@ -261,9 +261,7 @@ exports.ClassFieldOptional = ClassFieldOptional;
261
261
  function EmailField(options = {}) {
262
262
  var _a;
263
263
  const decorators = [
264
- (0, class_validator_1.IsEmail)(options.emailOptions, {
265
- message: (_a = options.message) !== null && _a !== void 0 ? _a : (0, nestjs_i18n_1.i18nValidationMessage)('validation.INVALID_EMAIL'),
266
- }),
264
+ (0, class_validator_1.IsEmail)(options.emailOptions, Object.assign({ message: (_a = options.message) !== null && _a !== void 0 ? _a : (0, nestjs_i18n_1.i18nValidationMessage)('validation.INVALID_EMAIL') }, options)),
267
265
  StringField(Object.assign({ toLowerCase: true }, options)),
268
266
  ];
269
267
  if (options.nullable) {
@@ -333,7 +331,7 @@ function URLField(options = {}) {
333
331
  each: options.each,
334
332
  message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_URL'),
335
333
  }),
336
- StringField(Object.assign({ toLowerCase: true }, options)),
334
+ StringField(Object.assign({}, options)),
337
335
  ];
338
336
  if (options.nullable) {
339
337
  decorators.push((0, validator_decorators_1.IsNullable)({ each: options.each }));
@@ -438,7 +436,7 @@ function ObjectField(options) {
438
436
  decorators.push((0, class_validator_1.NotEquals)(null, { each: options.each }));
439
437
  }
440
438
  if (options.swagger !== false) {
441
- decorators.push((0, swagger_1.ApiProperty)(Object.assign({ type: 'object' }, options)));
439
+ decorators.push((0, swagger_1.ApiProperty)(Object.assign({ type: 'object', isArray: options.each }, options)));
442
440
  }
443
441
  return (0, common_1.applyDecorators)(...decorators);
444
442
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nest-omni/core",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "description": "framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",