@warlock.js/seal 4.1.12 → 4.1.14
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/cjs/index.cjs +92 -92
- package/esm/config.d.mts +1 -1
- package/esm/config.mjs +1 -1
- package/esm/factory/validate.d.mts +1 -1
- package/esm/factory/validate.mjs +1 -1
- package/esm/factory/validators.d.mts +1 -1
- package/esm/factory/validators.mjs +1 -1
- package/esm/helpers/date-helpers.d.mts +1 -1
- package/esm/helpers/date-helpers.mjs +1 -1
- package/esm/helpers/file.utils.d.mts +1 -1
- package/esm/helpers/file.utils.mjs +1 -1
- package/esm/helpers/get-field-value.d.mts +1 -1
- package/esm/helpers/get-field-value.mjs +1 -1
- package/esm/helpers/is-empty-value.mjs +1 -1
- package/esm/helpers/path-helpers.d.mts +1 -1
- package/esm/helpers/path-helpers.mjs +1 -1
- package/esm/helpers/validation-helpers.d.mts +1 -1
- package/esm/helpers/validation-helpers.mjs +1 -1
- package/esm/mutators/array-mutators.d.mts +1 -1
- package/esm/mutators/array-mutators.mjs +1 -1
- package/esm/mutators/date-mutators.d.mts +1 -1
- package/esm/mutators/date-mutators.mjs +1 -1
- package/esm/mutators/number-mutators.d.mts +1 -1
- package/esm/mutators/number-mutators.mjs +1 -1
- package/esm/mutators/object-mutators.d.mts +1 -1
- package/esm/mutators/object-mutators.mjs +1 -1
- package/esm/mutators/scalar-mutators.d.mts +1 -1
- package/esm/mutators/scalar-mutators.mjs +1 -1
- package/esm/mutators/string-mutators.d.mts +1 -1
- package/esm/mutators/string-mutators.mjs +1 -1
- package/esm/plugins/plugin-system.d.mts +1 -1
- package/esm/plugins/plugin-system.mjs +1 -1
- package/esm/rules/array/array-rules.d.mts +1 -1
- package/esm/rules/array/array-rules.mjs +1 -1
- package/esm/rules/color/color-rules.d.mts +1 -1
- package/esm/rules/color/color-rules.mjs +1 -1
- package/esm/rules/common/enum.d.mts +1 -1
- package/esm/rules/common/enum.mjs +1 -1
- package/esm/rules/common/equals-field-rules.d.mts +1 -1
- package/esm/rules/common/equals-field-rules.mjs +1 -1
- package/esm/rules/common/instanceof.d.mts +1 -1
- package/esm/rules/common/instanceof.mjs +1 -1
- package/esm/rules/common/literal.d.mts +1 -1
- package/esm/rules/common/literal.mjs +1 -1
- package/esm/rules/common/type-rules.d.mts +1 -1
- package/esm/rules/common/type-rules.mjs +1 -1
- package/esm/rules/common/unknown-key.d.mts +1 -1
- package/esm/rules/common/unknown-key.mjs +1 -1
- package/esm/rules/conditional/forbidden-if-rules.d.mts +1 -1
- package/esm/rules/conditional/forbidden-if-rules.mjs +1 -1
- package/esm/rules/conditional/present-if-rules.d.mts +1 -1
- package/esm/rules/conditional/present-if-rules.mjs +1 -1
- package/esm/rules/conditional/present-unless-rules.d.mts +1 -1
- package/esm/rules/conditional/present-unless-rules.mjs +1 -1
- package/esm/rules/conditional/present-with-rules.d.mts +1 -1
- package/esm/rules/conditional/present-with-rules.mjs +1 -1
- package/esm/rules/conditional/present-without-rules.d.mts +1 -1
- package/esm/rules/conditional/present-without-rules.mjs +1 -1
- package/esm/rules/conditional/required-if-rules.d.mts +1 -1
- package/esm/rules/conditional/required-if-rules.mjs +1 -1
- package/esm/rules/conditional/required-unless-rules.d.mts +1 -1
- package/esm/rules/conditional/required-unless-rules.mjs +1 -1
- package/esm/rules/conditional/required-when-rule.d.mts +1 -1
- package/esm/rules/conditional/required-when-rule.mjs +1 -1
- package/esm/rules/conditional/required-with-rules.d.mts +1 -1
- package/esm/rules/conditional/required-with-rules.mjs +1 -1
- package/esm/rules/conditional/required-without-rules.d.mts +1 -1
- package/esm/rules/conditional/required-without-rules.mjs +1 -1
- package/esm/rules/core/equal.d.mts +1 -1
- package/esm/rules/core/equal.mjs +1 -1
- package/esm/rules/core/forbidden.d.mts +1 -1
- package/esm/rules/core/forbidden.mjs +1 -1
- package/esm/rules/core/required.d.mts +1 -1
- package/esm/rules/core/required.mjs +1 -1
- package/esm/rules/core/union.d.mts +1 -1
- package/esm/rules/core/union.mjs +1 -1
- package/esm/rules/core/when.d.mts +1 -1
- package/esm/rules/core/when.mjs +1 -1
- package/esm/rules/date/date-comparison-rules.d.mts +1 -1
- package/esm/rules/date/date-comparison-rules.mjs +1 -1
- package/esm/rules/date/date-day-rules.d.mts +1 -1
- package/esm/rules/date/date-day-rules.mjs +1 -1
- package/esm/rules/date/date-field-comparison-rules.d.mts +1 -1
- package/esm/rules/date/date-field-comparison-rules.mjs +1 -1
- package/esm/rules/date/date-period-rules.d.mts +1 -1
- package/esm/rules/date/date-period-rules.mjs +1 -1
- package/esm/rules/date/date-relative-rules.d.mts +1 -1
- package/esm/rules/date/date-relative-rules.mjs +1 -1
- package/esm/rules/date/date-special-rules.d.mts +1 -1
- package/esm/rules/date/date-special-rules.mjs +1 -1
- package/esm/rules/date/date.d.mts +1 -1
- package/esm/rules/date/date.mjs +1 -1
- package/esm/rules/file/dimensions.d.mts +1 -1
- package/esm/rules/file/dimensions.mjs +1 -1
- package/esm/rules/file/file-size.d.mts +1 -1
- package/esm/rules/file/file-size.mjs +1 -1
- package/esm/rules/length/length-rules.d.mts +1 -1
- package/esm/rules/length/length-rules.mjs +1 -1
- package/esm/rules/number/number-rules.d.mts +1 -1
- package/esm/rules/number/number-rules.mjs +1 -1
- package/esm/rules/scalar/accepted-rule.mjs +1 -1
- package/esm/rules/scalar/declined-rule.mjs +1 -1
- package/esm/rules/string/alpha.d.mts +1 -1
- package/esm/rules/string/alpha.mjs +1 -1
- package/esm/rules/string/credit-card.d.mts +1 -1
- package/esm/rules/string/credit-card.mjs +1 -1
- package/esm/rules/string/email.d.mts +1 -1
- package/esm/rules/string/email.mjs +1 -1
- package/esm/rules/string/id-formats.d.mts +1 -1
- package/esm/rules/string/id-formats.mjs +1 -1
- package/esm/rules/string/ip.d.mts +1 -1
- package/esm/rules/string/ip.mjs +1 -1
- package/esm/rules/string/matches.d.mts +1 -1
- package/esm/rules/string/matches.mjs +1 -1
- package/esm/rules/string/pattern.d.mts +1 -1
- package/esm/rules/string/pattern.mjs +1 -1
- package/esm/rules/string/string-comparison.d.mts +1 -1
- package/esm/rules/string/string-comparison.mjs +1 -1
- package/esm/rules/string/strong-password-rule.d.mts +1 -1
- package/esm/rules/string/strong-password-rule.mjs +1 -1
- package/esm/rules/string/url.d.mts +1 -1
- package/esm/rules/string/url.mjs +1 -1
- package/esm/rules/string/without-whitespace.d.mts +1 -1
- package/esm/rules/string/without-whitespace.mjs +1 -1
- package/esm/standard-schema/json-schema.d.mts +1 -1
- package/esm/standard-schema/json-schema.mjs +1 -1
- package/esm/standard-schema/map-result.d.mts +1 -1
- package/esm/standard-schema/map-result.mjs +1 -1
- package/esm/standard-schema/types.d.mts +1 -1
- package/esm/types/conditional-types.d.mts +1 -1
- package/esm/types/context-types.d.mts +1 -1
- package/esm/types/data-transformer-types.d.mts +1 -1
- package/esm/types/date-types.d.mts +1 -1
- package/esm/types/date-types.mjs +1 -1
- package/esm/types/file.types.d.mts +1 -1
- package/esm/types/inference-types.d.mts +1 -1
- package/esm/types/mutator-types.d.mts +1 -1
- package/esm/types/result-types.d.mts +1 -1
- package/esm/types/rule-types.d.mts +1 -1
- package/esm/types/schema-types.d.mts +1 -1
- package/esm/validators/any-validator.d.mts +1 -1
- package/esm/validators/any-validator.mjs +1 -1
- package/esm/validators/array-validator.d.mts +1 -1
- package/esm/validators/array-validator.mjs +1 -1
- package/esm/validators/base-validator.d.mts +1 -1
- package/esm/validators/base-validator.mjs +1 -1
- package/esm/validators/boolean-validator.d.mts +1 -1
- package/esm/validators/boolean-validator.mjs +1 -1
- package/esm/validators/computed-validator.d.mts +1 -1
- package/esm/validators/computed-validator.mjs +1 -1
- package/esm/validators/date-validator.d.mts +1 -1
- package/esm/validators/date-validator.mjs +1 -1
- package/esm/validators/discriminated-union-validator.d.mts +1 -1
- package/esm/validators/discriminated-union-validator.mjs +1 -1
- package/esm/validators/float-validator.d.mts +1 -1
- package/esm/validators/float-validator.mjs +1 -1
- package/esm/validators/instanceof-validator.d.mts +1 -1
- package/esm/validators/instanceof-validator.mjs +1 -1
- package/esm/validators/int-validator.d.mts +1 -1
- package/esm/validators/int-validator.mjs +1 -1
- package/esm/validators/lazy-validator.d.mts +1 -1
- package/esm/validators/lazy-validator.mjs +1 -1
- package/esm/validators/literal-validator.d.mts +1 -1
- package/esm/validators/literal-validator.mjs +1 -1
- package/esm/validators/managed-validator.d.mts +1 -1
- package/esm/validators/managed-validator.mjs +1 -1
- package/esm/validators/methods/equality-conditional-methods.d.mts +1 -1
- package/esm/validators/methods/equality-conditional-methods.mjs +1 -1
- package/esm/validators/methods/forbidden-methods.d.mts +1 -1
- package/esm/validators/methods/forbidden-methods.mjs +1 -1
- package/esm/validators/methods/present-methods.d.mts +1 -1
- package/esm/validators/methods/present-methods.mjs +1 -1
- package/esm/validators/methods/required-methods.d.mts +1 -1
- package/esm/validators/methods/required-methods.mjs +1 -1
- package/esm/validators/number-validator.d.mts +1 -1
- package/esm/validators/number-validator.mjs +1 -1
- package/esm/validators/numeric-validator.d.mts +1 -1
- package/esm/validators/numeric-validator.mjs +1 -1
- package/esm/validators/object-validator.d.mts +1 -1
- package/esm/validators/object-validator.mjs +1 -1
- package/esm/validators/primitive-validator.d.mts +1 -1
- package/esm/validators/primitive-validator.mjs +1 -1
- package/esm/validators/record-validator.d.mts +1 -1
- package/esm/validators/record-validator.mjs +1 -1
- package/esm/validators/scalar-validator.d.mts +1 -1
- package/esm/validators/scalar-validator.mjs +1 -1
- package/esm/validators/string-validator.d.mts +1 -1
- package/esm/validators/string-validator.mjs +1 -1
- package/esm/validators/tuple-validator.d.mts +1 -1
- package/esm/validators/tuple-validator.mjs +1 -1
- package/esm/validators/union-validator.d.mts +1 -1
- package/esm/validators/union-validator.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "./schema-types.mjs";
|
|
2
2
|
import { SchemaRule } from "./rule-types.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../@warlock.js/seal/src/types/context-types.d.ts
|
|
5
5
|
type RuleTranslation = {
|
|
6
6
|
rule: SchemaRule;
|
|
7
7
|
context: SchemaContext;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SchemaContext } from "./context-types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../../@warlock.js/seal/src/types/data-transformer-types.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Transformer callback signature
|
|
6
6
|
* First param: the data to transform
|
package/esm/types/date-types.mjs
CHANGED
|
@@ -16,7 +16,7 @@ import { LiteralValidator } from "../validators/literal-validator.mjs";
|
|
|
16
16
|
import { ManagedValidator } from "../validators/managed-validator.mjs";
|
|
17
17
|
import { ScalarValidator } from "../validators/scalar-validator.mjs";
|
|
18
18
|
import { StringValidator } from "../validators/string-validator.mjs";
|
|
19
|
-
//#region
|
|
19
|
+
//#region ../../@warlock.js/seal/src/types/inference-types.d.ts
|
|
20
20
|
/**
|
|
21
21
|
* Two inference shapes describe the two halves of the validation pipeline:
|
|
22
22
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JsonSchemaResult, JsonSchemaTarget } from "../standard-schema/json-schema.mjs";
|
|
2
2
|
import { BaseValidator } from "./base-validator.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../@warlock.js/seal/src/validators/any-validator.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Any validator - accepts any value
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { applyNullable } from "../standard-schema/json-schema.mjs";
|
|
2
2
|
import { BaseValidator } from "./base-validator.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../@warlock.js/seal/src/validators/any-validator.ts
|
|
5
5
|
/**
|
|
6
6
|
* Any validator - accepts any value
|
|
7
7
|
*/
|
|
@@ -3,7 +3,7 @@ import { SchemaContext } from "../types/context-types.mjs";
|
|
|
3
3
|
import { ValidationResult } from "../types/result-types.mjs";
|
|
4
4
|
import { BaseValidator } from "./base-validator.mjs";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../../@warlock.js/seal/src/validators/array-validator.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Array validator class
|
|
9
9
|
*/
|
|
@@ -9,7 +9,7 @@ import { sortedArrayRule, uniqueArrayRule } from "../rules/array/array-rules.mjs
|
|
|
9
9
|
import { arrayRule } from "../rules/common/type-rules.mjs";
|
|
10
10
|
import "../rules/index.mjs";
|
|
11
11
|
|
|
12
|
-
//#region
|
|
12
|
+
//#region ../../@warlock.js/seal/src/validators/array-validator.ts
|
|
13
13
|
/**
|
|
14
14
|
* Array validator class
|
|
15
15
|
*/
|
|
@@ -6,7 +6,7 @@ import { ValidationResult } from "../types/result-types.mjs";
|
|
|
6
6
|
import { ContextualizedMutator, Mutator } from "../types/mutator-types.mjs";
|
|
7
7
|
import { ContextualizedTransformer, SimpleTransformerCallback, TransformerCallback } from "../types/data-transformer-types.mjs";
|
|
8
8
|
|
|
9
|
-
//#region
|
|
9
|
+
//#region ../../@warlock.js/seal/src/validators/base-validator.d.ts
|
|
10
10
|
/**
|
|
11
11
|
* Base validator class - foundation for all validators
|
|
12
12
|
*/
|
|
@@ -6,7 +6,7 @@ import { requiredRule } from "../rules/core/required.mjs";
|
|
|
6
6
|
import { mapToStandardResult } from "../standard-schema/map-result.mjs";
|
|
7
7
|
import { clone } from "@mongez/reinforcements";
|
|
8
8
|
|
|
9
|
-
//#region
|
|
9
|
+
//#region ../../@warlock.js/seal/src/validators/base-validator.ts
|
|
10
10
|
/**
|
|
11
11
|
* Base validator class - foundation for all validators
|
|
12
12
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JsonSchemaResult, JsonSchemaTarget } from "../standard-schema/json-schema.mjs";
|
|
2
2
|
import { PrimitiveValidator } from "./primitive-validator.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../@warlock.js/seal/src/validators/boolean-validator.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Boolean validator class
|
|
7
7
|
*
|
|
@@ -6,7 +6,7 @@ import { acceptedIfPresentRule, acceptedIfRequiredRule, acceptedIfRule, accepted
|
|
|
6
6
|
import { declinedIfPresentRule, declinedIfRequiredRule, declinedIfRule, declinedRule, declinedUnlessRule, declinedWithoutRule } from "../rules/scalar/declined-rule.mjs";
|
|
7
7
|
import "../rules/scalar/index.mjs";
|
|
8
8
|
|
|
9
|
-
//#region
|
|
9
|
+
//#region ../../@warlock.js/seal/src/validators/boolean-validator.ts
|
|
10
10
|
/**
|
|
11
11
|
* Boolean validator class
|
|
12
12
|
*
|
|
@@ -3,7 +3,7 @@ import { SchemaContext } from "../types/context-types.mjs";
|
|
|
3
3
|
import { ValidationResult } from "../types/result-types.mjs";
|
|
4
4
|
import { BaseValidator } from "./base-validator.mjs";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../../@warlock.js/seal/src/validators/computed-validator.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Callback function for computed fields
|
|
9
9
|
* Receives validated & mutated data and full schema context
|
|
@@ -3,7 +3,7 @@ import { WeekDay } from "../types/date-types.mjs";
|
|
|
3
3
|
import { BaseValidator } from "./base-validator.mjs";
|
|
4
4
|
import { Month } from "../rules/date/date-period-rules.mjs";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../../@warlock.js/seal/src/validators/date-validator.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Date validator class
|
|
9
9
|
*/
|
|
@@ -13,7 +13,7 @@ import { betweenAgeRule, birthdayRule, leapYearRule } from "../rules/date/date-s
|
|
|
13
13
|
import "../rules/index.mjs";
|
|
14
14
|
import dayjs from "dayjs";
|
|
15
15
|
|
|
16
|
-
//#region
|
|
16
|
+
//#region ../../@warlock.js/seal/src/validators/date-validator.ts
|
|
17
17
|
/**
|
|
18
18
|
* Date validator class
|
|
19
19
|
*/
|
|
@@ -4,7 +4,7 @@ import { ValidationResult } from "../types/result-types.mjs";
|
|
|
4
4
|
import { BaseValidator } from "./base-validator.mjs";
|
|
5
5
|
import { ObjectValidator } from "./object-validator.mjs";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../../@warlock.js/seal/src/validators/discriminated-union-validator.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* Discriminated union validator — routes payloads by a shared discriminator field.
|
|
10
10
|
*
|
|
@@ -3,7 +3,7 @@ import { BaseValidator } from "./base-validator.mjs";
|
|
|
3
3
|
import { LiteralValidator } from "./literal-validator.mjs";
|
|
4
4
|
import { isPlainObject } from "@mongez/supportive-is";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../../@warlock.js/seal/src/validators/discriminated-union-validator.ts
|
|
7
7
|
/**
|
|
8
8
|
* Discriminated union validator — routes payloads by a shared discriminator field.
|
|
9
9
|
*
|
|
@@ -2,7 +2,7 @@ import { floatRule } from "../rules/common/type-rules.mjs";
|
|
|
2
2
|
import "../rules/index.mjs";
|
|
3
3
|
import { NumberValidator } from "./number-validator.mjs";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../../@warlock.js/seal/src/validators/float-validator.ts
|
|
6
6
|
/**
|
|
7
7
|
* Float validator class
|
|
8
8
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JsonSchemaResult, JsonSchemaTarget } from "../standard-schema/json-schema.mjs";
|
|
2
2
|
import { BaseValidator } from "./base-validator.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../@warlock.js/seal/src/validators/instanceof-validator.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* InstanceOf validator class
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseValidator } from "./base-validator.mjs";
|
|
2
2
|
import { instanceofRule } from "../rules/common/instanceof.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../@warlock.js/seal/src/validators/instanceof-validator.ts
|
|
5
5
|
/**
|
|
6
6
|
* InstanceOf validator class
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JsonSchemaResult, JsonSchemaTarget } from "../standard-schema/json-schema.mjs";
|
|
2
2
|
import { NumberValidator } from "./number-validator.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../@warlock.js/seal/src/validators/int-validator.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Integer validator class
|
|
7
7
|
*/
|
|
@@ -2,7 +2,7 @@ import { intRule } from "../rules/common/type-rules.mjs";
|
|
|
2
2
|
import "../rules/index.mjs";
|
|
3
3
|
import { NumberValidator } from "./number-validator.mjs";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../../@warlock.js/seal/src/validators/int-validator.ts
|
|
6
6
|
/**
|
|
7
7
|
* Integer validator class
|
|
8
8
|
*/
|
|
@@ -3,7 +3,7 @@ import { SchemaContext } from "../types/context-types.mjs";
|
|
|
3
3
|
import { ValidationResult } from "../types/result-types.mjs";
|
|
4
4
|
import { BaseValidator } from "./base-validator.mjs";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../../@warlock.js/seal/src/validators/lazy-validator.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Lazy validator — defers resolution of the inner validator until validate-time.
|
|
9
9
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseValidator } from "./base-validator.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../../@warlock.js/seal/src/validators/lazy-validator.ts
|
|
4
4
|
/**
|
|
5
5
|
* Lazy validator — defers resolution of the inner validator until validate-time.
|
|
6
6
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JsonSchemaResult, JsonSchemaTarget } from "../standard-schema/json-schema.mjs";
|
|
2
2
|
import { BaseValidator } from "./base-validator.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../@warlock.js/seal/src/validators/literal-validator.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Literal validator class
|
|
7
7
|
*
|
|
@@ -2,7 +2,7 @@ import { applyNullable } from "../standard-schema/json-schema.mjs";
|
|
|
2
2
|
import { BaseValidator } from "./base-validator.mjs";
|
|
3
3
|
import { literalRule } from "../rules/common/literal.mjs";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../../@warlock.js/seal/src/validators/literal-validator.ts
|
|
6
6
|
/**
|
|
7
7
|
* Literal validator class
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@ import { SchemaContext } from "../types/context-types.mjs";
|
|
|
2
2
|
import { BaseValidator } from "./base-validator.mjs";
|
|
3
3
|
import { ComputedValidator } from "./computed-validator.mjs";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../../@warlock.js/seal/src/validators/managed-validator.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Callback function for managed fields
|
|
8
8
|
* Receives only schema context (no data dependency)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WhenRuleOptions } from "../../types/conditional-types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../../@warlock.js/seal/src/validators/methods/equality-conditional-methods.d.ts
|
|
4
4
|
declare module "../base-validator.mjs" {
|
|
5
5
|
interface BaseValidator {
|
|
6
6
|
/**
|
|
@@ -4,7 +4,7 @@ import { whenRule } from "../../rules/core/when.mjs";
|
|
|
4
4
|
import { equalsFieldRule, notEqualsFieldRule } from "../../rules/common/equals-field-rules.mjs";
|
|
5
5
|
import "../../rules/index.mjs";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../../@warlock.js/seal/src/validators/methods/equality-conditional-methods.ts
|
|
8
8
|
/**
|
|
9
9
|
* Value must be equal to the given value
|
|
10
10
|
*/
|
|
@@ -2,7 +2,7 @@ import { BaseValidator } from "../base-validator.mjs";
|
|
|
2
2
|
import { forbiddenRule } from "../../rules/core/forbidden.mjs";
|
|
3
3
|
import { forbiddenIfEmptyRule, forbiddenIfInRule, forbiddenIfNotEmptyRule, forbiddenIfNotInRule, forbiddenIfNotRule, forbiddenIfRule } from "../../rules/conditional/forbidden-if-rules.mjs";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../../@warlock.js/seal/src/validators/methods/forbidden-methods.ts
|
|
6
6
|
/**
|
|
7
7
|
* Value is forbidden to be present
|
|
8
8
|
*/
|
|
@@ -4,7 +4,7 @@ import { presentUnlessRule } from "../../rules/conditional/present-unless-rules.
|
|
|
4
4
|
import { presentWithAllRule, presentWithAnyRule, presentWithRule } from "../../rules/conditional/present-with-rules.mjs";
|
|
5
5
|
import { presentWithoutAllRule, presentWithoutAnyRule, presentWithoutRule } from "../../rules/conditional/present-without-rules.mjs";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../../@warlock.js/seal/src/validators/methods/present-methods.ts
|
|
8
8
|
/**
|
|
9
9
|
* Field must be present if another field exists
|
|
10
10
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SchemaContext } from "../../types/context-types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../../@warlock.js/seal/src/validators/methods/required-methods.d.ts
|
|
4
4
|
declare module "../base-validator.mjs" {
|
|
5
5
|
interface BaseValidator {
|
|
6
6
|
/**
|
|
@@ -6,7 +6,7 @@ import { requiredWhenRule } from "../../rules/conditional/required-when-rule.mjs
|
|
|
6
6
|
import { requiredWithAllRule, requiredWithAnyRule, requiredWithRule } from "../../rules/conditional/required-with-rules.mjs";
|
|
7
7
|
import { requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule } from "../../rules/conditional/required-without-rules.mjs";
|
|
8
8
|
|
|
9
|
-
//#region
|
|
9
|
+
//#region ../../@warlock.js/seal/src/validators/methods/required-methods.ts
|
|
10
10
|
/**
|
|
11
11
|
* This value must be present and has a value
|
|
12
12
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JsonSchemaResult, JsonSchemaTarget } from "../standard-schema/json-schema.mjs";
|
|
2
2
|
import { PrimitiveValidator } from "./primitive-validator.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../@warlock.js/seal/src/validators/number-validator.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Number validator class - base for Int and Float validators
|
|
7
7
|
*/
|
|
@@ -7,7 +7,7 @@ import { numberRule } from "../rules/common/type-rules.mjs";
|
|
|
7
7
|
import "../rules/index.mjs";
|
|
8
8
|
import { PrimitiveValidator } from "./primitive-validator.mjs";
|
|
9
9
|
|
|
10
|
-
//#region
|
|
10
|
+
//#region ../../@warlock.js/seal/src/validators/number-validator.ts
|
|
11
11
|
/**
|
|
12
12
|
* Number validator class - base for Int and Float validators
|
|
13
13
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NumberValidator } from "./number-validator.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../../@warlock.js/seal/src/validators/numeric-validator.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Numeric validator class - base for Int and Float validators either as number or string
|
|
6
6
|
*/
|
|
@@ -2,7 +2,7 @@ import { numericMutator } from "../mutators/number-mutators.mjs";
|
|
|
2
2
|
import { NumberValidator } from "./number-validator.mjs";
|
|
3
3
|
import { isNumeric } from "@mongez/supportive-is";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../../@warlock.js/seal/src/validators/numeric-validator.ts
|
|
6
6
|
/**
|
|
7
7
|
* Numeric validator class - base for Int and Float validators either as number or string
|
|
8
8
|
*/
|
|
@@ -5,7 +5,7 @@ import { ValidationResult } from "../types/result-types.mjs";
|
|
|
5
5
|
import { InferInputObjectShape, InferOutputObjectShape } from "../types/inference-types.mjs";
|
|
6
6
|
import { BaseValidator } from "./base-validator.mjs";
|
|
7
7
|
|
|
8
|
-
//#region
|
|
8
|
+
//#region ../../@warlock.js/seal/src/validators/object-validator.d.ts
|
|
9
9
|
/**
|
|
10
10
|
* Object validator class with generic schema type for proper type inference.
|
|
11
11
|
*
|
|
@@ -11,7 +11,7 @@ import { ComputedValidator } from "./computed-validator.mjs";
|
|
|
11
11
|
import { except } from "@mongez/reinforcements";
|
|
12
12
|
import { isPlainObject } from "@mongez/supportive-is";
|
|
13
13
|
|
|
14
|
-
//#region
|
|
14
|
+
//#region ../../@warlock.js/seal/src/validators/object-validator.ts
|
|
15
15
|
/**
|
|
16
16
|
* Object validator class with generic schema type for proper type inference.
|
|
17
17
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseValidator } from "./base-validator.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../../@warlock.js/seal/src/validators/primitive-validator.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Abstract base validator for primitive-typed fields (string, number, boolean).
|
|
6
6
|
*
|
|
@@ -2,7 +2,7 @@ import { BaseValidator } from "./base-validator.mjs";
|
|
|
2
2
|
import { allowedValuesRule, enumRule, inRule, notAllowedValuesRule } from "../rules/common/enum.mjs";
|
|
3
3
|
import "../rules/index.mjs";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../../@warlock.js/seal/src/validators/primitive-validator.ts
|
|
6
6
|
/**
|
|
7
7
|
* Abstract base validator for primitive-typed fields (string, number, boolean).
|
|
8
8
|
*
|
|
@@ -3,7 +3,7 @@ import { SchemaContext } from "../types/context-types.mjs";
|
|
|
3
3
|
import { ValidationResult } from "../types/result-types.mjs";
|
|
4
4
|
import { BaseValidator } from "./base-validator.mjs";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../../@warlock.js/seal/src/validators/record-validator.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Record validator class - validates objects with dynamic keys and consistent value types
|
|
9
9
|
*
|
|
@@ -6,7 +6,7 @@ import { objectRule, plainObjectRule } from "../rules/common/type-rules.mjs";
|
|
|
6
6
|
import "../rules/index.mjs";
|
|
7
7
|
import { isPlainObject } from "@mongez/supportive-is";
|
|
8
8
|
|
|
9
|
-
//#region
|
|
9
|
+
//#region ../../@warlock.js/seal/src/validators/record-validator.ts
|
|
10
10
|
/**
|
|
11
11
|
* Record validator class - validates objects with dynamic keys and consistent value types
|
|
12
12
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JsonSchemaResult, JsonSchemaTarget } from "../standard-schema/json-schema.mjs";
|
|
2
2
|
import { PrimitiveValidator } from "./primitive-validator.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../@warlock.js/seal/src/validators/scalar-validator.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Scalar validator class
|
|
7
7
|
*
|
|
@@ -9,7 +9,7 @@ import { acceptedIfPresentRule, acceptedIfRequiredRule, acceptedIfRule, accepted
|
|
|
9
9
|
import { declinedIfPresentRule, declinedIfRequiredRule, declinedIfRule, declinedRule, declinedUnlessRule, declinedWithoutRule } from "../rules/scalar/declined-rule.mjs";
|
|
10
10
|
import "../rules/scalar/index.mjs";
|
|
11
11
|
|
|
12
|
-
//#region
|
|
12
|
+
//#region ../../@warlock.js/seal/src/validators/scalar-validator.ts
|
|
13
13
|
/**
|
|
14
14
|
* Scalar validator class
|
|
15
15
|
*
|
|
@@ -2,7 +2,7 @@ import { JsonSchemaResult, JsonSchemaTarget } from "../standard-schema/json-sche
|
|
|
2
2
|
import { PrimitiveValidator } from "./primitive-validator.mjs";
|
|
3
3
|
import { UUIDVersion } from "../rules/string/id-formats.mjs";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../../@warlock.js/seal/src/validators/string-validator.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* String validator class
|
|
8
8
|
*/
|
|
@@ -17,7 +17,7 @@ import { stringRule } from "../rules/common/type-rules.mjs";
|
|
|
17
17
|
import "../rules/index.mjs";
|
|
18
18
|
import { PrimitiveValidator } from "./primitive-validator.mjs";
|
|
19
19
|
|
|
20
|
-
//#region
|
|
20
|
+
//#region ../../@warlock.js/seal/src/validators/string-validator.ts
|
|
21
21
|
/**
|
|
22
22
|
* String validator class
|
|
23
23
|
*/
|
|
@@ -3,7 +3,7 @@ import { SchemaContext } from "../types/context-types.mjs";
|
|
|
3
3
|
import { ValidationResult } from "../types/result-types.mjs";
|
|
4
4
|
import { BaseValidator } from "./base-validator.mjs";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../../@warlock.js/seal/src/validators/tuple-validator.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Tuple validator class - validates fixed-length arrays with position-specific types
|
|
9
9
|
*
|
|
@@ -5,7 +5,7 @@ import { BaseValidator } from "./base-validator.mjs";
|
|
|
5
5
|
import { arrayRule } from "../rules/common/type-rules.mjs";
|
|
6
6
|
import "../rules/index.mjs";
|
|
7
7
|
|
|
8
|
-
//#region
|
|
8
|
+
//#region ../../@warlock.js/seal/src/validators/tuple-validator.ts
|
|
9
9
|
/**
|
|
10
10
|
* Tuple validator class - validates fixed-length arrays with position-specific types
|
|
11
11
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JsonSchemaResult, JsonSchemaTarget } from "../standard-schema/json-schema.mjs";
|
|
2
2
|
import { BaseValidator } from "./base-validator.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../@warlock.js/seal/src/validators/union-validator.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Union validator class - validates value against multiple validator types
|
|
7
7
|
*
|