@cenk1cenk2/oclif-common 3.8.0 → 3.8.2
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/dist/index.js +4 -4
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -773,8 +773,8 @@ var ValidatorService = class {
|
|
|
773
773
|
this.logger.trace("Created a new instance.");
|
|
774
774
|
}
|
|
775
775
|
async validate(classType, object, options) {
|
|
776
|
-
const classObject = (0, import_class_transformer.plainToClass)(classType, object, { ...this.options.transformer, ...options
|
|
777
|
-
const errors = await (0, import_class_validator.validate)(classObject, { ...this.options.validator, ...options
|
|
776
|
+
const classObject = (0, import_class_transformer.plainToClass)(classType, object, { ...this.options.transformer, ...options?.transformer ?? {} });
|
|
777
|
+
const errors = await (0, import_class_validator.validate)(classObject, { ...this.options.validator, ...options?.validator ?? {} });
|
|
778
778
|
if (errors.length) {
|
|
779
779
|
errors.forEach((error) => {
|
|
780
780
|
this.logValidationError(error);
|
|
@@ -784,8 +784,8 @@ var ValidatorService = class {
|
|
|
784
784
|
return classObject;
|
|
785
785
|
}
|
|
786
786
|
validateSync(classType, object, options) {
|
|
787
|
-
const classObject = (0, import_class_transformer.plainToClass)(classType, object, { ...this.options.transformer, ...options
|
|
788
|
-
const errors = (0, import_class_validator.validateSync)(classObject, { ...this.options.validator, ...options
|
|
787
|
+
const classObject = (0, import_class_transformer.plainToClass)(classType, object, { ...this.options.transformer, ...options?.transformer ?? {} });
|
|
788
|
+
const errors = (0, import_class_validator.validateSync)(classObject, { ...this.options.validator, ...options?.validator ?? {} });
|
|
789
789
|
if (errors.length) {
|
|
790
790
|
errors.forEach((error) => {
|
|
791
791
|
this.logValidationError(error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cenk1cenk2/oclif-common",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.2",
|
|
4
4
|
"description": "Oclif common package for oclif2 projects.",
|
|
5
5
|
"repository": "https://gitlab.kilic.dev/libraries/oclif-tools",
|
|
6
6
|
"author": {
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"class-transformer": "^0.5.1",
|
|
43
43
|
"class-validator": "^0.13.2",
|
|
44
44
|
"enquirer": ">= 2",
|
|
45
|
-
"execa": ">=
|
|
45
|
+
"execa": ">= 5",
|
|
46
|
+
"fs-extra": ">= 10",
|
|
46
47
|
"listr2": ">= 4",
|
|
47
|
-
"update-notifier": "^5"
|
|
48
|
-
"fs-extra": ">= 10"
|
|
48
|
+
"update-notifier": "^5"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
51
51
|
"execa": {
|
|
@@ -66,15 +66,15 @@
|
|
|
66
66
|
"yaml": "^2.1.1"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@types/fs-extra": "^9.0.13",
|
|
70
|
-
"fs-extra": "^10.1.0",
|
|
71
69
|
"@oclif/core": "^1.16.1",
|
|
70
|
+
"@types/fs-extra": "^9.0.13",
|
|
72
71
|
"@types/through": "^0.0.30",
|
|
73
72
|
"@types/update-notifier": "^5",
|
|
74
73
|
"class-transformer": "^0.5.1",
|
|
75
74
|
"class-validator": "^0.13.2",
|
|
76
75
|
"enquirer": "^2.3.6",
|
|
77
76
|
"execa": "^5",
|
|
77
|
+
"fs-extra": "^10.1.0",
|
|
78
78
|
"listr2": "^5.0.5"
|
|
79
79
|
}
|
|
80
80
|
}
|