@fgv/ts-utils 5.0.0-9 → 5.0.1-1

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 (182) hide show
  1. package/CHANGELOG.json +10 -7
  2. package/dist/ts-utils.d.ts +3042 -3133
  3. package/dist/tsdoc-metadata.json +1 -1
  4. package/eslint.config.js +37 -0
  5. package/lib/index.d.ts +2 -2
  6. package/lib/index.js +3 -3
  7. package/lib/packlets/base/index.d.ts +0 -2
  8. package/lib/packlets/base/index.js +1 -25
  9. package/lib/packlets/base/mapResults.d.ts +8 -1
  10. package/lib/packlets/base/mapResults.js +19 -0
  11. package/lib/packlets/base/result.d.ts +81 -3
  12. package/lib/packlets/base/result.js +71 -3
  13. package/lib/packlets/collections/collector.d.ts +9 -0
  14. package/lib/packlets/collections/collector.js +16 -1
  15. package/lib/packlets/collections/validatingCollector.d.ts +5 -1
  16. package/lib/packlets/conversion/baseConverter.js +0 -1
  17. package/lib/packlets/conversion/converters.js +0 -2
  18. package/lib/packlets/conversion/objectConverter.js +1 -2
  19. package/lib/packlets/hash/hashingNormalizer.js +4 -3
  20. package/lib/packlets/logging/index.d.ts +3 -0
  21. package/lib/packlets/{file-tree/in-memory → logging}/index.js +3 -2
  22. package/lib/packlets/logging/logReporter.d.ts +88 -0
  23. package/lib/packlets/logging/logReporter.js +105 -0
  24. package/lib/packlets/logging/logger.d.ts +205 -0
  25. package/lib/packlets/logging/logger.js +267 -0
  26. package/lib/packlets/validation/array.d.ts +2 -1
  27. package/lib/packlets/validation/array.js +2 -1
  28. package/lib/packlets/validation/common.d.ts +0 -8
  29. package/lib/packlets/validation/field.d.ts +1 -1
  30. package/lib/packlets/validation/field.js +1 -1
  31. package/lib/packlets/validation/genericValidator.d.ts +1 -6
  32. package/lib/packlets/validation/genericValidator.js +11 -11
  33. package/lib/packlets/validation/object.d.ts +1 -1
  34. package/lib/packlets/validation/object.js +1 -2
  35. package/lib/packlets/validation/oneOf.d.ts +2 -1
  36. package/lib/packlets/validation/oneOf.js +2 -1
  37. package/lib/packlets/validation/typeGuard.d.ts +3 -2
  38. package/lib/packlets/validation/typeGuard.js +2 -1
  39. package/lib/packlets/validation/validator.d.ts +7 -0
  40. package/lib/packlets/validation/validatorBase.d.ts +2 -1
  41. package/lib/packlets/validation/validatorBase.js +1 -1
  42. package/lib/packlets/validation/validators.d.ts +2 -2
  43. package/lib/packlets/validation/validators.js +3 -3
  44. package/package.json +16 -16
  45. package/CHANGELOG.md +0 -135
  46. package/lib/index.d.ts.map +0 -1
  47. package/lib/index.js.map +0 -1
  48. package/lib/packlets/base/brand.d.ts.map +0 -1
  49. package/lib/packlets/base/brand.js.map +0 -1
  50. package/lib/packlets/base/index.d.ts.map +0 -1
  51. package/lib/packlets/base/index.js.map +0 -1
  52. package/lib/packlets/base/logger.d.ts +0 -52
  53. package/lib/packlets/base/logger.d.ts.map +0 -1
  54. package/lib/packlets/base/logger.js +0 -128
  55. package/lib/packlets/base/logger.js.map +0 -1
  56. package/lib/packlets/base/mapResults.d.ts.map +0 -1
  57. package/lib/packlets/base/mapResults.js.map +0 -1
  58. package/lib/packlets/base/messageAggregator.d.ts.map +0 -1
  59. package/lib/packlets/base/messageAggregator.js.map +0 -1
  60. package/lib/packlets/base/normalize.d.ts.map +0 -1
  61. package/lib/packlets/base/normalize.js.map +0 -1
  62. package/lib/packlets/base/result.d.ts.map +0 -1
  63. package/lib/packlets/base/result.js.map +0 -1
  64. package/lib/packlets/base/utils.d.ts.map +0 -1
  65. package/lib/packlets/base/utils.js.map +0 -1
  66. package/lib/packlets/collections/collectible.d.ts.map +0 -1
  67. package/lib/packlets/collections/collectible.js.map +0 -1
  68. package/lib/packlets/collections/collector.d.ts.map +0 -1
  69. package/lib/packlets/collections/collector.js.map +0 -1
  70. package/lib/packlets/collections/collectorValidator.d.ts.map +0 -1
  71. package/lib/packlets/collections/collectorValidator.js.map +0 -1
  72. package/lib/packlets/collections/common.d.ts.map +0 -1
  73. package/lib/packlets/collections/common.js.map +0 -1
  74. package/lib/packlets/collections/convertingCollector.d.ts.map +0 -1
  75. package/lib/packlets/collections/convertingCollector.js.map +0 -1
  76. package/lib/packlets/collections/convertingCollectorValidator.d.ts.map +0 -1
  77. package/lib/packlets/collections/convertingCollectorValidator.js.map +0 -1
  78. package/lib/packlets/collections/index.d.ts.map +0 -1
  79. package/lib/packlets/collections/index.js.map +0 -1
  80. package/lib/packlets/collections/keyValueConverters.d.ts.map +0 -1
  81. package/lib/packlets/collections/keyValueConverters.js.map +0 -1
  82. package/lib/packlets/collections/readonlyResultMap.d.ts.map +0 -1
  83. package/lib/packlets/collections/readonlyResultMap.js.map +0 -1
  84. package/lib/packlets/collections/resultMap.d.ts.map +0 -1
  85. package/lib/packlets/collections/resultMap.js.map +0 -1
  86. package/lib/packlets/collections/resultMapValidator.d.ts.map +0 -1
  87. package/lib/packlets/collections/resultMapValidator.js.map +0 -1
  88. package/lib/packlets/collections/utils.d.ts.map +0 -1
  89. package/lib/packlets/collections/utils.js.map +0 -1
  90. package/lib/packlets/collections/validatingCollector.d.ts.map +0 -1
  91. package/lib/packlets/collections/validatingCollector.js.map +0 -1
  92. package/lib/packlets/collections/validatingConvertingCollector.d.ts.map +0 -1
  93. package/lib/packlets/collections/validatingConvertingCollector.js.map +0 -1
  94. package/lib/packlets/collections/validatingResultMap.d.ts.map +0 -1
  95. package/lib/packlets/collections/validatingResultMap.js.map +0 -1
  96. package/lib/packlets/conversion/baseConverter.d.ts.map +0 -1
  97. package/lib/packlets/conversion/baseConverter.js.map +0 -1
  98. package/lib/packlets/conversion/converter.d.ts.map +0 -1
  99. package/lib/packlets/conversion/converter.js.map +0 -1
  100. package/lib/packlets/conversion/converters.d.ts.map +0 -1
  101. package/lib/packlets/conversion/converters.js.map +0 -1
  102. package/lib/packlets/conversion/defaultingConverter.d.ts.map +0 -1
  103. package/lib/packlets/conversion/defaultingConverter.js.map +0 -1
  104. package/lib/packlets/conversion/index.d.ts.map +0 -1
  105. package/lib/packlets/conversion/index.js.map +0 -1
  106. package/lib/packlets/conversion/objectConverter.d.ts.map +0 -1
  107. package/lib/packlets/conversion/objectConverter.js.map +0 -1
  108. package/lib/packlets/conversion/stringConverter.d.ts.map +0 -1
  109. package/lib/packlets/conversion/stringConverter.js.map +0 -1
  110. package/lib/packlets/file-tree/directoryItem.d.ts +0 -47
  111. package/lib/packlets/file-tree/directoryItem.d.ts.map +0 -1
  112. package/lib/packlets/file-tree/directoryItem.js +0 -71
  113. package/lib/packlets/file-tree/directoryItem.js.map +0 -1
  114. package/lib/packlets/file-tree/fileItem.d.ts +0 -64
  115. package/lib/packlets/file-tree/fileItem.d.ts.map +0 -1
  116. package/lib/packlets/file-tree/fileItem.js +0 -93
  117. package/lib/packlets/file-tree/fileItem.js.map +0 -1
  118. package/lib/packlets/file-tree/fileTree.d.ts +0 -84
  119. package/lib/packlets/file-tree/fileTree.d.ts.map +0 -1
  120. package/lib/packlets/file-tree/fileTree.js +0 -135
  121. package/lib/packlets/file-tree/fileTree.js.map +0 -1
  122. package/lib/packlets/file-tree/fileTreeAccessors.d.ts +0 -134
  123. package/lib/packlets/file-tree/fileTreeAccessors.d.ts.map +0 -1
  124. package/lib/packlets/file-tree/fileTreeAccessors.js +0 -24
  125. package/lib/packlets/file-tree/fileTreeAccessors.js.map +0 -1
  126. package/lib/packlets/file-tree/fsTree.d.ts +0 -45
  127. package/lib/packlets/file-tree/fsTree.d.ts.map +0 -1
  128. package/lib/packlets/file-tree/fsTree.js +0 -116
  129. package/lib/packlets/file-tree/fsTree.js.map +0 -1
  130. package/lib/packlets/file-tree/in-memory/inMemoryTree.d.ts +0 -67
  131. package/lib/packlets/file-tree/in-memory/inMemoryTree.d.ts.map +0 -1
  132. package/lib/packlets/file-tree/in-memory/inMemoryTree.js +0 -150
  133. package/lib/packlets/file-tree/in-memory/inMemoryTree.js.map +0 -1
  134. package/lib/packlets/file-tree/in-memory/index.d.ts +0 -2
  135. package/lib/packlets/file-tree/in-memory/index.d.ts.map +0 -1
  136. package/lib/packlets/file-tree/in-memory/index.js.map +0 -1
  137. package/lib/packlets/file-tree/in-memory/treeBuilder.d.ts +0 -106
  138. package/lib/packlets/file-tree/in-memory/treeBuilder.d.ts.map +0 -1
  139. package/lib/packlets/file-tree/in-memory/treeBuilder.js +0 -170
  140. package/lib/packlets/file-tree/in-memory/treeBuilder.js.map +0 -1
  141. package/lib/packlets/file-tree/index.d.ts +0 -8
  142. package/lib/packlets/file-tree/index.d.ts.map +0 -1
  143. package/lib/packlets/file-tree/index.js +0 -46
  144. package/lib/packlets/file-tree/index.js.map +0 -1
  145. package/lib/packlets/hash/crcNormalizer.d.ts.map +0 -1
  146. package/lib/packlets/hash/crcNormalizer.js.map +0 -1
  147. package/lib/packlets/hash/hashingNormalizer.d.ts.map +0 -1
  148. package/lib/packlets/hash/hashingNormalizer.js.map +0 -1
  149. package/lib/packlets/hash/index.d.ts.map +0 -1
  150. package/lib/packlets/hash/index.js.map +0 -1
  151. package/lib/packlets/validation/array.d.ts.map +0 -1
  152. package/lib/packlets/validation/array.js.map +0 -1
  153. package/lib/packlets/validation/boolean.d.ts.map +0 -1
  154. package/lib/packlets/validation/boolean.js.map +0 -1
  155. package/lib/packlets/validation/classes.d.ts.map +0 -1
  156. package/lib/packlets/validation/classes.js.map +0 -1
  157. package/lib/packlets/validation/common.d.ts.map +0 -1
  158. package/lib/packlets/validation/common.js.map +0 -1
  159. package/lib/packlets/validation/field.d.ts.map +0 -1
  160. package/lib/packlets/validation/field.js.map +0 -1
  161. package/lib/packlets/validation/genericValidator.d.ts.map +0 -1
  162. package/lib/packlets/validation/genericValidator.js.map +0 -1
  163. package/lib/packlets/validation/index.d.ts.map +0 -1
  164. package/lib/packlets/validation/index.js.map +0 -1
  165. package/lib/packlets/validation/number.d.ts.map +0 -1
  166. package/lib/packlets/validation/number.js.map +0 -1
  167. package/lib/packlets/validation/object.d.ts.map +0 -1
  168. package/lib/packlets/validation/object.js.map +0 -1
  169. package/lib/packlets/validation/oneOf.d.ts.map +0 -1
  170. package/lib/packlets/validation/oneOf.js.map +0 -1
  171. package/lib/packlets/validation/string.d.ts.map +0 -1
  172. package/lib/packlets/validation/string.js.map +0 -1
  173. package/lib/packlets/validation/traits.d.ts.map +0 -1
  174. package/lib/packlets/validation/traits.js.map +0 -1
  175. package/lib/packlets/validation/typeGuard.d.ts.map +0 -1
  176. package/lib/packlets/validation/typeGuard.js.map +0 -1
  177. package/lib/packlets/validation/validator.d.ts.map +0 -1
  178. package/lib/packlets/validation/validator.js.map +0 -1
  179. package/lib/packlets/validation/validatorBase.d.ts.map +0 -1
  180. package/lib/packlets/validation/validatorBase.js.map +0 -1
  181. package/lib/packlets/validation/validators.d.ts.map +0 -1
  182. package/lib/packlets/validation/validators.js.map +0 -1
@@ -1,15 +1,7 @@
1
- import { Failure } from '../base';
2
1
  /**
3
2
  * A type guard function which validates a specific type, with an optional context
4
3
  * that can be used to shape the validation.
5
4
  * @public
6
5
  */
7
6
  export type TypeGuardWithContext<T, TC = unknown> = (from: unknown, context?: TC) => from is T;
8
- /**
9
- * Type for a validation function, which validates that a supplied `unknown`
10
- * value is a valid value of type `<T>`, possibly as influenced by
11
- * an optionally-supplied validation context of type `<TC>`.
12
- * @public
13
- */
14
- export type ValidatorFunc<T, TC> = (from: unknown, context?: TC) => boolean | Failure<T>;
15
7
  //# sourceMappingURL=common.d.ts.map
@@ -38,6 +38,6 @@ export declare class FieldValidator<T, TC = unknown> extends ValidatorBase<T, TC
38
38
  /**
39
39
  * {@inheritdoc Validation.ValidatorBase._validate}
40
40
  */
41
- protected _validate(from: unknown, context?: TC): boolean | Failure<T>;
41
+ protected _validate(from: unknown, context?: TC, self?: Validator<T, TC>): boolean | Failure<T>;
42
42
  }
43
43
  //# sourceMappingURL=field.d.ts.map
@@ -48,7 +48,7 @@ class FieldValidator extends validatorBase_1.ValidatorBase {
48
48
  /**
49
49
  * {@inheritdoc Validation.ValidatorBase._validate}
50
50
  */
51
- _validate(from, context) {
51
+ _validate(from, context, self) {
52
52
  if (typeof from === 'object' && !Array.isArray(from) && from !== null) {
53
53
  const optional = this._fieldOptions.optional === true;
54
54
  if ((0, base_1.isKeyOf)(this.fieldName, from)) {
@@ -1,11 +1,6 @@
1
1
  import { Brand, Result } from '../base';
2
2
  import { ConstraintTrait, ValidatorTraits } from './traits';
3
- import { Constraint, ValidationErrorFormatter, Validator, ValidatorOptions } from './validator';
4
- import { ValidatorFunc } from './common';
5
- /**
6
- * @deprecated Use {@link Validation.Common.ValidatorFunc | Validation.Common.ValidatorFunc} instead.
7
- */
8
- export { ValidatorFunc };
3
+ import { Constraint, ValidationErrorFormatter, Validator, ValidatorFunc, ValidatorOptions } from './validator';
9
4
  /**
10
5
  * Options used to initialize a {@link Validation.Base.GenericValidator | GenericValidator}.
11
6
  * @public
@@ -59,7 +59,7 @@ class GenericValidator {
59
59
  * {@inheritdoc Validation.Validator.validate}
60
60
  */
61
61
  validate(from, context) {
62
- const result = this._validator(from, this._context(context));
62
+ const result = this._validator(from, this._context(context), this);
63
63
  if (typeof result === 'boolean') {
64
64
  return result ? (0, base_1.succeed)(from) : (0, base_1.fail)('Invalid value');
65
65
  }
@@ -69,7 +69,7 @@ class GenericValidator {
69
69
  * {@inheritdoc Validation.Validator.convert}
70
70
  */
71
71
  convert(from, context) {
72
- const result = this._validator(from, this._context(context));
72
+ const result = this._validator(from, this._context(context), this);
73
73
  if (typeof result === 'boolean') {
74
74
  return result ? (0, base_1.succeed)(from) : (0, base_1.fail)('Invalid value');
75
75
  }
@@ -85,15 +85,15 @@ class GenericValidator {
85
85
  * {@inheritdoc Validation.Validator.guard}
86
86
  */
87
87
  guard(from, context) {
88
- return this._validator(from, this._context(context)) === true;
88
+ return this._validator(from, this._context(context), this) === true;
89
89
  }
90
90
  /**
91
91
  * {@inheritdoc Validation.Validator.optional}
92
92
  */
93
93
  optional() {
94
94
  return new GenericValidator({
95
- validator: (from, context) => {
96
- return from === undefined || this._validator(from, this._context(context));
95
+ validator: (from, context, self) => {
96
+ return from === undefined || this._validator(from, this._context(context), this);
97
97
  },
98
98
  traits: { isOptional: true }
99
99
  });
@@ -104,8 +104,8 @@ class GenericValidator {
104
104
  withConstraint(constraint, trait) {
105
105
  trait = trait !== null && trait !== void 0 ? trait : { type: 'function' };
106
106
  return new GenericValidator({
107
- validator: (from, context) => {
108
- const result = this._validator(from, this._context(context));
107
+ validator: (from, context, self) => {
108
+ const result = this._validator(from, this._context(context), this);
109
109
  if (result === true) {
110
110
  const constraintResult = constraint(from);
111
111
  if (typeof constraintResult === 'boolean') {
@@ -128,8 +128,8 @@ class GenericValidator {
128
128
  throw new Error(`Cannot replace existing brand "${this.brand}" with "${brand}".`);
129
129
  }
130
130
  return new GenericValidator({
131
- validator: (from, context) => {
132
- return this._validator(from, this._context(context));
131
+ validator: (from, context, self) => {
132
+ return this._validator(from, this._context(context), this);
133
133
  },
134
134
  traits: { brand }
135
135
  });
@@ -139,8 +139,8 @@ class GenericValidator {
139
139
  */
140
140
  withFormattedError(formatter) {
141
141
  return new GenericValidator({
142
- validator: (from, context) => {
143
- const result = this._validator(from, this._context(context));
142
+ validator: (from, context, self) => {
143
+ const result = this._validator(from, this._context(context), this);
144
144
  if (result === true) {
145
145
  return true;
146
146
  }
@@ -110,6 +110,6 @@ export declare class ObjectValidator<T, TC = unknown> extends ValidatorBase<T, T
110
110
  * {@inheritdoc Validation.ValidatorBase._validate}
111
111
  * @internal
112
112
  */
113
- protected _validate(from: unknown, context?: TC): boolean | Failure<T>;
113
+ protected _validate(from: unknown, context?: TC, self?: Validator<T, TC>): boolean | Failure<T>;
114
114
  }
115
115
  //# sourceMappingURL=object.d.ts.map
@@ -109,12 +109,11 @@ class ObjectValidator extends validatorBase_1.ValidatorBase {
109
109
  * {@inheritdoc Validation.ValidatorBase._validate}
110
110
  * @internal
111
111
  */
112
- _validate(from, context) {
112
+ _validate(from, context, self) {
113
113
  if (typeof from !== 'object' || from === null || Array.isArray(from)) {
114
114
  return (0, base_1.fail)('source is not an object');
115
115
  }
116
116
  // eslint bug thinks key is used before defined
117
- // eslint-disable-next-line no-use-before-define
118
117
  const converted = {};
119
118
  const errors = [];
120
119
  for (const key in this._innerValidators) {
@@ -31,9 +31,10 @@ export declare class OneOfValidator<T, TC = unknown> extends ValidatorBase<T, TC
31
31
  * of the configured validators.
32
32
  * @param from - The `unknown` value to be tested.
33
33
  * @param context - Optional validation context will be propagated to element validator.
34
+ * @param self - Optional self-reference for recursive validation.
34
35
  * @returns Returns `true` if `from` is an `array` of valid elements, or
35
36
  * {@link Failure} with an error message if not.
36
37
  */
37
- protected _validate<T>(from: unknown, context?: TC): boolean | Failure<T>;
38
+ protected _validate<T>(from: unknown, context?: TC, self?: Validator<T, TC>): boolean | Failure<T>;
38
39
  }
39
40
  //# sourceMappingURL=oneOf.d.ts.map
@@ -46,10 +46,11 @@ class OneOfValidator extends validatorBase_1.ValidatorBase {
46
46
  * of the configured validators.
47
47
  * @param from - The `unknown` value to be tested.
48
48
  * @param context - Optional validation context will be propagated to element validator.
49
+ * @param self - Optional self-reference for recursive validation.
49
50
  * @returns Returns `true` if `from` is an `array` of valid elements, or
50
51
  * {@link Failure} with an error message if not.
51
52
  */
52
- _validate(from, context) {
53
+ _validate(from, context, self) {
53
54
  const found = this._validators.some((v) => v.validate(from).success);
54
55
  if (found) {
55
56
  return true;
@@ -1,7 +1,7 @@
1
1
  import { Failure } from '../base';
2
2
  import { ValidatorBase, ValidatorBaseConstructorParams } from './validatorBase';
3
3
  import { TypeGuardWithContext } from './common';
4
- import { ValidatorOptions } from './validator';
4
+ import { Validator, ValidatorOptions } from './validator';
5
5
  /**
6
6
  * Parameters used to construct a {@link Validation.Classes.TypeGuardValidator}.
7
7
  * @public
@@ -34,10 +34,11 @@ export declare class TypeGuardValidator<T, TC = unknown> extends ValidatorBase<T
34
34
  * type guard, returning a `Failure<T>` containing more information about a failure.
35
35
  * @param from - Value to be converted.
36
36
  * @param context - Optional validation context.
37
+ * @param self - Optional self-reference for recursive validation.
37
38
  * @returns `true` if `from` is valid, {@link Failure | Failure<T>}
38
39
  * with an error message if `from` is invalid.
39
40
  * @internal
40
41
  */
41
- protected _validate(from: unknown, context?: TC): boolean | Failure<T>;
42
+ protected _validate(from: unknown, context?: TC, self?: Validator<T, TC>): boolean | Failure<T>;
42
43
  }
43
44
  //# sourceMappingURL=typeGuard.d.ts.map
@@ -47,11 +47,12 @@ class TypeGuardValidator extends validatorBase_1.ValidatorBase {
47
47
  * type guard, returning a `Failure<T>` containing more information about a failure.
48
48
  * @param from - Value to be converted.
49
49
  * @param context - Optional validation context.
50
+ * @param self - Optional self-reference for recursive validation.
50
51
  * @returns `true` if `from` is valid, {@link Failure | Failure<T>}
51
52
  * with an error message if `from` is invalid.
52
53
  * @internal
53
54
  */
54
- _validate(from, context) {
55
+ _validate(from, context, self) {
55
56
  if (this._guard(from, context)) {
56
57
  return true;
57
58
  }
@@ -1,5 +1,12 @@
1
1
  import { Brand, Failure, Result } from '../base';
2
2
  import { ConstraintTrait, ValidatorTraits } from './traits';
3
+ /**
4
+ * Type for a validation function, which validates that a supplied `unknown`
5
+ * value is a valid value of type `<T>`, possibly as influenced by
6
+ * an optionally-supplied validation context of type `<TC>`.
7
+ * @public
8
+ */
9
+ export type ValidatorFunc<T, TC> = (from: unknown, context?: TC, self?: Validator<T, TC>) => boolean | Failure<T>;
3
10
  /**
4
11
  * Options that apply to any {@link Validation.Validator | Validator}.
5
12
  * @public
@@ -19,10 +19,11 @@ export declare abstract class ValidatorBase<T, TC = unknown> extends GenericVali
19
19
  * Abstract validation method to me implemented by derived classes.
20
20
  * @param from - Value to be converted.
21
21
  * @param context - Optional validation context.
22
+ * @param self - Optional self-reference for recursive validation.
22
23
  * @returns `true` if `from` is valid, {@link Failure | Failure<T>}
23
24
  * with an error message if `from` is invalid.
24
25
  * @internal
25
26
  */
26
- protected abstract _validate(from: unknown, context?: TC): boolean | Failure<T>;
27
+ protected abstract _validate(from: unknown, context?: TC, self?: import('./validator').Validator<T, TC>): boolean | Failure<T>;
27
28
  }
28
29
  //# sourceMappingURL=validatorBase.d.ts.map
@@ -34,7 +34,7 @@ class ValidatorBase extends genericValidator_1.GenericValidator {
34
34
  * @internal
35
35
  */
36
36
  constructor(params) {
37
- super(Object.assign({ validator: (from, context) => this._validate(from, context) }, params));
37
+ super(Object.assign({ validator: (from, context, self) => this._validate(from, context, self) }, params));
38
38
  }
39
39
  }
40
40
  exports.ValidatorBase = ValidatorBase;
@@ -1,9 +1,9 @@
1
1
  import { ArrayValidator, ArrayValidatorConstructorParams } from './array';
2
2
  import { FieldValidators, ObjectValidator, ObjectValidatorConstructorParams } from './object';
3
3
  import { TypeGuardValidator, TypeGuardValidatorConstructorParams } from './typeGuard';
4
- import { TypeGuardWithContext, ValidatorFunc } from './common';
4
+ import { TypeGuardWithContext } from './common';
5
5
  import { OneOfValidator, OneOfValidatorConstructorParams } from './oneOf';
6
- import { Validator } from './validator';
6
+ import { Validator, ValidatorFunc } from './validator';
7
7
  /**
8
8
  * A {@link Validation.Classes.StringValidator | StringValidator} which validates a string in place.
9
9
  * @public
@@ -94,7 +94,7 @@ function arrayOf(validateElement, params) {
94
94
  function recordOf(validator, options) {
95
95
  const opts = Object.assign({ onError: 'fail' }, options);
96
96
  return new genericValidator_1.GenericValidator({
97
- validator: (from, context) => {
97
+ validator: (from, context, self) => {
98
98
  if (typeof from !== 'object' || from === null || Array.isArray(from)) {
99
99
  return (0, base_1.fail)(`Not a string-keyed object: ${JSON.stringify(from)}`);
100
100
  }
@@ -139,7 +139,7 @@ function recordOf(validator, options) {
139
139
  */
140
140
  function enumeratedValue(values) {
141
141
  return new genericValidator_1.GenericValidator({
142
- validator: (from, context) => {
142
+ validator: (from, context, self) => {
143
143
  if (typeof from === 'string') {
144
144
  const v = context !== null && context !== void 0 ? context : values;
145
145
  const index = v.indexOf(from);
@@ -156,7 +156,7 @@ function enumeratedValue(values) {
156
156
  */
157
157
  function literal(value) {
158
158
  return new genericValidator_1.GenericValidator({
159
- validator: (from) => {
159
+ validator: (from, context, self) => {
160
160
  return from === value
161
161
  ? true
162
162
  : (0, base_1.fail)(`Expected literal ${String(value)}, found "${JSON.stringify(from, undefined, 2)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fgv/ts-utils",
3
- "version": "5.0.0-9",
3
+ "version": "5.0.1-1",
4
4
  "description": "Assorted Typescript Utilities",
5
5
  "main": "lib/index.js",
6
6
  "types": "dist/ts-utils.d.ts",
@@ -17,32 +17,32 @@
17
17
  "homepage": "https://github.com/ErikFortune/fgv/tree/main/libraries/ts-utils#readme",
18
18
  "devDependencies": {
19
19
  "@jest/expect-utils": "^29.7.0",
20
- "@microsoft/api-documenter": "^7.26.29",
21
- "@microsoft/api-extractor": "^7.49.1",
20
+ "@microsoft/api-documenter": "^7.26.31",
21
+ "@microsoft/api-extractor": "^7.52.10",
22
22
  "@types/jest": "^29.5.14",
23
- "@types/luxon": "^3.6.2",
23
+ "@types/luxon": "^3.7.1",
24
24
  "@types/mustache": "^4.2.5",
25
25
  "@types/node": "^20.14.9",
26
- "@typescript-eslint/eslint-plugin": "^7.14.1",
27
- "@typescript-eslint/parser": "^7.14.1",
28
- "eslint": "^8.57.0",
26
+ "@typescript-eslint/eslint-plugin": "^8.42.0",
27
+ "@typescript-eslint/parser": "^8.42.0",
28
+ "eslint": "^9.35.0",
29
29
  "eslint-plugin-import": "^2.32.0",
30
30
  "eslint-plugin-node": "^11.1.0",
31
- "eslint-plugin-promise": "^6.2.0",
31
+ "eslint-plugin-promise": "^7.2.1",
32
32
  "jest": "^29.7.0",
33
33
  "jest-extended": "^4.0.2",
34
34
  "jest-matcher-utils": "^29.7.0",
35
- "rimraf": "^5.0.7",
36
- "ts-jest": "^29.4.0",
35
+ "rimraf": "^6.0.1",
36
+ "ts-jest": "^29.4.1",
37
37
  "ts-node": "^10.9.2",
38
- "typescript": "^5.7.3",
39
- "eslint-plugin-n": "^16.6.2",
38
+ "typescript": "5.8.3",
39
+ "eslint-plugin-n": "^17.21.3",
40
40
  "jest-snapshot": "~29.7.0",
41
- "@rushstack/heft": "~0.74.0",
42
- "@rushstack/heft-node-rig": "~2.9.0",
43
- "@rushstack/eslint-config": "~4.4.0",
41
+ "@rushstack/heft": "0.74.4",
42
+ "@rushstack/heft-node-rig": "2.9.5",
43
+ "@rushstack/eslint-config": "4.4.0",
44
44
  "@types/heft-jest": "1.0.6",
45
- "@rushstack/heft-jest-plugin": "~0.16.9",
45
+ "@rushstack/heft-jest-plugin": "0.16.13",
46
46
  "eslint-plugin-tsdoc": "~0.4.0"
47
47
  },
48
48
  "scripts": {
package/CHANGELOG.md DELETED
@@ -1,135 +0,0 @@
1
- # Change Log - @fgv/ts-utils
2
-
3
- This log was last generated on Thu, 17 Jul 2025 00:13:24 GMT and should not be manually modified.
4
-
5
- ## 5.0.0
6
- Thu, 17 Jul 2025 00:13:24 GMT
7
-
8
- ### Updates
9
-
10
- - add result helpers, clean up object converter
11
- - object converter partial/required helpers
12
- - add Result.withErrorFormat
13
- - bump version
14
-
15
- ## 4.6.0
16
- Wed, 02 Jul 2025 05:48:16 GMT
17
-
18
- _Version update only_
19
-
20
- ## 4.5.1
21
- Wed, 02 Jul 2025 05:47:11 GMT
22
-
23
- ### Updates
24
-
25
- - use IterableIterator instead of MapIterator
26
- - update rushstack
27
-
28
- ## 4.5.0
29
- Tue, 01 Jul 2025 03:26:11 GMT
30
-
31
- ### Minor changes
32
-
33
- - add recordOf validator for validating Record<string, T> objects
34
-
35
- ### Updates
36
-
37
- - update collectors
38
- - rework collections for better usability
39
-
40
- ## 4.4.0
41
- Sat, 01 Feb 2025 17:13:10 GMT
42
-
43
- _Version update only_
44
-
45
- ## 4.3.0
46
- Thu, 30 Jan 2025 00:35:17 GMT
47
-
48
- ### Updates
49
-
50
- - add collector, convertingResultMap, convertingCollector
51
-
52
- ## 4.2.2
53
- Thu, 23 Jan 2025 06:19:32 GMT
54
-
55
- ### Updates
56
-
57
- - QoL improvements to Success/Failure
58
-
59
- ## 4.2.1
60
- Tue, 21 Jan 2025 04:19:21 GMT
61
-
62
- ### Updates
63
-
64
- - allow factories in getOrAdd
65
-
66
- ## 4.2.0
67
- Mon, 20 Jan 2025 09:46:53 GMT
68
-
69
- ### Updates
70
-
71
- - add collections packlet and ResultMap class
72
- - add withFormattedError on validator and converter
73
- - clean up type inconsistencies, relax some constraints
74
-
75
- ## 4.1.0
76
- Thu, 09 Jan 2025 05:33:39 GMT
77
-
78
- ### Updates
79
-
80
- - update dependencies
81
-
82
- ## 4.0.2
83
- Tue, 14 May 2024 14:45:53 GMT
84
-
85
- _Version update only_
86
-
87
- ## 4.0.1
88
- Tue, 14 May 2024 05:02:20 GMT
89
-
90
- ### Updates
91
-
92
- - publish
93
- - import TextEncoder to avoid globals race
94
-
95
- ## 4.0.0
96
- Tue, 14 May 2024 03:09:27 GMT
97
-
98
- ### Updates
99
-
100
- - rework validation/converter compatibility a bit
101
- - QoL improvement to simplify error aggregation
102
- - factor optional converters out to ts-extras package to eliminate large dependencies
103
- - update generated api docs
104
- - add convalidate helper
105
- - add defaulting converter
106
- - extend conversion to accept validators
107
- - export StringConverter at top level
108
-
109
- ## 3.0.0
110
- Mon, 22 Jan 2024 07:00:18 GMT
111
-
112
- ### Updates
113
-
114
- - gitignore tweaks
115
- - refactor hash implementation
116
- - bump versions
117
- - refactor and cleanup
118
- - build changes
119
- - Factor out extras, enable shaking
120
- - bump dependencies
121
- - version upgrades
122
- - relax mapToRecord from Map to ReadonlyMap
123
- - bump version
124
- - add oneOf validator
125
-
126
- ## 2.0.0
127
- Mon, 10 Apr 2023 03:33:11 GMT
128
-
129
- ### Breaking changes
130
-
131
- - refactor and cleanup
132
- - reorganization and cleanup
133
- - more refactoring
134
- - refactor
135
-
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAC;AACjD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EACL,SAAS,EACT,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,SAAS,EACT,mBAAmB,EACnB,6BAA6B,EAC7B,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE9D,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,SAAS,EACT,eAAe,EACf,mBAAmB,EACnB,6BAA6B,EAC7B,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,UAAU,EACX,CAAC"}
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oEAAsD;AAqBpD,kCAAW;AApBb,kEAAoD;AAuBlD,gCAAU;AAtBZ,sDAAwC;AA0BtC,oBAAI;AAzBN,+DAAiD;AAwB/C,4BAAQ;AAvBV,kEAAoD;AAiClD,gCAAU;AA/BZ,wDASgC;AAO9B,0FAfA,uBAAS,OAeA;AACT,oGAdA,iCAAmB,OAcA;AASnB,0FArBA,uBAAS,OAqBA;AAET,oGAtBA,iCAAmB,OAsBA;AACnB,8GAtBA,2CAA6B,OAsBA;AAC7B,oGAtBA,iCAAmB,OAsBA;AApBrB,sDAAgG;AAU9F,2FAVkB,uBAAU,OAUlB;AAKV,gGAf8B,4BAAe,OAe9B;AAEf,gGAjB+C,4BAAe,OAiB/C;AAhBjB,sDAA8D;AAsB5D,2FAtBkB,uBAAU,OAsBlB;AApBZ,kDAAgC","sourcesContent":["/*\n * Copyright (c) 2020 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport * as Collections from './packlets/collections';\nimport * as Conversion from './packlets/conversion';\nimport * as Hash from './packlets/hash';\nimport * as FileTree from './packlets/file-tree';\nimport * as Validation from './packlets/validation';\n\nimport {\n Collector,\n ICollectible,\n ConvertingCollector,\n IReadOnlyResultMap,\n ResultMap,\n ValidatingCollector,\n ValidatingConvertingCollector,\n ValidatingResultMap\n} from './packlets/collections';\nimport { Converter, Converters, ObjectConverter, StringConverter } from './packlets/conversion';\nimport { Validator, Validators } from './packlets/validation';\n\nexport * from './packlets/base';\nexport {\n Collections,\n Collector,\n ConvertingCollector,\n Conversion,\n Converter,\n Converters,\n FileTree,\n Hash,\n ICollectible,\n IReadOnlyResultMap,\n ObjectConverter,\n ResultMap,\n StringConverter,\n ValidatingCollector,\n ValidatingConvertingCollector,\n ValidatingResultMap,\n Validation,\n Validator,\n Validators\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../../src/packlets/base/brand.ts"],"names":[],"mappings":"AAsBA;;;GAGG;AAEH,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"brand.js","sourceRoot":"","sources":["../../../src/packlets/base/brand.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG","sourcesContent":["/*\n * Copyright (c) 2021 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/**\n * Helper type to brand a simple type to prevent inappropriate use\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport type Brand<T, B> = T & { __brand: B };\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packlets/base/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,OAAO,MAAM,UAAU,CAAC;AAEpC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/packlets/base/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,kDAAoC;AAQ3B,0BAAO;AANhB,0CAAwB;AACxB,+CAA6B;AAC7B,sDAAoC;AACpC,yCAAyC;AAAhC,uGAAA,UAAU,OAAA;AACnB,2CAAyB;AACzB,0CAAwB","sourcesContent":["/*\n * Copyright (c) 2020 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport * as Logging from './logger';\n\nexport * from './brand';\nexport * from './mapResults';\nexport * from './messageAggregator';\nexport { Normalizer } from './normalize';\nexport * from './result';\nexport * from './utils';\nexport { Logging };\n"]}
@@ -1,52 +0,0 @@
1
- import { Failure, Success } from './result';
2
- /**
3
- * @public
4
- */
5
- export type LogLevel = 'detail' | 'info' | 'warning' | 'error' | 'silent';
6
- /**
7
- * @public
8
- */
9
- export interface Logger {
10
- log(message?: unknown, ...parameters: unknown[]): Success<string | undefined>;
11
- detail(message?: unknown, ...parameters: unknown[]): Success<string | undefined>;
12
- info(message?: unknown, ...parameters: unknown[]): Success<string | undefined>;
13
- warn(message?: unknown, ...parameters: unknown[]): Success<string | undefined>;
14
- warnAndFail<T>(message?: unknown, ...parameters: unknown[]): Failure<T>;
15
- error<T>(message?: unknown, ...parameters: unknown[]): Failure<T>;
16
- }
17
- /**
18
- * @public
19
- */
20
- export declare abstract class LoggerBase {
21
- logLevel: LogLevel;
22
- constructor(logLevel?: LogLevel);
23
- detail(message?: unknown, ...parameters: unknown[]): Success<string | undefined>;
24
- info(message?: unknown, ...parameters: unknown[]): Success<string | undefined>;
25
- warn(message?: unknown, ...parameters: unknown[]): Success<string | undefined>;
26
- warnAndFail<T>(message?: unknown, ...parameters: unknown[]): Failure<T>;
27
- error<T>(message?: unknown, ...parameters: unknown[]): Failure<T>;
28
- log(message?: unknown, ...parameters: unknown[]): Success<string | undefined>;
29
- protected _format(message?: unknown, ...parameters: unknown[]): string;
30
- protected _innerSilent(__message: string): Success<string | undefined>;
31
- protected abstract _innerLog(message: string): Success<string | undefined>;
32
- }
33
- /**
34
- * @public
35
- */
36
- export declare class InMemoryLogger extends LoggerBase {
37
- protected _messages: string[];
38
- protected _silent: string[];
39
- constructor(logLevel?: LogLevel);
40
- get messages(): string[];
41
- get silent(): string[];
42
- clear(): void;
43
- protected _innerLog(message: string): Success<string | undefined>;
44
- protected _innerSilent(message: string): Success<string | undefined>;
45
- }
46
- /**
47
- * @public
48
- */
49
- export declare class NoOpLogger extends LoggerBase {
50
- protected _innerLog(message: string): Success<string | undefined>;
51
- }
52
- //# sourceMappingURL=logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/packlets/base/logger.ts"],"names":[],"mappings":"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"}