@astral/validations 4.24.3 → 4.24.4

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.
Files changed (208) hide show
  1. package/array/array.d.ts +1 -1
  2. package/boolean/boolean.d.ts +1 -1
  3. package/containsPunctuationMarks/containsPunctuationMarks.js +1 -1
  4. package/core/compose/compose.d.ts +1 -1
  5. package/core/composeAsync/composeAsync.d.ts +1 -1
  6. package/core/context/createContext/createContext.d.ts +1 -1
  7. package/core/errors/ArrayError/ArrayError.d.ts +1 -1
  8. package/core/errors/ErrorMap/ErrorMap.d.ts +1 -1
  9. package/core/errors/ErrorMap/index.d.ts +1 -1
  10. package/core/errors/ErrorMap/index.js +1 -1
  11. package/core/errors/SimpleError/SimpleError.d.ts +5 -5
  12. package/core/errors/SimpleError/createSimpleError/createSimpleError.d.ts +1 -1
  13. package/core/errors/SimpleError/index.d.ts +1 -1
  14. package/core/errors/SimpleError/index.js +1 -1
  15. package/core/errors/index.d.ts +3 -3
  16. package/core/errors/index.js +3 -3
  17. package/core/errors/types.d.ts +1 -1
  18. package/core/guard/createGuard/createGuard.d.ts +10 -10
  19. package/core/guard/createGuard/createGuard.js +1 -1
  20. package/core/index.d.ts +4 -4
  21. package/core/index.js +4 -4
  22. package/core/logger/logger.js +1 -0
  23. package/core/rule/callAsyncRule/callAsyncRule.d.ts +2 -2
  24. package/core/rule/callRule/callRule.d.ts +2 -2
  25. package/core/rule/createRule/createRule.d.ts +5 -5
  26. package/core/rule/index.d.ts +3 -3
  27. package/core/rule/index.js +3 -3
  28. package/core/rule/required/index.d.ts +1 -1
  29. package/core/rule/required/index.js +1 -1
  30. package/core/rule/required/required.js +3 -1
  31. package/core/types.d.ts +1 -1
  32. package/core/utils/index.d.ts +1 -1
  33. package/core/utils/index.js +1 -1
  34. package/core/utils/isHasConsecutiveChars/isHasConsecutiveChars.js +1 -1
  35. package/core/utils/isStringOfZeros/isStringOfZeros.js +1 -1
  36. package/date/date.d.ts +1 -1
  37. package/deepPartial/deepPartial.d.ts +2 -2
  38. package/email/email.js +3 -1
  39. package/emailOrPhone/constants.js +1 -1
  40. package/emailOrPhone/emailOrPhone.js +4 -5
  41. package/index.d.ts +48 -48
  42. package/index.js +48 -48
  43. package/innFL/index.d.ts +1 -1
  44. package/innFL/index.js +1 -1
  45. package/innIP/index.d.ts +1 -1
  46. package/innIP/index.js +1 -1
  47. package/innTwelveSymbols/index.d.ts +1 -1
  48. package/innTwelveSymbols/index.js +1 -1
  49. package/innUL/index.d.ts +1 -1
  50. package/innUL/index.js +1 -1
  51. package/length/index.d.ts +1 -1
  52. package/length/index.js +1 -1
  53. package/max/index.d.ts +1 -1
  54. package/max/index.js +1 -1
  55. package/max/max.d.ts +6 -6
  56. package/max/max.js +1 -0
  57. package/min/index.d.ts +1 -1
  58. package/min/index.js +1 -1
  59. package/min/min.d.ts +6 -6
  60. package/min/min.js +1 -0
  61. package/minYearsOld/index.d.ts +1 -1
  62. package/minYearsOld/index.js +1 -1
  63. package/minYearsOld/minYearsOld.d.ts +1 -1
  64. package/mobilePhone/index.d.ts +1 -1
  65. package/mobilePhone/index.js +1 -1
  66. package/node/array/array.d.ts +1 -1
  67. package/node/boolean/boolean.d.ts +1 -1
  68. package/node/containsPunctuationMarks/containsPunctuationMarks.js +1 -1
  69. package/node/core/compose/compose.d.ts +1 -1
  70. package/node/core/composeAsync/composeAsync.d.ts +1 -1
  71. package/node/core/context/createContext/createContext.d.ts +1 -1
  72. package/node/core/errors/ArrayError/ArrayError.d.ts +1 -1
  73. package/node/core/errors/ErrorMap/ErrorMap.d.ts +1 -1
  74. package/node/core/errors/ErrorMap/index.d.ts +1 -1
  75. package/node/core/errors/ErrorMap/index.js +1 -1
  76. package/node/core/errors/SimpleError/SimpleError.d.ts +5 -5
  77. package/node/core/errors/SimpleError/createSimpleError/createSimpleError.d.ts +1 -1
  78. package/node/core/errors/SimpleError/index.d.ts +1 -1
  79. package/node/core/errors/SimpleError/index.js +1 -1
  80. package/node/core/errors/index.d.ts +3 -3
  81. package/node/core/errors/index.js +3 -3
  82. package/node/core/errors/types.d.ts +1 -1
  83. package/node/core/guard/createGuard/createGuard.d.ts +10 -10
  84. package/node/core/guard/createGuard/createGuard.js +1 -1
  85. package/node/core/index.d.ts +4 -4
  86. package/node/core/index.js +4 -4
  87. package/node/core/logger/logger.js +1 -0
  88. package/node/core/rule/callAsyncRule/callAsyncRule.d.ts +2 -2
  89. package/node/core/rule/callRule/callRule.d.ts +2 -2
  90. package/node/core/rule/createRule/createRule.d.ts +5 -5
  91. package/node/core/rule/index.d.ts +3 -3
  92. package/node/core/rule/index.js +3 -3
  93. package/node/core/rule/required/index.d.ts +1 -1
  94. package/node/core/rule/required/index.js +1 -1
  95. package/node/core/rule/required/required.js +3 -1
  96. package/node/core/types.d.ts +1 -1
  97. package/node/core/utils/index.d.ts +1 -1
  98. package/node/core/utils/index.js +1 -1
  99. package/node/core/utils/isHasConsecutiveChars/isHasConsecutiveChars.js +1 -1
  100. package/node/core/utils/isStringOfZeros/isStringOfZeros.js +1 -1
  101. package/node/date/date.d.ts +1 -1
  102. package/node/deepPartial/deepPartial.d.ts +2 -2
  103. package/node/email/email.js +3 -1
  104. package/node/emailOrPhone/emailOrPhone.js +4 -5
  105. package/node/index.d.ts +48 -48
  106. package/node/index.js +136 -136
  107. package/node/innFL/index.d.ts +1 -1
  108. package/node/innFL/index.js +1 -1
  109. package/node/innIP/index.d.ts +1 -1
  110. package/node/innIP/index.js +1 -1
  111. package/node/innTwelveSymbols/index.d.ts +1 -1
  112. package/node/innTwelveSymbols/index.js +1 -1
  113. package/node/innUL/index.d.ts +1 -1
  114. package/node/innUL/index.js +1 -1
  115. package/node/length/index.d.ts +1 -1
  116. package/node/length/index.js +1 -1
  117. package/node/max/index.d.ts +1 -1
  118. package/node/max/index.js +1 -1
  119. package/node/max/max.d.ts +6 -6
  120. package/node/max/max.js +1 -0
  121. package/node/min/index.d.ts +1 -1
  122. package/node/min/index.js +1 -1
  123. package/node/min/min.d.ts +6 -6
  124. package/node/min/min.js +1 -0
  125. package/node/minYearsOld/index.d.ts +1 -1
  126. package/node/minYearsOld/index.js +1 -1
  127. package/node/minYearsOld/minYearsOld.d.ts +1 -1
  128. package/node/mobilePhone/index.d.ts +1 -1
  129. package/node/mobilePhone/index.js +1 -1
  130. package/node/number/index.d.ts +1 -1
  131. package/node/number/index.js +1 -1
  132. package/node/number/number.d.ts +1 -1
  133. package/node/object/index.d.ts +1 -1
  134. package/node/object/index.js +1 -1
  135. package/node/object/object.d.ts +6 -6
  136. package/node/object/object.js +6 -4
  137. package/node/object/objectAsync/objectAsync.d.ts +9 -9
  138. package/node/object/objectAsync/objectAsync.js +7 -5
  139. package/node/ogrnIP/index.d.ts +1 -1
  140. package/node/ogrnIP/index.js +1 -1
  141. package/node/ogrnUL/index.d.ts +1 -1
  142. package/node/ogrnUL/index.js +1 -1
  143. package/node/or/or.js +1 -1
  144. package/node/partial/partial.d.ts +1 -1
  145. package/node/passportNumber/passportNumber.js +1 -1
  146. package/node/pattern/index.d.ts +1 -1
  147. package/node/pattern/index.js +1 -1
  148. package/node/rangeDate/rangeDate.d.ts +1 -1
  149. package/node/rangeDate/rangeDate.js +9 -3
  150. package/node/rangeDateMinMax/rangeDateMinMax.js +3 -1
  151. package/node/snils/index.d.ts +1 -1
  152. package/node/snils/index.js +1 -1
  153. package/node/snils/snils.js +3 -1
  154. package/node/string/index.d.ts +1 -1
  155. package/node/string/index.js +1 -1
  156. package/node/string/string.d.ts +1 -1
  157. package/node/string/stringAsync/stringAsync.d.ts +1 -1
  158. package/node/string/stringAsync/stringAsync.js +1 -1
  159. package/node/toPlainError/toPlainError.js +1 -4
  160. package/node/toPlainError/utils/index.d.ts +1 -1
  161. package/node/toPlainError/utils/index.js +1 -1
  162. package/node/uploadedFile/index.d.ts +1 -1
  163. package/node/uploadedFile/index.js +1 -1
  164. package/node/uploadedFile/uploadedFile.d.ts +1 -1
  165. package/node/uploadedFileList/index.d.ts +1 -1
  166. package/node/uploadedFileList/index.js +1 -1
  167. package/node/uploadedFileList/uploadedFileList.d.ts +1 -1
  168. package/node/uploadedFileList/uploadedFileList.js +1 -1
  169. package/number/index.d.ts +1 -1
  170. package/number/index.js +1 -1
  171. package/number/number.d.ts +1 -1
  172. package/object/index.d.ts +1 -1
  173. package/object/index.js +1 -1
  174. package/object/object.d.ts +6 -6
  175. package/object/object.js +6 -4
  176. package/object/objectAsync/objectAsync.d.ts +9 -9
  177. package/object/objectAsync/objectAsync.js +7 -5
  178. package/ogrnIP/index.d.ts +1 -1
  179. package/ogrnIP/index.js +1 -1
  180. package/ogrnUL/index.d.ts +1 -1
  181. package/ogrnUL/index.js +1 -1
  182. package/or/or.js +1 -1
  183. package/package.json +1 -1
  184. package/partial/partial.d.ts +1 -1
  185. package/passportNumber/passportNumber.js +1 -1
  186. package/pattern/index.d.ts +1 -1
  187. package/pattern/index.js +1 -1
  188. package/rangeDate/rangeDate.d.ts +1 -1
  189. package/rangeDate/rangeDate.js +9 -3
  190. package/rangeDateMinMax/rangeDateMinMax.js +3 -1
  191. package/snils/index.d.ts +1 -1
  192. package/snils/index.js +1 -1
  193. package/snils/snils.js +3 -1
  194. package/string/index.d.ts +1 -1
  195. package/string/index.js +1 -1
  196. package/string/string.d.ts +1 -1
  197. package/string/stringAsync/stringAsync.d.ts +1 -1
  198. package/string/stringAsync/stringAsync.js +1 -1
  199. package/toPlainError/toPlainError.js +1 -4
  200. package/toPlainError/utils/index.d.ts +1 -1
  201. package/toPlainError/utils/index.js +1 -1
  202. package/uploadedFile/index.d.ts +1 -1
  203. package/uploadedFile/index.js +1 -1
  204. package/uploadedFile/uploadedFile.d.ts +1 -1
  205. package/uploadedFileList/index.d.ts +1 -1
  206. package/uploadedFileList/index.js +1 -1
  207. package/uploadedFileList/uploadedFileList.d.ts +1 -1
  208. package/uploadedFileList/uploadedFileList.js +1 -1
package/index.js CHANGED
@@ -1,54 +1,54 @@
1
- export { object, objectAsync, OBJECT_TYPE_ERROR_INFO, } from './object';
2
- export { optional, optionalAsync } from './optional';
3
- export { string, STRING_TYPE_ERROR_INFO, stringAsync } from './string';
4
- export { textField, INVALID_TEXT_FIELD_ERROR_INFO, LENGTH_TEXT_FIELD_ERROR_INFO, } from './textField';
5
- export { date, INVALID_DATE_ERROR_INFO, DATE_TYPE_ERROR_INFO } from './date';
6
- export { number, NAN_NUMBER_ERROR_INFO, NUMBER_TYPE_ERROR_INFO, INFINITY_NUMBER_ERROR_INFO, } from './number';
7
- export { boolean, BOOLEAN_TYPE_ERROR_INFO } from './boolean';
8
- export { array, ARRAY_TYPE_ERROR_INFO } from './array';
1
+ export { any } from './any';
2
+ export { ARRAY_TYPE_ERROR_INFO, array } from './array';
9
3
  export { arrayItem } from './arrayItem';
4
+ export { BOOLEAN_TYPE_ERROR_INFO, boolean } from './boolean';
5
+ export { CONTAINS_DIFFERENT_CASES_ERROR_CODE, containsDifferentCases, } from './containsDifferentCases';
6
+ export { CONTAINS_NUMBERS_ERROR_CODE, containsNumbers, } from './containsNumbers';
7
+ export { CONTAINS_PUNCTUATION_MARKS_ERROR_CODE, containsPunctuationMarks, } from './containsPunctuationMarks';
8
+ export { createRule, REQUIRED_ERROR_INFO } from './core';
9
+ export { DATE_TYPE_ERROR_INFO, date, INVALID_DATE_ERROR_INFO } from './date';
10
10
  export { deepPartial } from './deepPartial';
11
- export { partial } from './partial';
12
- export { minYearsOld, BIRTH_DATE_MIN_ERROR_CODE, BIRTH_DATE_MAX_ERROR_CODE, } from './minYearsOld';
13
- export { min, STRING_MIN_ERROR_CODE, ARRAY_MIN_ERROR_CODE, DATE_MIN_ERROR_CODE, NUMBER_MIN_ERROR_CODE, } from './min';
14
- export { max, STRING_MAX_ERROR_CODE, ARRAY_MAX_ERROR_CODE, DATE_MAX_ERROR_CODE, NUMBER_MAX_ERROR_CODE, } from './max';
15
- export { integer, INTEGER_ERROR_INFO } from './integer';
16
- export { positiveNumber, POSITIVE_NUMBER_ERROR_INFO } from './positiveNumber';
17
- export { or } from './or';
18
- export { pattern, PATTERN_ERROR_CODE } from './pattern';
19
- export { onlyNumber, ONLY_NUMBER_ERROR_CODE } from './onlyNumber';
20
- export { containsNumbers, CONTAINS_NUMBERS_ERROR_CODE, } from './containsNumbers';
21
- export { containsPunctuationMarks, CONTAINS_PUNCTUATION_MARKS_ERROR_CODE, } from './containsPunctuationMarks';
22
- export { containsDifferentCases, CONTAINS_DIFFERENT_CASES_ERROR_CODE, } from './containsDifferentCases';
23
- export { toPlainError } from './toPlainError';
24
- export { email, LENGTH_EMAIL_ERROR_INFO, INVALID_EMAIL_ERROR_INFO, } from './email';
25
- export { emailOrPhone, EMAIL_OR_PHONE_ERROR_INFO } from './emailOrPhone';
11
+ export { email, INVALID_EMAIL_ERROR_INFO, LENGTH_EMAIL_ERROR_INFO, } from './email';
12
+ export { EMAIL_OR_PHONE_ERROR_INFO, emailOrPhone } from './emailOrPhone';
13
+ export { enabled } from './enabled';
26
14
  export { guid, INVALID_GUID_ERROR_INFO } from './guid';
15
+ export { INN_FL_ERROR_INFO, innFL } from './innFL';
16
+ export { INN_IP_ERROR_INFO, innIP } from './innIP';
17
+ export { INN_12_SYMBOLS_ERROR_INFO, innTwelveSymbols, } from './innTwelveSymbols';
18
+ export { INN_UL_ERROR_INFO, innUL } from './innUL';
19
+ export { INTEGER_ERROR_INFO, integer } from './integer';
20
+ export { INVALID_KPP_ERROR_INFO, KPP_DOUBLE_ZERO_START_ERROR_INFO, KPP_ZEROS_ONLY_ERROR_INFO, kpp, } from './kpp';
27
21
  export { length, STRING_LENGTH_ERROR_CODE } from './length';
28
- export { mobilePhone, MOBILE_PHONE_ERROR_INFO } from './mobilePhone';
29
- export { innUL, INN_UL_ERROR_INFO } from './innUL';
30
- export { innTwelveSymbols, INN_12_SYMBOLS_ERROR_INFO, } from './innTwelveSymbols';
31
- export { innIP, INN_IP_ERROR_INFO } from './innIP';
32
- export { innFL, INN_FL_ERROR_INFO } from './innFL';
33
- export { kpp, INVALID_KPP_ERROR_INFO, KPP_DOUBLE_ZERO_START_ERROR_INFO, KPP_ZEROS_ONLY_ERROR_INFO, } from './kpp';
34
- export { snils, SNILS_ERROR_INFO } from './snils';
35
- export { createRule, REQUIRED_ERROR_INFO } from './core';
36
- export { ogrnUL, OGRN_UL_ERROR_INFO } from './ogrnUL';
37
- export { ogrnIP, OGRN_IP_ERROR_INFO } from './ogrnIP';
38
- export { personName, PERSON_NAME_ERROR_INFO } from './personName';
39
- export { personSurname, PERSON_SURNAME_ERROR_INFO } from './personSurname';
40
- export { passportSeries, PASSPORT_SERIES_ERROR_INFO, PASSPORT_SERIES_ERROR_LENGTH_INFO, PASSPORT_SERIES_ONLY_DIGITS_ERROR_INFO, } from './passportSeries';
41
- export { passportNumber, PASSPORT_NUMBER_ERROR_INFO, PASSPORT_NUMBER_LENGTH_ERROR_INFO, PASSPORT_NUMBER_ONLY_DIGITS_ERROR_INFO, } from './passportNumber';
42
- export { passportCode, PASSPORT_CODE_ERROR_INFO, PASSPORT_CODE_LENGTH_ERROR_INFO, PASSPORT_CODE_ONLY_DIGITS_ERROR_INFO, } from './passportCode';
43
- export { personPatronymic, PERSON_PATRONYMIC_ERROR_INFO, } from './personPatronymic';
44
- export { any } from './any';
45
- export { when } from './when';
22
+ export { ARRAY_MAX_ERROR_CODE, DATE_MAX_ERROR_CODE, max, NUMBER_MAX_ERROR_CODE, STRING_MAX_ERROR_CODE, } from './max';
23
+ export { ARRAY_MIN_ERROR_CODE, DATE_MIN_ERROR_CODE, min, NUMBER_MIN_ERROR_CODE, STRING_MIN_ERROR_CODE, } from './min';
24
+ export { BIRTH_DATE_MAX_ERROR_CODE, BIRTH_DATE_MIN_ERROR_CODE, minYearsOld, } from './minYearsOld';
25
+ export { MOBILE_PHONE_ERROR_INFO, mobilePhone } from './mobilePhone';
26
+ export { INFINITY_NUMBER_ERROR_INFO, NAN_NUMBER_ERROR_INFO, NUMBER_TYPE_ERROR_INFO, number, } from './number';
27
+ export { OBJECT_TYPE_ERROR_INFO, object, objectAsync, } from './object';
28
+ export { OGRN_IP_ERROR_INFO, ogrnIP } from './ogrnIP';
29
+ export { OGRN_UL_ERROR_INFO, ogrnUL } from './ogrnUL';
30
+ export { ONLY_NUMBER_ERROR_CODE, onlyNumber } from './onlyNumber';
31
+ export { optional, optionalAsync } from './optional';
32
+ export { or } from './or';
33
+ export { partial } from './partial';
34
+ export { PASSPORT_CODE_ERROR_INFO, PASSPORT_CODE_LENGTH_ERROR_INFO, PASSPORT_CODE_ONLY_DIGITS_ERROR_INFO, passportCode, } from './passportCode';
35
+ export { PASSPORT_NUMBER_ERROR_INFO, PASSPORT_NUMBER_LENGTH_ERROR_INFO, PASSPORT_NUMBER_ONLY_DIGITS_ERROR_INFO, passportNumber, } from './passportNumber';
36
+ export { PASSPORT_SERIES_ERROR_INFO, PASSPORT_SERIES_ERROR_LENGTH_INFO, PASSPORT_SERIES_ONLY_DIGITS_ERROR_INFO, passportSeries, } from './passportSeries';
37
+ export { PATTERN_ERROR_CODE, pattern } from './pattern';
38
+ export { PERSON_NAME_ERROR_INFO, personName } from './personName';
39
+ export { PERSON_PATRONYMIC_ERROR_INFO, personPatronymic, } from './personPatronymic';
40
+ export { PERSON_SURNAME_ERROR_INFO, personSurname } from './personSurname';
41
+ export { POSITIVE_NUMBER_ERROR_INFO, positiveNumber } from './positiveNumber';
42
+ export { RANGE_DATE_END_EARLIER_START_ERROR_INFO, RANGE_DATE_END_INVALID_ERROR_INFO, RANGE_DATE_END_REQUIRED_ERROR_INFO, RANGE_DATE_REQUIRED_ERROR_INFO, RANGE_DATE_START_INVALID_ERROR_INFO, RANGE_DATE_START_REQUIRED_ERROR_INFO, rangeDate, } from './rangeDate';
43
+ export { RANGE_DATE_INTERVAL_ERROR_INFO, rangeDateInterval, } from './rangeDateInterval';
44
+ export { RANGE_DATE_MAX_ERROR_INFO, RANGE_DATE_MIN_ERROR_INFO, rangeDateMinMax, } from './rangeDateMinMax';
45
+ export { RANGE_DATE_NOT_EQUAL_ERROR_INFO, rangeDateNotEqual, } from './rangeDateNotEqual';
46
+ export { SNILS_ERROR_INFO, snils } from './snils';
47
+ export { STRING_TYPE_ERROR_INFO, string, stringAsync } from './string';
48
+ export { INVALID_TEXT_FIELD_ERROR_INFO, LENGTH_TEXT_FIELD_ERROR_INFO, textField, } from './textField';
49
+ export { toPlainError } from './toPlainError';
46
50
  export { toPrettyError } from './toPrettyError';
47
51
  export { transform } from './transform';
48
- export { enabled } from './enabled';
49
- export { rangeDate, RANGE_DATE_END_EARLIER_START_ERROR_INFO, RANGE_DATE_END_INVALID_ERROR_INFO, RANGE_DATE_END_REQUIRED_ERROR_INFO, RANGE_DATE_REQUIRED_ERROR_INFO, RANGE_DATE_START_INVALID_ERROR_INFO, RANGE_DATE_START_REQUIRED_ERROR_INFO, } from './rangeDate';
50
- export { rangeDateInterval, RANGE_DATE_INTERVAL_ERROR_INFO, } from './rangeDateInterval';
51
- export { rangeDateMinMax, RANGE_DATE_MAX_ERROR_INFO, RANGE_DATE_MIN_ERROR_INFO, } from './rangeDateMinMax';
52
- export { rangeDateNotEqual, RANGE_DATE_NOT_EQUAL_ERROR_INFO, } from './rangeDateNotEqual';
53
- export { uploadedFile, FILE_UPLOAD_ERROR_INFO, FILE_LOADING_ERROR_INFO, FILE_REQUIRED_ERROR_INFO, FILE_RESTRICTION_ERROR_INFO, } from './uploadedFile';
54
- export { uploadedFileList, FILE_LIST_NOT_ARRAY_ERROR_INFO, } from './uploadedFileList';
52
+ export { FILE_LOADING_ERROR_INFO, FILE_REQUIRED_ERROR_INFO, FILE_RESTRICTION_ERROR_INFO, FILE_UPLOAD_ERROR_INFO, uploadedFile, } from './uploadedFile';
53
+ export { FILE_LIST_NOT_ARRAY_ERROR_INFO, uploadedFileList, } from './uploadedFileList';
54
+ export { when } from './when';
package/innFL/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './innFL';
2
1
  export * from './constants';
2
+ export * from './innFL';
package/innFL/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from './innFL';
2
1
  export * from './constants';
2
+ export * from './innFL';
package/innIP/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './innIP';
2
1
  export * from './constants';
2
+ export * from './innIP';
package/innIP/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from './innIP';
2
1
  export * from './constants';
2
+ export * from './innIP';
@@ -1,2 +1,2 @@
1
- export * from './innTwelveSymbols';
2
1
  export * from './constants';
2
+ export * from './innTwelveSymbols';
@@ -1,2 +1,2 @@
1
- export * from './innTwelveSymbols';
2
1
  export * from './constants';
2
+ export * from './innTwelveSymbols';
package/innUL/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './innUL';
2
1
  export * from './constants';
2
+ export * from './innUL';
package/innUL/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from './innUL';
2
1
  export * from './constants';
2
+ export * from './innUL';
package/length/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './length';
2
1
  export * from './constants';
2
+ export * from './length';
package/length/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from './length';
2
1
  export * from './constants';
2
+ export * from './length';
package/max/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './max';
2
1
  export * from './constants';
2
+ export * from './max';
package/max/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from './max';
2
1
  export * from './constants';
2
+ export * from './max';
package/max/max.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { type ValidationContext, createRule } from '../core';
2
- type BaseMaxValidationTypes = number | string | Array<unknown>;
1
+ import { createRule, type ValidationContext } from '../core';
2
+ type BaseMaxValidationTypes = number | string | unknown[];
3
3
  type CommonThreshold = number | Date;
4
- type MaxParams<ValidationType> = {
4
+ type MaxParams<TValidationType> = {
5
5
  /**
6
6
  * Сообщение ошибки
7
7
  */
8
- getMessage?: (threshold: CommonThreshold, value: ValidationType, ctx: ValidationContext) => string;
8
+ getMessage?: (threshold: CommonThreshold, value: TValidationType, ctx: ValidationContext) => string;
9
9
  };
10
10
  /**
11
11
  * Проверяет значение на соответствие максимуму. Работает с: string, array, Date, number
@@ -21,6 +21,6 @@ type MaxParams<ValidationType> = {
21
21
  * date(max(new Date())));
22
22
  * ```
23
23
  */
24
- export declare function max<ValidationType extends Date, TLastSchemaValues extends Record<string, unknown> = {}>(threshold: Date, params?: MaxParams<ValidationType>): ReturnType<typeof createRule<Date, TLastSchemaValues>>;
25
- export declare function max<ValidationType extends BaseMaxValidationTypes, TLastSchemaValues extends Record<string, unknown> = {}>(threshold: number, params?: MaxParams<ValidationType>): ReturnType<typeof createRule<BaseMaxValidationTypes, TLastSchemaValues>>;
24
+ export declare function max<TValidationType extends Date, TLastSchemaValues extends Record<string, unknown> = {}>(threshold: Date, params?: MaxParams<TValidationType>): ReturnType<typeof createRule<Date, TLastSchemaValues>>;
25
+ export declare function max<TValidationType extends BaseMaxValidationTypes, TLastSchemaValues extends Record<string, unknown> = {}>(threshold: number, params?: MaxParams<TValidationType>): ReturnType<typeof createRule<BaseMaxValidationTypes, TLastSchemaValues>>;
26
26
  export {};
package/max/max.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { createRule, resetTime } from '../core';
2
2
  import { ARRAY_MAX_ERROR_CODE, DATE_MAX_ERROR_CODE, NUMBER_MAX_ERROR_CODE, STRING_MAX_ERROR_CODE, } from './constants';
3
3
  export function max(threshold, params) {
4
+ // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: <>
4
5
  return createRule((value, ctx) => {
5
6
  const getMessage = (typeMessage) => (params === null || params === void 0 ? void 0 : params.getMessage)
6
7
  ? params.getMessage(threshold, value, ctx)
package/min/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './min';
2
1
  export * from './constants';
2
+ export * from './min';
package/min/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from './min';
2
1
  export * from './constants';
2
+ export * from './min';
package/min/min.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { type ValidationContext, createRule } from '../core';
2
- type BaseMinValidationTypes = number | string | Array<unknown>;
1
+ import { createRule, type ValidationContext } from '../core';
2
+ type BaseMinValidationTypes = number | string | unknown[];
3
3
  type CommonThreshold = number | Date;
4
- type MinParams<ValidationType> = {
4
+ type MinParams<TValidationType> = {
5
5
  /**
6
6
  * Сообщение ошибки
7
7
  */
8
- getMessage?: (threshold: CommonThreshold, value: ValidationType, ctx: ValidationContext) => string;
8
+ getMessage?: (threshold: CommonThreshold, value: TValidationType, ctx: ValidationContext) => string;
9
9
  };
10
10
  /**
11
11
  * Проверяет значение на соответствие минимуму. Работает с: string, array, Date, number
@@ -21,6 +21,6 @@ type MinParams<ValidationType> = {
21
21
  * date(min(new Date())));
22
22
  * ```
23
23
  */
24
- export declare function min<ValidationType extends Date, TLastSchemaValues extends Record<string, unknown> = {}>(threshold: Date, params?: MinParams<ValidationType>): ReturnType<typeof createRule<Date, TLastSchemaValues>>;
25
- export declare function min<ValidationType extends BaseMinValidationTypes, TLastSchemaValues extends Record<string, unknown> = {}>(threshold: number, params?: MinParams<ValidationType>): ReturnType<typeof createRule<BaseMinValidationTypes, TLastSchemaValues>>;
24
+ export declare function min<TValidationType extends Date, TLastSchemaValues extends Record<string, unknown> = {}>(threshold: Date, params?: MinParams<TValidationType>): ReturnType<typeof createRule<Date, TLastSchemaValues>>;
25
+ export declare function min<TValidationType extends BaseMinValidationTypes, TLastSchemaValues extends Record<string, unknown> = {}>(threshold: number, params?: MinParams<TValidationType>): ReturnType<typeof createRule<BaseMinValidationTypes, TLastSchemaValues>>;
26
26
  export {};
package/min/min.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { createRule, resetTime } from '../core';
2
2
  import { ARRAY_MIN_ERROR_CODE, DATE_MIN_ERROR_CODE, NUMBER_MIN_ERROR_CODE, STRING_MIN_ERROR_CODE, } from './constants';
3
3
  export function min(threshold, params) {
4
+ // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: <>
4
5
  return createRule((value, ctx) => {
5
6
  const getMessage = (typeMessage) => (params === null || params === void 0 ? void 0 : params.getMessage)
6
7
  ? params.getMessage(threshold, value, ctx)
@@ -1,2 +1,2 @@
1
- export * from './minYearsOld';
2
1
  export * from './constants';
2
+ export * from './minYearsOld';
@@ -1,2 +1,2 @@
1
- export * from './minYearsOld';
2
1
  export * from './constants';
2
+ export * from './minYearsOld';
@@ -20,5 +20,5 @@ type MinYearsOldParams = {
20
20
  * );
21
21
  * ```
22
22
  */
23
- export declare function minYearsOld<ValidationType, TLastSchemaValues extends Record<string, unknown> = {}>(age: number, params?: MinYearsOldParams): (value: ValidationType, prevCtx?: import("../core").ValidationContext<TLastSchemaValues> | undefined) => ReturnType<import("../core").IndependentValidationRule<ValidationType, TLastSchemaValues>>;
23
+ export declare function minYearsOld<TValidationType, TLastSchemaValues extends Record<string, unknown> = {}>(age: number, params?: MinYearsOldParams): (value: TValidationType, prevCtx?: import("../core").ValidationContext<TLastSchemaValues> | undefined) => ReturnType<import("../core").IndependentValidationRule<TValidationType, TLastSchemaValues>>;
24
24
  export {};
@@ -1,2 +1,2 @@
1
- export * from './mobilePhone';
2
1
  export * from './constants';
2
+ export * from './mobilePhone';
@@ -1,2 +1,2 @@
1
- export * from './mobilePhone';
2
1
  export * from './constants';
2
+ export * from './mobilePhone';
@@ -12,4 +12,4 @@ import { type ValidationRule, type ValidationTypes } from '../core';
12
12
  * validateArray(value);
13
13
  * ```
14
14
  */
15
- export declare const array: <TItem extends ValidationTypes, TLastSchemaValues extends Record<string, unknown> = {}>(...rules: ValidationRule<Array<TItem>, TLastSchemaValues>[]) => import("../core").Guard<TLastSchemaValues, {}>;
15
+ export declare const array: <TItem extends ValidationTypes, TLastSchemaValues extends Record<string, unknown> = {}>(...rules: ValidationRule<TItem[], TLastSchemaValues>[]) => import("../core").IGuard<TLastSchemaValues, {}>;
@@ -10,4 +10,4 @@ import { type ValidationRule } from '../core';
10
10
  * validate(true);
11
11
  * ```
12
12
  */
13
- export declare const boolean: <TLastSchemaValues extends Record<string, unknown>>(...rules: ValidationRule<boolean, TLastSchemaValues>[]) => import("../core").Guard<TLastSchemaValues, {}>;
13
+ export declare const boolean: <TLastSchemaValues extends Record<string, unknown>>(...rules: ValidationRule<boolean, TLastSchemaValues>[]) => import("../core").IGuard<TLastSchemaValues, {}>;
@@ -12,7 +12,7 @@ const constants_1 = require("./constants");
12
12
  * ```
13
13
  */
14
14
  const containsPunctuationMarks = (params) => (0, core_1.createRule)((value, ctx) => {
15
- const containsPunctuationMarksRegex = /(?=.*[!$%&’”'"()+,-.\/:;<=>?@\[\]^_{|}])/;
15
+ const containsPunctuationMarksRegex = /(?=.*[!$%&’”'"()+,-./:;<=>?@[\]^_{|}])/;
16
16
  if (!containsPunctuationMarksRegex.test(value)) {
17
17
  return ctx.createError({
18
18
  code: constants_1.CONTAINS_PUNCTUATION_MARKS_ERROR_CODE,
@@ -3,4 +3,4 @@ import { type IndependentValidationRule, type ValidationRule } from '../rule';
3
3
  * Объединяет переданные правила в цепочку правил, останавливает выполнение цепочки, если появилась ошибка. Выполняет правила слева направо
4
4
  * @example compose(min(), max());
5
5
  */
6
- export declare const compose: <ValidationType, TLastSchemaValues extends Record<string, unknown>>(...rules: Array<IndependentValidationRule<ValidationType, TLastSchemaValues> | ValidationRule<ValidationType, TLastSchemaValues>>) => IndependentValidationRule<ValidationType, Record<string, unknown>>;
6
+ export declare const compose: <TValidationType, TLastSchemaValues extends Record<string, unknown>>(...rules: Array<IndependentValidationRule<TValidationType, TLastSchemaValues> | ValidationRule<TValidationType, TLastSchemaValues>>) => IndependentValidationRule<TValidationType, Record<string, unknown>>;
@@ -3,4 +3,4 @@ import { type AsyncIndependentValidationRule, type AsyncValidationRule, type Ind
3
3
  * Объединяет переданные асинхронные правила в цепочку правил, останавливает выполнение цепочки, если появилась ошибка. Выполняет правила слева направо
4
4
  * @example composeAsync(stringAsync(), max());
5
5
  */
6
- export declare const composeAsync: <ValidationType, TLastSchemaValues extends Record<string, unknown>>(...rules: Array<IndependentValidationRule<ValidationType, TLastSchemaValues> | AsyncIndependentValidationRule<ValidationType, TLastSchemaValues> | ValidationRule<ValidationType, TLastSchemaValues> | AsyncValidationRule<ValidationType, TLastSchemaValues>>) => AsyncIndependentValidationRule<ValidationType, Record<string, unknown>>;
6
+ export declare const composeAsync: <TValidationType, TLastSchemaValues extends Record<string, unknown>>(...rules: Array<IndependentValidationRule<TValidationType, TLastSchemaValues> | AsyncIndependentValidationRule<TValidationType, TLastSchemaValues> | ValidationRule<TValidationType, TLastSchemaValues> | AsyncValidationRule<TValidationType, TLastSchemaValues>>) => AsyncIndependentValidationRule<TValidationType, Record<string, unknown>>;
@@ -1,6 +1,6 @@
1
1
  import { type DeepPartial } from 'utility-types';
2
- import { type ValidationContext } from '../types';
3
2
  import { type ValidationTypes } from '../../types';
3
+ import { type ValidationContext } from '../types';
4
4
  type Params<TLastSchemaValues extends Record<string, unknown>> = {
5
5
  /**
6
6
  * Value последнего валидируемого объекта
@@ -8,7 +8,7 @@ export type ValidationArrayErrorCause = {
8
8
  * Массив ошибок элементов валидируемого массива.
9
9
  * Индекс errorArray соответвует индексу валидируемого элемента массива
10
10
  */
11
- errorArray: Array<ValidationResult>;
11
+ errorArray: ValidationResult[];
12
12
  };
13
13
  /**
14
14
  * Array ошибок для массива
@@ -1,5 +1,5 @@
1
- import { type ValidationErrorData, ValidationSimpleError } from '../SimpleError';
2
1
  import { type ValidationResult } from '../../types';
2
+ import { type ValidationErrorData, ValidationSimpleError } from '../SimpleError';
3
3
  /**
4
4
  * Map, которое содержит результат валидации свойств
5
5
  */
@@ -1,2 +1,2 @@
1
- export * from './ErrorMap';
2
1
  export * from './createErrorMap';
2
+ export * from './ErrorMap';
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./ErrorMap"), exports);
18
17
  __exportStar(require("./createErrorMap"), exports);
18
+ __exportStar(require("./ErrorMap"), exports);
@@ -2,15 +2,15 @@ import { type ErrorCode } from '../types';
2
2
  /**
3
3
  * Причина ошибки валидации
4
4
  */
5
- export type ValidationErrorData<AddCause extends Record<string, unknown>> = {
6
- cause: AddCause & {
5
+ export type ValidationErrorData<TAddCause extends Record<string, unknown>> = {
6
+ cause: TAddCause & {
7
7
  code: ErrorCode;
8
8
  };
9
9
  };
10
10
  /**
11
11
  * Простая ошибка правил валидации. Не имеет вложенных ошибок
12
12
  */
13
- export declare class ValidationSimpleError<AddCause extends Record<string, unknown> = {}> extends Error {
14
- cause: ValidationErrorData<AddCause>['cause'];
15
- constructor(message: string, data: ValidationErrorData<AddCause>);
13
+ export declare class ValidationSimpleError<TAddCause extends Record<string, unknown> = {}> extends Error {
14
+ cause: ValidationErrorData<TAddCause>['cause'];
15
+ constructor(message: string, data: ValidationErrorData<TAddCause>);
16
16
  }
@@ -1,5 +1,5 @@
1
- import { ValidationSimpleError } from '../SimpleError';
2
1
  import { type ErrorInfo } from '../../types';
2
+ import { ValidationSimpleError } from '../SimpleError';
3
3
  /**
4
4
  * Создает простую ошибки валидации. Используется в обычных rules
5
5
  */
@@ -1,2 +1,2 @@
1
- export * from './SimpleError';
2
1
  export * from './createSimpleError';
2
+ export * from './SimpleError';
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./SimpleError"), exports);
18
17
  __exportStar(require("./createSimpleError"), exports);
18
+ __exportStar(require("./SimpleError"), exports);
@@ -1,6 +1,6 @@
1
- export * from './SimpleError';
2
1
  export * from './ArrayError';
2
+ export * from './constants';
3
+ export * from './createErrorCode';
3
4
  export * from './ErrorMap';
5
+ export * from './SimpleError';
4
6
  export * from './types';
5
- export * from './createErrorCode';
6
- export * from './constants';
@@ -14,9 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./SimpleError"), exports);
18
17
  __exportStar(require("./ArrayError"), exports);
18
+ __exportStar(require("./constants"), exports);
19
+ __exportStar(require("./createErrorCode"), exports);
19
20
  __exportStar(require("./ErrorMap"), exports);
21
+ __exportStar(require("./SimpleError"), exports);
20
22
  __exportStar(require("./types"), exports);
21
- __exportStar(require("./createErrorCode"), exports);
22
- __exportStar(require("./constants"), exports);
@@ -1,6 +1,6 @@
1
+ import { type ValidationArrayError } from './ArrayError';
1
2
  import { type ValidationErrorMap } from './ErrorMap';
2
3
  import { type ValidationSimpleError } from './SimpleError';
3
- import { type ValidationArrayError } from './ArrayError';
4
4
  /**
5
5
  * Уникальный код ошибки валидации
6
6
  */
@@ -1,6 +1,6 @@
1
- import { type ValidationResult } from '../../types';
2
1
  import { type ValidationContext } from '../../context';
3
- export type GuardDefOptions<AddDefOptions extends Record<string, unknown>> = Partial<AddDefOptions> & {
2
+ import { type ValidationResult } from '../../types';
3
+ export type GuardDefOptions<TAddDefOptions extends Record<string, unknown>> = Partial<TAddDefOptions> & {
4
4
  /**
5
5
  * Переопределяет дефолтное сообщения ошибки для required
6
6
  * @example string.define({ requiredMessage: 'ИНН не может быть пустым' })(inn())
@@ -21,35 +21,35 @@ export type GuardValue = unknown;
21
21
  /**
22
22
  * Интерфейс функции guard, которая в прототипе содержит метод define
23
23
  */
24
- export interface Guard<TLastSchemaValues extends Record<string, unknown> = {}, AddDefOptions extends Record<string, unknown> = {}> {
24
+ export interface IGuard<TLastSchemaValues extends Record<string, unknown> = {}, TAddDefOptions extends Record<string, unknown> = {}> {
25
25
  (value: GuardValue, ctx?: ValidationContext<TLastSchemaValues>): ValidationResult;
26
26
  /**
27
27
  * Функция для создания нового guard с переопределенными дефолтными параметрами. Возвращает новый guard
28
28
  * @param options - параметры, позволяющие переопределить дефолтные настройки guard
29
29
  * @example string(inn()).define({ requiredMessage: 'ИНН не может быть пустым' })
30
30
  */
31
- define<TDefineLastSchemaValues extends Record<string, unknown> = {}>(options: GuardDefOptions<AddDefOptions>): Guard<TDefineLastSchemaValues, AddDefOptions>;
31
+ define<TDefineLastSchemaValues extends Record<string, unknown> = {}>(options: GuardDefOptions<TAddDefOptions>): IGuard<TDefineLastSchemaValues, TAddDefOptions>;
32
32
  }
33
33
  /**
34
34
  * Интерфейс асинхронной функции guard, которая в прототипе содержит метод define
35
35
  */
36
- export interface AsyncGuard<TLastSchemaValues extends Record<string, unknown> = {}, AddDefOptions extends Record<string, unknown> = {}> {
36
+ export interface IAsyncGuard<TLastSchemaValues extends Record<string, unknown> = {}, TAddDefOptions extends Record<string, unknown> = {}> {
37
37
  (value: GuardValue, ctx?: ValidationContext<TLastSchemaValues>): Promise<ValidationResult>;
38
38
  /**
39
39
  * Функция для создания нового guard с переопределенными дефолтными параметрами. Возвращает новый guard
40
40
  * @param options - параметры, позволяющие переопределить дефолтные настройки guard
41
41
  * @example string.define({ requiredMessage: 'ИНН не может быть пустым' })(inn())
42
42
  */
43
- define(options: GuardDefOptions<AddDefOptions>): AsyncGuard<TLastSchemaValues, AddDefOptions>;
43
+ define(options: GuardDefOptions<TAddDefOptions>): IAsyncGuard<TLastSchemaValues, TAddDefOptions>;
44
44
  }
45
45
  /**
46
46
  * Функция, которая позволяет определять частную логику для guard
47
47
  */
48
- type GuardExecutor<TLastSchemaValues extends Record<string, unknown>, AddDefOptions extends Record<string, unknown>> = (value: unknown, ctx: ValidationContext<TLastSchemaValues>, defOptions: GuardDefOptions<AddDefOptions>) => ValidationResult;
48
+ type GuardExecutor<TLastSchemaValues extends Record<string, unknown>, TAddDefOptions extends Record<string, unknown>> = (value: unknown, ctx: ValidationContext<TLastSchemaValues>, defOptions: GuardDefOptions<TAddDefOptions>) => ValidationResult;
49
49
  /**
50
50
  * Функция, которая позволяет определять частную логику для guard
51
51
  */
52
- type AsyncGuardExecutor<TLastSchemaValues extends Record<string, unknown>, AddDefOptions extends Record<string, unknown>> = (value: unknown, ctx: ValidationContext<TLastSchemaValues>, defOptions: GuardDefOptions<AddDefOptions>) => Promise<ValidationResult>;
52
+ type AsyncGuardExecutor<TLastSchemaValues extends Record<string, unknown>, TAddDefOptions extends Record<string, unknown>> = (value: unknown, ctx: ValidationContext<TLastSchemaValues>, defOptions: GuardDefOptions<TAddDefOptions>) => Promise<ValidationResult>;
53
53
  /**
54
54
  * Создает guard. Guard - функция, проверяющая тип значения
55
55
  * По-дефолту проверяет value на required. Для выключения required необходимо использовать optional().
@@ -66,6 +66,6 @@ type AsyncGuardExecutor<TLastSchemaValues extends Record<string, unknown>, AddDe
66
66
  * });
67
67
  * ```
68
68
  */
69
- export declare function createGuard<TLastSchemaValues extends Record<string, unknown>, AddDefOptions extends Record<string, unknown> = {}>(executor: GuardExecutor<TLastSchemaValues, AddDefOptions>): Guard<TLastSchemaValues, AddDefOptions>;
70
- export declare function createGuard<TLastSchemaValues extends Record<string, unknown>, AddDefOptions extends Record<string, unknown> = {}>(executor: AsyncGuardExecutor<TLastSchemaValues, AddDefOptions>): AsyncGuard<TLastSchemaValues, AddDefOptions>;
69
+ export declare function createGuard<TLastSchemaValues extends Record<string, unknown>, TAddDefOptions extends Record<string, unknown> = {}>(executor: GuardExecutor<TLastSchemaValues, TAddDefOptions>): IGuard<TLastSchemaValues, TAddDefOptions>;
70
+ export declare function createGuard<TLastSchemaValues extends Record<string, unknown>, TAddDefOptions extends Record<string, unknown> = {}>(executor: AsyncGuardExecutor<TLastSchemaValues, TAddDefOptions>): IAsyncGuard<TLastSchemaValues, TAddDefOptions>;
71
71
  export {};
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createGuard = createGuard;
4
- const rule_1 = require("../../rule");
5
4
  const context_1 = require("../../context");
5
+ const rule_1 = require("../../rule");
6
6
  function createGuard(executor) {
7
7
  // выделено в отдельную именованную функцию для того, чтобы ее можно было рекурсивно вызывать в define
8
8
  const createInnerGuard = (defOptions = {}) => {
@@ -1,9 +1,9 @@
1
- export * from './types';
2
- export * from './errors';
1
+ export * from './compose';
2
+ export * from './composeAsync';
3
3
  export * from './context';
4
4
  export * from './errors';
5
+ export * from './errors';
5
6
  export * from './guard';
6
7
  export * from './rule';
7
- export * from './compose';
8
- export * from './composeAsync';
8
+ export * from './types';
9
9
  export * from './utils';
@@ -14,12 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./types"), exports);
18
- __exportStar(require("./errors"), exports);
17
+ __exportStar(require("./compose"), exports);
18
+ __exportStar(require("./composeAsync"), exports);
19
19
  __exportStar(require("./context"), exports);
20
20
  __exportStar(require("./errors"), exports);
21
+ __exportStar(require("./errors"), exports);
21
22
  __exportStar(require("./guard"), exports);
22
23
  __exportStar(require("./rule"), exports);
23
- __exportStar(require("./compose"), exports);
24
- __exportStar(require("./composeAsync"), exports);
24
+ __exportStar(require("./types"), exports);
25
25
  __exportStar(require("./utils"), exports);
@@ -5,6 +5,7 @@ class Logger {
5
5
  constructor() {
6
6
  this.packageName = '@astral/validations';
7
7
  this.error = (message, err) => {
8
+ // biome-ignore lint/suspicious/noConsole: <>
8
9
  console.error(`${this.packageName}: ${message}`, err);
9
10
  };
10
11
  }
@@ -1,6 +1,6 @@
1
- import { type AsyncValidationRule, type ValidationRule } from '../types';
2
- import { type ValidationResult } from '../../types';
3
1
  import { type ValidationContext } from '../../context';
2
+ import { type ValidationResult } from '../../types';
3
+ import { type AsyncValidationRule, type ValidationRule } from '../types';
4
4
  /**
5
5
  * Позволяет рекурсивно вызывать асинхронные правила. Rule может возвращать другой rule
6
6
  * Если один из rule выбросит exception, то функция его обработает и вернет дефолтную ошибку
@@ -1,6 +1,6 @@
1
- import { type ValidationRule } from '../types';
2
- import { type ValidationResult } from '../../types';
3
1
  import { type ValidationContext } from '../../context';
2
+ import { type ValidationResult } from '../../types';
3
+ import { type ValidationRule } from '../types';
4
4
  /**
5
5
  * Позволяет рекурсивно вызывать правила. Rule может возвращать другой rule
6
6
  */