@warlock.js/seal 5.30.0 → 5.32.0
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/CHANGELOG.md +46 -7
- package/README.md +57 -9
- package/cjs/index.cjs +41 -29
- package/cjs/index.cjs.map +1 -1
- package/cjs/{object--LXRt5RF.cjs → object-BoVGJ68E.cjs} +43 -24
- package/cjs/object-BoVGJ68E.cjs.map +1 -0
- package/cjs/object.cjs +2 -2
- package/cjs/{required-methods-DYsRO9aZ.cjs → required-methods-BJlnLnwa.cjs} +343 -258
- package/cjs/required-methods-BJlnLnwa.cjs.map +1 -0
- package/cjs/{string-DsqnKoSB.cjs → string-CM8x0u2w.cjs} +46 -44
- package/cjs/string-CM8x0u2w.cjs.map +1 -0
- package/cjs/string.cjs +2 -2
- package/esm/config.d.mts +7 -8
- package/esm/config.d.mts.map +1 -1
- package/esm/config.mjs.map +1 -1
- package/esm/factory/index.d.mts +2 -1
- package/esm/factory/index.mjs +1 -1
- package/esm/factory/validate.d.mts +3 -6
- package/esm/factory/validate.d.mts.map +1 -1
- package/esm/factory/validators.d.mts +16 -13
- package/esm/factory/validators.d.mts.map +1 -1
- package/esm/factory/validators.mjs +7 -1
- package/esm/factory/validators.mjs.map +1 -1
- package/esm/helpers/date-helpers.d.mts +1 -2
- package/esm/helpers/date-helpers.d.mts.map +1 -1
- package/esm/helpers/file.utils.d.mts +2 -4
- package/esm/helpers/file.utils.d.mts.map +1 -1
- package/esm/helpers/get-field-value.d.mts +2 -3
- package/esm/helpers/get-field-value.d.mts.map +1 -1
- package/esm/helpers/get-field-value.mjs +2 -1
- package/esm/helpers/get-field-value.mjs.map +1 -1
- package/esm/helpers/index.d.mts +6 -0
- package/esm/helpers/index.mjs +1 -1
- package/esm/helpers/path-helpers.d.mts +1 -2
- package/esm/helpers/path-helpers.d.mts.map +1 -1
- package/esm/helpers/validation-helpers.d.mts +4 -10
- package/esm/helpers/validation-helpers.d.mts.map +1 -1
- package/esm/index.d.mts +7 -0
- package/esm/mutators/array-mutators.d.mts +6 -7
- package/esm/mutators/array-mutators.d.mts.map +1 -1
- package/esm/mutators/boolean-mutators.d.mts +3 -4
- package/esm/mutators/boolean-mutators.d.mts.map +1 -1
- package/esm/mutators/date-mutators.d.mts +18 -19
- package/esm/mutators/date-mutators.d.mts.map +1 -1
- package/esm/mutators/index.d.mts +8 -0
- package/esm/mutators/index.mjs +1 -1
- package/esm/mutators/number-mutators.d.mts +10 -11
- package/esm/mutators/number-mutators.d.mts.map +1 -1
- package/esm/mutators/object-mutators.d.mts +4 -5
- package/esm/mutators/object-mutators.d.mts.map +1 -1
- package/esm/mutators/object-mutators.mjs +5 -4
- package/esm/mutators/object-mutators.mjs.map +1 -1
- package/esm/mutators/scalar-mutators.d.mts +2 -3
- package/esm/mutators/scalar-mutators.d.mts.map +1 -1
- package/esm/mutators/string-mutators.d.mts +37 -38
- package/esm/mutators/string-mutators.d.mts.map +1 -1
- package/esm/mutators/string-mutators.mjs +5 -3
- package/esm/mutators/string-mutators.mjs.map +1 -1
- package/esm/object.d.mts +3 -5
- package/esm/object.d.mts.map +1 -1
- package/esm/object.mjs.map +1 -1
- package/esm/plugins/plugin-system.d.mts +11 -9
- package/esm/plugins/plugin-system.d.mts.map +1 -1
- package/esm/rules/array/array-rules.d.mts +3 -4
- package/esm/rules/array/array-rules.d.mts.map +1 -1
- package/esm/rules/array/index.d.mts +2 -0
- package/esm/rules/array/index.mjs +1 -1
- package/esm/rules/color/color-rules.d.mts +8 -9
- package/esm/rules/color/color-rules.d.mts.map +1 -1
- package/esm/rules/color/index.d.mts +2 -0
- package/esm/rules/color/index.mjs +1 -1
- package/esm/rules/common/enum.d.mts +5 -6
- package/esm/rules/common/enum.d.mts.map +1 -1
- package/esm/rules/common/equals-field-rules.d.mts +3 -4
- package/esm/rules/common/equals-field-rules.d.mts.map +1 -1
- package/esm/rules/common/index.d.mts +7 -0
- package/esm/rules/common/index.mjs +1 -1
- package/esm/rules/common/instanceof.d.mts +2 -3
- package/esm/rules/common/instanceof.d.mts.map +1 -1
- package/esm/rules/common/literal.d.mts +2 -3
- package/esm/rules/common/literal.d.mts.map +1 -1
- package/esm/rules/common/literal.mjs.map +1 -1
- package/esm/rules/common/type-rules.d.mts +10 -11
- package/esm/rules/common/type-rules.d.mts.map +1 -1
- package/esm/rules/common/unknown-key.d.mts +2 -3
- package/esm/rules/common/unknown-key.d.mts.map +1 -1
- package/esm/rules/conditional/forbidden-if-rules.d.mts +7 -8
- package/esm/rules/conditional/forbidden-if-rules.d.mts.map +1 -1
- package/esm/rules/conditional/index.d.mts +11 -0
- package/esm/rules/conditional/index.mjs +1 -1
- package/esm/rules/conditional/present-if-rules.d.mts +6 -7
- package/esm/rules/conditional/present-if-rules.d.mts.map +1 -1
- package/esm/rules/conditional/present-unless-rules.d.mts +2 -3
- package/esm/rules/conditional/present-unless-rules.d.mts.map +1 -1
- package/esm/rules/conditional/present-with-rules.d.mts +4 -5
- package/esm/rules/conditional/present-with-rules.d.mts.map +1 -1
- package/esm/rules/conditional/present-without-rules.d.mts +4 -5
- package/esm/rules/conditional/present-without-rules.d.mts.map +1 -1
- package/esm/rules/conditional/required-if-rules.d.mts +10 -11
- package/esm/rules/conditional/required-if-rules.d.mts.map +1 -1
- package/esm/rules/conditional/required-unless-rules.d.mts +2 -3
- package/esm/rules/conditional/required-unless-rules.d.mts.map +1 -1
- package/esm/rules/conditional/required-when-rule.d.mts +2 -3
- package/esm/rules/conditional/required-when-rule.d.mts.map +1 -1
- package/esm/rules/conditional/required-with-rules.d.mts +4 -5
- package/esm/rules/conditional/required-with-rules.d.mts.map +1 -1
- package/esm/rules/conditional/required-without-rules.d.mts +4 -5
- package/esm/rules/conditional/required-without-rules.d.mts.map +1 -1
- package/esm/rules/core/equal.d.mts +2 -3
- package/esm/rules/core/equal.d.mts.map +1 -1
- package/esm/rules/core/forbidden.d.mts +2 -3
- package/esm/rules/core/forbidden.d.mts.map +1 -1
- package/esm/rules/core/index.d.mts +6 -0
- package/esm/rules/core/index.mjs +1 -1
- package/esm/rules/core/required.d.mts +3 -4
- package/esm/rules/core/required.d.mts.map +1 -1
- package/esm/rules/core/union.d.mts +10 -4
- package/esm/rules/core/union.d.mts.map +1 -1
- package/esm/rules/core/union.mjs +56 -10
- package/esm/rules/core/union.mjs.map +1 -1
- package/esm/rules/core/when.d.mts +2 -3
- package/esm/rules/core/when.d.mts.map +1 -1
- package/esm/rules/core/when.mjs.map +1 -1
- package/esm/rules/date/date-comparison-rules.d.mts +6 -7
- package/esm/rules/date/date-comparison-rules.d.mts.map +1 -1
- package/esm/rules/date/date-day-rules.d.mts +5 -6
- package/esm/rules/date/date-day-rules.d.mts.map +1 -1
- package/esm/rules/date/date-field-comparison-rules.d.mts +4 -5
- package/esm/rules/date/date-field-comparison-rules.d.mts.map +1 -1
- package/esm/rules/date/date-field-comparison-rules.mjs +6 -3
- package/esm/rules/date/date-field-comparison-rules.mjs.map +1 -1
- package/esm/rules/date/date-period-rules.d.mts +16 -16
- package/esm/rules/date/date-period-rules.d.mts.map +1 -1
- package/esm/rules/date/date-period-rules.mjs +24 -12
- package/esm/rules/date/date-period-rules.mjs.map +1 -1
- package/esm/rules/date/date-relative-rules.d.mts +4 -5
- package/esm/rules/date/date-relative-rules.d.mts.map +1 -1
- package/esm/rules/date/date-relative-rules.mjs +3 -3
- package/esm/rules/date/date-relative-rules.mjs.map +1 -1
- package/esm/rules/date/date-special-rules.d.mts +4 -5
- package/esm/rules/date/date-special-rules.d.mts.map +1 -1
- package/esm/rules/date/date.d.mts +16 -17
- package/esm/rules/date/date.d.mts.map +1 -1
- package/esm/rules/date/date.mjs +4 -2
- package/esm/rules/date/date.mjs.map +1 -1
- package/esm/rules/date/index.d.mts +8 -0
- package/esm/rules/date/index.mjs +1 -1
- package/esm/rules/file/dimensions.d.mts +5 -6
- package/esm/rules/file/dimensions.d.mts.map +1 -1
- package/esm/rules/file/file-size.d.mts +3 -4
- package/esm/rules/file/file-size.d.mts.map +1 -1
- package/esm/rules/file/index.d.mts +3 -0
- package/esm/rules/file/index.mjs +1 -1
- package/esm/rules/index.d.mts +56 -0
- package/esm/rules/index.mjs +1 -1
- package/esm/rules/length/index.d.mts +2 -0
- package/esm/rules/length/index.mjs +1 -1
- package/esm/rules/length/length-rules.d.mts +8 -9
- package/esm/rules/length/length-rules.d.mts.map +1 -1
- package/esm/rules/number/index.d.mts +2 -0
- package/esm/rules/number/index.mjs +1 -1
- package/esm/rules/number/number-rules.d.mts +11 -12
- package/esm/rules/number/number-rules.d.mts.map +1 -1
- package/esm/rules/number/number-rules.mjs +12 -6
- package/esm/rules/number/number-rules.mjs.map +1 -1
- package/esm/rules/scalar/index.mjs +1 -1
- package/esm/rules/string/alpha.d.mts +4 -5
- package/esm/rules/string/alpha.d.mts.map +1 -1
- package/esm/rules/string/credit-card.d.mts +2 -3
- package/esm/rules/string/credit-card.d.mts.map +1 -1
- package/esm/rules/string/email.d.mts +2 -3
- package/esm/rules/string/email.d.mts.map +1 -1
- package/esm/rules/string/id-formats.d.mts +6 -7
- package/esm/rules/string/id-formats.d.mts.map +1 -1
- package/esm/rules/string/index.d.mts +12 -0
- package/esm/rules/string/index.mjs +1 -1
- package/esm/rules/string/ip.d.mts +7 -8
- package/esm/rules/string/ip.d.mts.map +1 -1
- package/esm/rules/string/matches.d.mts +2 -3
- package/esm/rules/string/matches.d.mts.map +1 -1
- package/esm/rules/string/pattern.d.mts +2 -3
- package/esm/rules/string/pattern.d.mts.map +1 -1
- package/esm/rules/string/string-comparison.d.mts +5 -6
- package/esm/rules/string/string-comparison.d.mts.map +1 -1
- package/esm/rules/string/strong-password-rule.d.mts +2 -3
- package/esm/rules/string/strong-password-rule.d.mts.map +1 -1
- package/esm/rules/string/url.d.mts +2 -3
- package/esm/rules/string/url.d.mts.map +1 -1
- package/esm/rules/string/without-whitespace.d.mts +2 -3
- package/esm/rules/string/without-whitespace.d.mts.map +1 -1
- package/esm/standard-schema/index.d.mts +4 -0
- package/esm/standard-schema/json-schema.d.mts +5 -7
- package/esm/standard-schema/json-schema.d.mts.map +1 -1
- package/esm/standard-schema/json-schema.mjs.map +1 -1
- package/esm/standard-schema/map-result.d.mts +2 -3
- package/esm/standard-schema/map-result.d.mts.map +1 -1
- package/esm/standard-schema/map-result.mjs.map +1 -1
- package/esm/standard-schema/types.d.mts +4 -5
- package/esm/standard-schema/types.d.mts.map +1 -1
- package/esm/string.d.mts +2 -3
- package/esm/string.d.mts.map +1 -1
- package/esm/types/conditional-types.d.mts +8 -6
- package/esm/types/conditional-types.d.mts.map +1 -1
- package/esm/types/context-types.d.mts +24 -15
- package/esm/types/context-types.d.mts.map +1 -1
- package/esm/types/data-transformer-types.d.mts +3 -5
- package/esm/types/data-transformer-types.d.mts.map +1 -1
- package/esm/types/date-types.d.mts +2 -3
- package/esm/types/date-types.d.mts.map +1 -1
- package/esm/types/file.types.d.mts +1 -2
- package/esm/types/file.types.d.mts.map +1 -1
- package/esm/types/index.d.mts +11 -0
- package/esm/types/inference-types.d.mts +15 -14
- package/esm/types/inference-types.d.mts.map +1 -1
- package/esm/types/mutator-types.d.mts +9 -7
- package/esm/types/mutator-types.d.mts.map +1 -1
- package/esm/types/result-types.d.mts +12 -7
- package/esm/types/result-types.d.mts.map +1 -1
- package/esm/types/rule-types.d.mts +33 -15
- package/esm/types/rule-types.d.mts.map +1 -1
- package/esm/types/schema-types.d.mts +1 -3
- package/esm/types/schema-types.d.mts.map +1 -1
- package/esm/validators/any-validator.d.mts +1 -3
- package/esm/validators/any-validator.d.mts.map +1 -1
- package/esm/validators/array-validator.d.mts +2 -3
- package/esm/validators/array-validator.d.mts.map +1 -1
- package/esm/validators/array-validator.mjs +3 -3
- package/esm/validators/array-validator.mjs.map +1 -1
- package/esm/validators/base-validator.d.mts +10 -11
- package/esm/validators/base-validator.d.mts.map +1 -1
- package/esm/validators/base-validator.mjs +52 -21
- package/esm/validators/base-validator.mjs.map +1 -1
- package/esm/validators/boolean-validator.d.mts +1 -3
- package/esm/validators/boolean-validator.d.mts.map +1 -1
- package/esm/validators/computed-validator.d.mts +3 -4
- package/esm/validators/computed-validator.d.mts.map +1 -1
- package/esm/validators/computed-validator.mjs +4 -4
- package/esm/validators/computed-validator.mjs.map +1 -1
- package/esm/validators/date-validator.d.mts +2 -3
- package/esm/validators/date-validator.d.mts.map +1 -1
- package/esm/validators/discriminated-union-validator.d.mts +3 -3
- package/esm/validators/discriminated-union-validator.d.mts.map +1 -1
- package/esm/validators/discriminated-union-validator.mjs +1 -1
- package/esm/validators/discriminated-union-validator.mjs.map +1 -1
- package/esm/validators/float-validator.d.mts +1 -3
- package/esm/validators/float-validator.d.mts.map +1 -1
- package/esm/validators/index.d.mts +2 -1
- package/esm/validators/index.mjs +1 -1
- package/esm/validators/instanceof-validator.d.mts +1 -3
- package/esm/validators/instanceof-validator.d.mts.map +1 -1
- package/esm/validators/int-validator.d.mts +1 -3
- package/esm/validators/int-validator.d.mts.map +1 -1
- package/esm/validators/lazy-validator.d.mts +2 -3
- package/esm/validators/lazy-validator.d.mts.map +1 -1
- package/esm/validators/lazy-validator.mjs +1 -1
- package/esm/validators/lazy-validator.mjs.map +1 -1
- package/esm/validators/literal-validator.d.mts +1 -3
- package/esm/validators/literal-validator.d.mts.map +1 -1
- package/esm/validators/managed-validator.d.mts +3 -4
- package/esm/validators/managed-validator.d.mts.map +1 -1
- package/esm/validators/methods/equality-conditional-methods.d.mts +3 -4
- package/esm/validators/methods/equality-conditional-methods.d.mts.map +1 -1
- package/esm/validators/methods/forbidden-methods.d.mts +2 -3
- package/esm/validators/methods/forbidden-methods.d.mts.map +1 -1
- package/esm/validators/methods/present-methods.d.mts +2 -3
- package/esm/validators/methods/present-methods.d.mts.map +1 -1
- package/esm/validators/methods/required-methods.d.mts +3 -4
- package/esm/validators/methods/required-methods.d.mts.map +1 -1
- package/esm/validators/number-validator.d.mts +1 -3
- package/esm/validators/number-validator.d.mts.map +1 -1
- package/esm/validators/number-validator.mjs +12 -8
- package/esm/validators/number-validator.mjs.map +1 -1
- package/esm/validators/numeric-validator.d.mts +1 -3
- package/esm/validators/numeric-validator.d.mts.map +1 -1
- package/esm/validators/object-validator.d.mts +2 -3
- package/esm/validators/object-validator.d.mts.map +1 -1
- package/esm/validators/object-validator.mjs +9 -7
- package/esm/validators/object-validator.mjs.map +1 -1
- package/esm/validators/primitive-validator.d.mts +1 -3
- package/esm/validators/primitive-validator.d.mts.map +1 -1
- package/esm/validators/record-validator.d.mts +2 -3
- package/esm/validators/record-validator.d.mts.map +1 -1
- package/esm/validators/record-validator.mjs +3 -3
- package/esm/validators/record-validator.mjs.map +1 -1
- package/esm/validators/scalar-validator.d.mts +1 -3
- package/esm/validators/scalar-validator.d.mts.map +1 -1
- package/esm/validators/scalar-validator.mjs.map +1 -1
- package/esm/validators/string-validator.d.mts +1 -3
- package/esm/validators/string-validator.d.mts.map +1 -1
- package/esm/validators/tuple-validator.d.mts +2 -3
- package/esm/validators/tuple-validator.d.mts.map +1 -1
- package/esm/validators/tuple-validator.mjs +3 -3
- package/esm/validators/tuple-validator.mjs.map +1 -1
- package/esm/validators/union-validator.d.mts +4 -4
- package/esm/validators/union-validator.d.mts.map +1 -1
- package/esm/validators/union-validator.mjs +3 -1
- package/esm/validators/union-validator.mjs.map +1 -1
- package/llms-full.txt +656 -527
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/skills/bridge-standard-schema/SKILL.md +60 -36
- package/skills/compose-seal-modifiers/SKILL.md +89 -53
- package/skills/define-structural-shape/SKILL.md +41 -27
- package/skills/define-structural-shape/array-methods.md +27 -27
- package/skills/define-structural-shape/object-methods.md +38 -30
- package/skills/extend-seal-with-plugins/SKILL.md +39 -5
- package/skills/generate-json-schema/SKILL.md +13 -13
- package/skills/handle-seal-errors/SKILL.md +23 -23
- package/skills/index.md +4 -1
- package/skills/overview/SKILL.md +10 -2
- package/skills/pick-seal-primitive/SKILL.md +45 -45
- package/skills/pick-seal-primitive/date-methods.md +96 -96
- package/skills/pick-seal-primitive/number-methods.md +55 -55
- package/skills/pick-seal-primitive/string-methods.md +107 -102
- package/skills/seal-basics/SKILL.md +14 -14
- package/cjs/object--LXRt5RF.cjs.map +0 -1
- package/cjs/required-methods-DYsRO9aZ.cjs.map +0 -1
- package/cjs/string-DsqnKoSB.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/common/type-rules.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"type-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/common/type-rules.ts"],"mappings":";;;;;;qBAOa,YAAY;;;;qBAcZ,YAAY;;;;qBAcZ,aAAa;;;;qBAcb,SAAS;;;;qBAcT,WAAW;;;;qBAcX,YAAY;;;;qBAcZ,YAAY;;;;qBAeZ,iBAAiB;;;;qBAejB,WAAW"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { Schema } from "../../types/schema-types.mjs";
|
|
2
2
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
3
|
-
|
|
3
|
+
import "../../types/index.mjs";
|
|
4
4
|
//#region ../../packages/seal/src/rules/common/unknown-key.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Unknown key rule - validates that object doesn't have unknown keys
|
|
7
7
|
*/
|
|
8
|
-
declare const unknownKeyRule: SchemaRule<{
|
|
8
|
+
export declare const unknownKeyRule: SchemaRule<{
|
|
9
9
|
schema: Schema;
|
|
10
10
|
allowedKeys: string[];
|
|
11
11
|
}>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { unknownKeyRule };
|
|
14
13
|
//# sourceMappingURL=unknown-key.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unknown-key.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/common/unknown-key.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"unknown-key.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/common/unknown-key.ts"],"mappings":";;;;;;;qBAMa,gBAAgB;EAC3B,QAAQ;EACR"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
-
|
|
2
|
+
import "../../types/index.mjs";
|
|
3
3
|
//#region ../../packages/seal/src/rules/conditional/forbidden-if-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Forbidden if rule - field is forbidden if another field equals a specific value
|
|
6
6
|
* Supports both global and sibling scope
|
|
7
7
|
*/
|
|
8
|
-
declare const forbiddenIfRule: SchemaRule<{
|
|
8
|
+
export declare const forbiddenIfRule: SchemaRule<{
|
|
9
9
|
field: string;
|
|
10
10
|
value: any;
|
|
11
11
|
scope?: "global" | "sibling";
|
|
@@ -14,7 +14,7 @@ declare const forbiddenIfRule: SchemaRule<{
|
|
|
14
14
|
* Forbidden if not rule - field is forbidden if another field does NOT equal a specific value
|
|
15
15
|
* Supports both global and sibling scope
|
|
16
16
|
*/
|
|
17
|
-
declare const forbiddenIfNotRule: SchemaRule<{
|
|
17
|
+
export declare const forbiddenIfNotRule: SchemaRule<{
|
|
18
18
|
field: string;
|
|
19
19
|
value: any;
|
|
20
20
|
scope?: "global" | "sibling";
|
|
@@ -23,7 +23,7 @@ declare const forbiddenIfNotRule: SchemaRule<{
|
|
|
23
23
|
* Forbidden if empty rule - field is forbidden if another field is empty
|
|
24
24
|
* Supports both global and sibling scope
|
|
25
25
|
*/
|
|
26
|
-
declare const forbiddenIfEmptyRule: SchemaRule<{
|
|
26
|
+
export declare const forbiddenIfEmptyRule: SchemaRule<{
|
|
27
27
|
field: string;
|
|
28
28
|
scope?: "global" | "sibling";
|
|
29
29
|
}>;
|
|
@@ -31,7 +31,7 @@ declare const forbiddenIfEmptyRule: SchemaRule<{
|
|
|
31
31
|
* Forbidden if not empty rule - field is forbidden if another field is not empty
|
|
32
32
|
* Supports both global and sibling scope
|
|
33
33
|
*/
|
|
34
|
-
declare const forbiddenIfNotEmptyRule: SchemaRule<{
|
|
34
|
+
export declare const forbiddenIfNotEmptyRule: SchemaRule<{
|
|
35
35
|
field: string;
|
|
36
36
|
scope?: "global" | "sibling";
|
|
37
37
|
}>;
|
|
@@ -39,7 +39,7 @@ declare const forbiddenIfNotEmptyRule: SchemaRule<{
|
|
|
39
39
|
* Forbidden if in rule - field is forbidden if another field's value is in the given array
|
|
40
40
|
* Supports both global and sibling scope
|
|
41
41
|
*/
|
|
42
|
-
declare const forbiddenIfInRule: SchemaRule<{
|
|
42
|
+
export declare const forbiddenIfInRule: SchemaRule<{
|
|
43
43
|
field: string;
|
|
44
44
|
values: any[];
|
|
45
45
|
scope?: "global" | "sibling";
|
|
@@ -48,11 +48,10 @@ declare const forbiddenIfInRule: SchemaRule<{
|
|
|
48
48
|
* Forbidden if not in rule - field is forbidden if another field's value is NOT in the given array
|
|
49
49
|
* Supports both global and sibling scope
|
|
50
50
|
*/
|
|
51
|
-
declare const forbiddenIfNotInRule: SchemaRule<{
|
|
51
|
+
export declare const forbiddenIfNotInRule: SchemaRule<{
|
|
52
52
|
field: string;
|
|
53
53
|
values: any[];
|
|
54
54
|
scope?: "global" | "sibling";
|
|
55
55
|
}>;
|
|
56
56
|
//#endregion
|
|
57
|
-
export { forbiddenIfEmptyRule, forbiddenIfInRule, forbiddenIfNotEmptyRule, forbiddenIfNotInRule, forbiddenIfNotRule, forbiddenIfRule };
|
|
58
57
|
//# sourceMappingURL=forbidden-if-rules.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forbidden-if-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/forbidden-if-rules.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"forbidden-if-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/forbidden-if-rules.ts"],"mappings":";;;;;;;qBAQa,iBAAiB;EAC5B;EACA;EACA;;;;;;qBAyBW,oBAAoB;EAC/B;EACA;EACA;;;;;;qBAuBW,sBAAsB;EACjC;EACA;;;;;;qBAsBW,yBAAyB;EACpC;EACA;;;;;;qBAsBW,mBAAmB;EAC9B;EACA;EACA;;;;;;qBAyBW,sBAAsB;EACjC;EACA;EACA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { requiredIfAllEmptyRule, requiredIfAllNotEmptyRule, requiredIfAnyEmptyRule, requiredIfAnyNotEmptyRule, requiredIfEmptyRule, requiredIfInRule, requiredIfNotEmptyRule, requiredIfNotInRule, requiredIfRule } from "./required-if-rules.mjs";
|
|
2
|
+
import { requiredUnlessRule } from "./required-unless-rules.mjs";
|
|
3
|
+
import { requiredWhenRule } from "./required-when-rule.mjs";
|
|
4
|
+
import { requiredWithAllRule, requiredWithAnyRule, requiredWithRule } from "./required-with-rules.mjs";
|
|
5
|
+
import { requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule } from "./required-without-rules.mjs";
|
|
6
|
+
import { presentIfEmptyRule, presentIfInRule, presentIfNotEmptyRule, presentIfNotInRule, presentIfRule } from "./present-if-rules.mjs";
|
|
7
|
+
import { presentUnlessRule } from "./present-unless-rules.mjs";
|
|
8
|
+
import { presentWithAllRule, presentWithAnyRule, presentWithRule } from "./present-with-rules.mjs";
|
|
9
|
+
import { presentWithoutAllRule, presentWithoutAnyRule, presentWithoutRule } from "./present-without-rules.mjs";
|
|
10
|
+
import { forbiddenIfEmptyRule, forbiddenIfInRule, forbiddenIfNotEmptyRule, forbiddenIfNotInRule, forbiddenIfNotRule, forbiddenIfRule } from "./forbidden-if-rules.mjs";
|
|
11
|
+
export { forbiddenIfEmptyRule, forbiddenIfInRule, forbiddenIfNotEmptyRule, forbiddenIfNotInRule, forbiddenIfNotRule, forbiddenIfRule, presentIfEmptyRule, presentIfInRule, presentIfNotEmptyRule, presentIfNotInRule, presentIfRule, presentUnlessRule, presentWithAllRule, presentWithAnyRule, presentWithRule, presentWithoutAllRule, presentWithoutAnyRule, presentWithoutRule, requiredIfAllEmptyRule, requiredIfAllNotEmptyRule, requiredIfAnyEmptyRule, requiredIfAnyNotEmptyRule, requiredIfEmptyRule, requiredIfInRule, requiredIfNotEmptyRule, requiredIfNotInRule, requiredIfRule, requiredUnlessRule, requiredWhenRule, requiredWithAllRule, requiredWithAnyRule, requiredWithRule, requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule };
|
|
@@ -9,4 +9,4 @@ import { presentWithAllRule, presentWithAnyRule, presentWithRule } from "./prese
|
|
|
9
9
|
import { presentWithoutAllRule, presentWithoutAnyRule, presentWithoutRule } from "./present-without-rules.mjs";
|
|
10
10
|
import { forbiddenIfEmptyRule, forbiddenIfInRule, forbiddenIfNotEmptyRule, forbiddenIfNotInRule, forbiddenIfNotRule, forbiddenIfRule } from "./forbidden-if-rules.mjs";
|
|
11
11
|
|
|
12
|
-
export {
|
|
12
|
+
export { forbiddenIfEmptyRule, forbiddenIfInRule, forbiddenIfNotEmptyRule, forbiddenIfNotInRule, forbiddenIfNotRule, forbiddenIfRule, presentIfEmptyRule, presentIfInRule, presentIfNotEmptyRule, presentIfNotInRule, presentIfRule, presentUnlessRule, presentWithAllRule, presentWithAnyRule, presentWithRule, presentWithoutAllRule, presentWithoutAnyRule, presentWithoutRule, requiredIfAllEmptyRule, requiredIfAllNotEmptyRule, requiredIfAnyEmptyRule, requiredIfAnyNotEmptyRule, requiredIfEmptyRule, requiredIfInRule, requiredIfNotEmptyRule, requiredIfNotInRule, requiredIfRule, requiredUnlessRule, requiredWhenRule, requiredWithAllRule, requiredWithAnyRule, requiredWithRule, requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
-
|
|
2
|
+
import "../../types/index.mjs";
|
|
3
3
|
//#region ../../packages/seal/src/rules/conditional/present-if-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Present if rule - field must be present if another field equals a specific value
|
|
6
6
|
* Supports both global and sibling scope
|
|
7
7
|
*/
|
|
8
|
-
declare const presentIfRule: SchemaRule<{
|
|
8
|
+
export declare const presentIfRule: SchemaRule<{
|
|
9
9
|
field: string;
|
|
10
10
|
value: any;
|
|
11
11
|
scope?: "global" | "sibling";
|
|
@@ -14,7 +14,7 @@ declare const presentIfRule: SchemaRule<{
|
|
|
14
14
|
* Present if empty rule - field must be present if another field is empty
|
|
15
15
|
* Supports both global and sibling scope
|
|
16
16
|
*/
|
|
17
|
-
declare const presentIfEmptyRule: SchemaRule<{
|
|
17
|
+
export declare const presentIfEmptyRule: SchemaRule<{
|
|
18
18
|
field: string;
|
|
19
19
|
scope?: "global" | "sibling";
|
|
20
20
|
}>;
|
|
@@ -22,7 +22,7 @@ declare const presentIfEmptyRule: SchemaRule<{
|
|
|
22
22
|
* Present if not empty rule - field must be present if another field is not empty
|
|
23
23
|
* Supports both global and sibling scope
|
|
24
24
|
*/
|
|
25
|
-
declare const presentIfNotEmptyRule: SchemaRule<{
|
|
25
|
+
export declare const presentIfNotEmptyRule: SchemaRule<{
|
|
26
26
|
field: string;
|
|
27
27
|
scope?: "global" | "sibling";
|
|
28
28
|
}>;
|
|
@@ -30,7 +30,7 @@ declare const presentIfNotEmptyRule: SchemaRule<{
|
|
|
30
30
|
* Present if in rule - field must be present if another field's value is in the given array
|
|
31
31
|
* Supports both global and sibling scope
|
|
32
32
|
*/
|
|
33
|
-
declare const presentIfInRule: SchemaRule<{
|
|
33
|
+
export declare const presentIfInRule: SchemaRule<{
|
|
34
34
|
field: string;
|
|
35
35
|
values: any[];
|
|
36
36
|
scope?: "global" | "sibling";
|
|
@@ -39,11 +39,10 @@ declare const presentIfInRule: SchemaRule<{
|
|
|
39
39
|
* Present if not in rule - field must be present if another field's value is NOT in the given array
|
|
40
40
|
* Supports both global and sibling scope
|
|
41
41
|
*/
|
|
42
|
-
declare const presentIfNotInRule: SchemaRule<{
|
|
42
|
+
export declare const presentIfNotInRule: SchemaRule<{
|
|
43
43
|
field: string;
|
|
44
44
|
values: any[];
|
|
45
45
|
scope?: "global" | "sibling";
|
|
46
46
|
}>;
|
|
47
47
|
//#endregion
|
|
48
|
-
export { presentIfEmptyRule, presentIfInRule, presentIfNotEmptyRule, presentIfNotInRule, presentIfRule };
|
|
49
48
|
//# sourceMappingURL=present-if-rules.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"present-if-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/present-if-rules.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"present-if-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/present-if-rules.ts"],"mappings":";;;;;;;qBAQa,eAAe;EAC1B;EACA;EACA;;;;;;qBA0BW,oBAAoB;EAC/B;EACA;;;;;;qBAuBW,uBAAuB;EAClC;EACA;;;;;;qBAuBW,iBAAiB;EAC5B;EACA;EACA;;;;;;qBAwBW,oBAAoB;EAC/B;EACA;EACA"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
-
|
|
2
|
+
import "../../types/index.mjs";
|
|
3
3
|
//#region ../../packages/seal/src/rules/conditional/present-unless-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Present unless rule - field must be present unless another field equals a specific value
|
|
6
6
|
* Supports both global and sibling scope
|
|
7
7
|
*/
|
|
8
|
-
declare const presentUnlessRule: SchemaRule<{
|
|
8
|
+
export declare const presentUnlessRule: SchemaRule<{
|
|
9
9
|
field: string;
|
|
10
10
|
value: any;
|
|
11
11
|
scope?: "global" | "sibling";
|
|
12
12
|
}>;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { presentUnlessRule };
|
|
15
14
|
//# sourceMappingURL=present-unless-rules.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"present-unless-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/present-unless-rules.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"present-unless-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/present-unless-rules.ts"],"mappings":";;;;;;;qBAOa,mBAAmB;EAC9B;EACA;EACA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
-
|
|
2
|
+
import "../../types/index.mjs";
|
|
3
3
|
//#region ../../packages/seal/src/rules/conditional/present-with-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Present with rule - field must be present if another field is present
|
|
6
6
|
* Supports both global and sibling scope
|
|
7
7
|
*/
|
|
8
|
-
declare const presentWithRule: SchemaRule<{
|
|
8
|
+
export declare const presentWithRule: SchemaRule<{
|
|
9
9
|
field: string;
|
|
10
10
|
scope?: "global" | "sibling";
|
|
11
11
|
}>;
|
|
@@ -13,7 +13,7 @@ declare const presentWithRule: SchemaRule<{
|
|
|
13
13
|
* Present with all rule - field must be present if all specified fields are present
|
|
14
14
|
* Supports both global and sibling scope
|
|
15
15
|
*/
|
|
16
|
-
declare const presentWithAllRule: SchemaRule<{
|
|
16
|
+
export declare const presentWithAllRule: SchemaRule<{
|
|
17
17
|
fields: string[];
|
|
18
18
|
scope?: "global" | "sibling";
|
|
19
19
|
}>;
|
|
@@ -21,10 +21,9 @@ declare const presentWithAllRule: SchemaRule<{
|
|
|
21
21
|
* Present with any rule - field must be present if any of the specified fields is present
|
|
22
22
|
* Supports both global and sibling scope
|
|
23
23
|
*/
|
|
24
|
-
declare const presentWithAnyRule: SchemaRule<{
|
|
24
|
+
export declare const presentWithAnyRule: SchemaRule<{
|
|
25
25
|
fields: string[];
|
|
26
26
|
scope?: "global" | "sibling";
|
|
27
27
|
}>;
|
|
28
28
|
//#endregion
|
|
29
|
-
export { presentWithAllRule, presentWithAnyRule, presentWithRule };
|
|
30
29
|
//# sourceMappingURL=present-with-rules.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"present-with-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/present-with-rules.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"present-with-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/present-with-rules.ts"],"mappings":";;;;;;;qBAQa,iBAAiB;EAC5B;EACA;;;;;;qBAwBW,oBAAoB;EAC/B;EACA;;;;;;qBA+BW,oBAAoB;EAC/B;EACA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
-
|
|
2
|
+
import "../../types/index.mjs";
|
|
3
3
|
//#region ../../packages/seal/src/rules/conditional/present-without-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Present without rule - field must be present if another field is missing
|
|
6
6
|
* Supports both global and sibling scope
|
|
7
7
|
*/
|
|
8
|
-
declare const presentWithoutRule: SchemaRule<{
|
|
8
|
+
export declare const presentWithoutRule: SchemaRule<{
|
|
9
9
|
field: string;
|
|
10
10
|
scope?: "global" | "sibling";
|
|
11
11
|
}>;
|
|
@@ -13,7 +13,7 @@ declare const presentWithoutRule: SchemaRule<{
|
|
|
13
13
|
* Present without all rule - field must be present if all specified fields are missing
|
|
14
14
|
* Supports both global and sibling scope
|
|
15
15
|
*/
|
|
16
|
-
declare const presentWithoutAllRule: SchemaRule<{
|
|
16
|
+
export declare const presentWithoutAllRule: SchemaRule<{
|
|
17
17
|
fields: string[];
|
|
18
18
|
scope?: "global" | "sibling";
|
|
19
19
|
}>;
|
|
@@ -21,10 +21,9 @@ declare const presentWithoutAllRule: SchemaRule<{
|
|
|
21
21
|
* Present without any rule - field must be present if any of the specified fields is missing
|
|
22
22
|
* Supports both global and sibling scope
|
|
23
23
|
*/
|
|
24
|
-
declare const presentWithoutAnyRule: SchemaRule<{
|
|
24
|
+
export declare const presentWithoutAnyRule: SchemaRule<{
|
|
25
25
|
fields: string[];
|
|
26
26
|
scope?: "global" | "sibling";
|
|
27
27
|
}>;
|
|
28
28
|
//#endregion
|
|
29
|
-
export { presentWithoutAllRule, presentWithoutAnyRule, presentWithoutRule };
|
|
30
29
|
//# sourceMappingURL=present-without-rules.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"present-without-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/present-without-rules.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"present-without-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/present-without-rules.ts"],"mappings":";;;;;;;qBAQa,oBAAoB;EAC/B;EACA;;;;;;qBAwBW,uBAAuB;EAClC;EACA;;;;;;qBA+BW,uBAAuB;EAClC;EACA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
-
|
|
2
|
+
import "../../types/index.mjs";
|
|
3
3
|
//#region ../../packages/seal/src/rules/conditional/required-if-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Required if rule - field is required if another field equals a specific value
|
|
6
6
|
* Supports both global and sibling scope
|
|
7
7
|
*/
|
|
8
|
-
declare const requiredIfRule: SchemaRule<{
|
|
8
|
+
export declare const requiredIfRule: SchemaRule<{
|
|
9
9
|
field: string;
|
|
10
10
|
value: any;
|
|
11
11
|
scope?: "global" | "sibling";
|
|
@@ -14,7 +14,7 @@ declare const requiredIfRule: SchemaRule<{
|
|
|
14
14
|
* Required if empty rule - field is required if another field is empty
|
|
15
15
|
* Supports both global and sibling scope
|
|
16
16
|
*/
|
|
17
|
-
declare const requiredIfEmptyRule: SchemaRule<{
|
|
17
|
+
export declare const requiredIfEmptyRule: SchemaRule<{
|
|
18
18
|
field: string;
|
|
19
19
|
scope?: "global" | "sibling";
|
|
20
20
|
}>;
|
|
@@ -22,7 +22,7 @@ declare const requiredIfEmptyRule: SchemaRule<{
|
|
|
22
22
|
* Required if not empty rule - field is required if another field is not empty
|
|
23
23
|
* Supports both global and sibling scope
|
|
24
24
|
*/
|
|
25
|
-
declare const requiredIfNotEmptyRule: SchemaRule<{
|
|
25
|
+
export declare const requiredIfNotEmptyRule: SchemaRule<{
|
|
26
26
|
field: string;
|
|
27
27
|
scope?: "global" | "sibling";
|
|
28
28
|
}>;
|
|
@@ -30,7 +30,7 @@ declare const requiredIfNotEmptyRule: SchemaRule<{
|
|
|
30
30
|
* Required if in rule - field is required if another field's value is in the given array
|
|
31
31
|
* Supports both global and sibling scope
|
|
32
32
|
*/
|
|
33
|
-
declare const requiredIfInRule: SchemaRule<{
|
|
33
|
+
export declare const requiredIfInRule: SchemaRule<{
|
|
34
34
|
field: string;
|
|
35
35
|
values: any[];
|
|
36
36
|
scope?: "global" | "sibling";
|
|
@@ -39,7 +39,7 @@ declare const requiredIfInRule: SchemaRule<{
|
|
|
39
39
|
* Required if not in rule - field is required if another field's value is NOT in the given array
|
|
40
40
|
* Supports both global and sibling scope
|
|
41
41
|
*/
|
|
42
|
-
declare const requiredIfNotInRule: SchemaRule<{
|
|
42
|
+
export declare const requiredIfNotInRule: SchemaRule<{
|
|
43
43
|
field: string;
|
|
44
44
|
values: any[];
|
|
45
45
|
scope?: "global" | "sibling";
|
|
@@ -48,7 +48,7 @@ declare const requiredIfNotInRule: SchemaRule<{
|
|
|
48
48
|
* Required if all empty rule - field is required if ALL specified fields are empty
|
|
49
49
|
* Supports both global and sibling scope
|
|
50
50
|
*/
|
|
51
|
-
declare const requiredIfAllEmptyRule: SchemaRule<{
|
|
51
|
+
export declare const requiredIfAllEmptyRule: SchemaRule<{
|
|
52
52
|
fields: string[];
|
|
53
53
|
scope?: "global" | "sibling";
|
|
54
54
|
}>;
|
|
@@ -56,7 +56,7 @@ declare const requiredIfAllEmptyRule: SchemaRule<{
|
|
|
56
56
|
* Required if any empty rule - field is required if ANY of the specified fields is empty
|
|
57
57
|
* Supports both global and sibling scope
|
|
58
58
|
*/
|
|
59
|
-
declare const requiredIfAnyEmptyRule: SchemaRule<{
|
|
59
|
+
export declare const requiredIfAnyEmptyRule: SchemaRule<{
|
|
60
60
|
fields: string[];
|
|
61
61
|
scope?: "global" | "sibling";
|
|
62
62
|
}>;
|
|
@@ -64,7 +64,7 @@ declare const requiredIfAnyEmptyRule: SchemaRule<{
|
|
|
64
64
|
* Required if all not empty rule - field is required if ALL specified fields are NOT empty
|
|
65
65
|
* Supports both global and sibling scope
|
|
66
66
|
*/
|
|
67
|
-
declare const requiredIfAllNotEmptyRule: SchemaRule<{
|
|
67
|
+
export declare const requiredIfAllNotEmptyRule: SchemaRule<{
|
|
68
68
|
fields: string[];
|
|
69
69
|
scope?: "global" | "sibling";
|
|
70
70
|
}>;
|
|
@@ -72,10 +72,9 @@ declare const requiredIfAllNotEmptyRule: SchemaRule<{
|
|
|
72
72
|
* Required if any not empty rule - field is required if ANY of the specified fields is NOT empty
|
|
73
73
|
* Supports both global and sibling scope
|
|
74
74
|
*/
|
|
75
|
-
declare const requiredIfAnyNotEmptyRule: SchemaRule<{
|
|
75
|
+
export declare const requiredIfAnyNotEmptyRule: SchemaRule<{
|
|
76
76
|
fields: string[];
|
|
77
77
|
scope?: "global" | "sibling";
|
|
78
78
|
}>;
|
|
79
79
|
//#endregion
|
|
80
|
-
export { requiredIfAllEmptyRule, requiredIfAllNotEmptyRule, requiredIfAnyEmptyRule, requiredIfAnyNotEmptyRule, requiredIfEmptyRule, requiredIfInRule, requiredIfNotEmptyRule, requiredIfNotInRule, requiredIfRule };
|
|
81
80
|
//# sourceMappingURL=required-if-rules.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"required-if-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-if-rules.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"required-if-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-if-rules.ts"],"mappings":";;;;;;;qBASa,gBAAgB;EAC3B;EACA;EACA;;;;;;qBAyBW,qBAAqB;EAChC;EACA;;;;;;qBAwBW,wBAAwB;EACnC;EACA;;;;;;qBAwBW,kBAAkB;EAC7B;EACA;EACA;;;;;;qBA0BW,qBAAqB;EAChC;EACA;EACA;;;;;;qBAsCW,wBAAwB;EACnC;EACA;;;;;;qBA2BW,wBAAwB;EACnC;EACA;;;;;;qBA2BW,2BAA2B;EACtC;EACA;;;;;;qBA2BW,2BAA2B;EACtC;EACA"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
-
|
|
2
|
+
import "../../types/index.mjs";
|
|
3
3
|
//#region ../../packages/seal/src/rules/conditional/required-unless-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Required unless rule - field is required unless another field equals a specific value
|
|
6
6
|
* Supports both global and sibling scope
|
|
7
7
|
*/
|
|
8
|
-
declare const requiredUnlessRule: SchemaRule<{
|
|
8
|
+
export declare const requiredUnlessRule: SchemaRule<{
|
|
9
9
|
field: string;
|
|
10
10
|
value: any;
|
|
11
11
|
scope?: "global" | "sibling";
|
|
12
12
|
}>;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { requiredUnlessRule };
|
|
15
14
|
//# sourceMappingURL=required-unless-rules.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"required-unless-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-unless-rules.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"required-unless-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-unless-rules.ts"],"mappings":";;;;;;;qBAQa,oBAAoB;EAC/B;EACA;EACA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
import { SchemaContext } from "../../types/context-types.mjs";
|
|
3
|
-
|
|
3
|
+
import "../../types/index.mjs";
|
|
4
4
|
//#region ../../packages/seal/src/rules/conditional/required-when-rule.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Required when callback returns true.
|
|
@@ -15,9 +15,8 @@ import { SchemaContext } from "../../types/context-types.mjs";
|
|
|
15
15
|
* })
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
declare const requiredWhenRule: SchemaRule<{
|
|
18
|
+
export declare const requiredWhenRule: SchemaRule<{
|
|
19
19
|
callback: (context: SchemaContext) => boolean | Promise<boolean>;
|
|
20
20
|
}>;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { requiredWhenRule };
|
|
23
22
|
//# sourceMappingURL=required-when-rule.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"required-when-rule.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-when-rule.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"required-when-rule.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-when-rule.ts"],"mappings":";;;;;;;;;;;;;;;;;qBAiBa,kBAAkB;EAC7B,WAAW,SAAS,4BAA4B"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
-
|
|
2
|
+
import "../../types/index.mjs";
|
|
3
3
|
//#region ../../packages/seal/src/rules/conditional/required-with-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Required with rule - field is required if another field is present
|
|
6
6
|
* Supports both global and sibling scope
|
|
7
7
|
*/
|
|
8
|
-
declare const requiredWithRule: SchemaRule<{
|
|
8
|
+
export declare const requiredWithRule: SchemaRule<{
|
|
9
9
|
field: string;
|
|
10
10
|
scope?: "global" | "sibling";
|
|
11
11
|
}>;
|
|
@@ -13,7 +13,7 @@ declare const requiredWithRule: SchemaRule<{
|
|
|
13
13
|
* Required with all rule - field is required if all specified fields are present
|
|
14
14
|
* Supports both global and sibling scope
|
|
15
15
|
*/
|
|
16
|
-
declare const requiredWithAllRule: SchemaRule<{
|
|
16
|
+
export declare const requiredWithAllRule: SchemaRule<{
|
|
17
17
|
fields: string[];
|
|
18
18
|
scope?: "global" | "sibling";
|
|
19
19
|
}>;
|
|
@@ -21,10 +21,9 @@ declare const requiredWithAllRule: SchemaRule<{
|
|
|
21
21
|
* Required with any rule - field is required if any of the specified fields is present
|
|
22
22
|
* Supports both global and sibling scope
|
|
23
23
|
*/
|
|
24
|
-
declare const requiredWithAnyRule: SchemaRule<{
|
|
24
|
+
export declare const requiredWithAnyRule: SchemaRule<{
|
|
25
25
|
fields: string[];
|
|
26
26
|
scope?: "global" | "sibling";
|
|
27
27
|
}>;
|
|
28
28
|
//#endregion
|
|
29
|
-
export { requiredWithAllRule, requiredWithAnyRule, requiredWithRule };
|
|
30
29
|
//# sourceMappingURL=required-with-rules.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"required-with-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-with-rules.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"required-with-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-with-rules.ts"],"mappings":";;;;;;;qBASa,kBAAkB;EAC7B;EACA;;;;;;qBAwBW,qBAAqB;EAChC;EACA;;;;;;qBA2BW,qBAAqB;EAChC;EACA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
-
|
|
2
|
+
import "../../types/index.mjs";
|
|
3
3
|
//#region ../../packages/seal/src/rules/conditional/required-without-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Required without rule - field is required if another field is missing
|
|
6
6
|
* Supports both global and sibling scope
|
|
7
7
|
*/
|
|
8
|
-
declare const requiredWithoutRule: SchemaRule<{
|
|
8
|
+
export declare const requiredWithoutRule: SchemaRule<{
|
|
9
9
|
field: string;
|
|
10
10
|
scope?: "global" | "sibling";
|
|
11
11
|
}>;
|
|
@@ -13,7 +13,7 @@ declare const requiredWithoutRule: SchemaRule<{
|
|
|
13
13
|
* Required without all rule - field is required if all specified fields are missing
|
|
14
14
|
* Supports both global and sibling scope
|
|
15
15
|
*/
|
|
16
|
-
declare const requiredWithoutAllRule: SchemaRule<{
|
|
16
|
+
export declare const requiredWithoutAllRule: SchemaRule<{
|
|
17
17
|
fields: string[];
|
|
18
18
|
scope?: "global" | "sibling";
|
|
19
19
|
}>;
|
|
@@ -21,10 +21,9 @@ declare const requiredWithoutAllRule: SchemaRule<{
|
|
|
21
21
|
* Required without any rule - field is required if any of the specified fields is missing
|
|
22
22
|
* Supports both global and sibling scope
|
|
23
23
|
*/
|
|
24
|
-
declare const requiredWithoutAnyRule: SchemaRule<{
|
|
24
|
+
export declare const requiredWithoutAnyRule: SchemaRule<{
|
|
25
25
|
fields: string[];
|
|
26
26
|
scope?: "global" | "sibling";
|
|
27
27
|
}>;
|
|
28
28
|
//#endregion
|
|
29
|
-
export { requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule };
|
|
30
29
|
//# sourceMappingURL=required-without-rules.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"required-without-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-without-rules.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"required-without-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-without-rules.ts"],"mappings":";;;;;;;qBASa,qBAAqB;EAChC;EACA;;;;;;qBAwBW,wBAAwB;EACnC;EACA;;;;;;qBA2BW,wBAAwB;EACnC;EACA"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
-
|
|
2
|
+
import "../../types/index.mjs";
|
|
3
3
|
//#region ../../packages/seal/src/rules/core/equal.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Equal rule - value must be equal to a specific value
|
|
6
6
|
*/
|
|
7
|
-
declare const equalRule: SchemaRule<{
|
|
7
|
+
export declare const equalRule: SchemaRule<{
|
|
8
8
|
value: any;
|
|
9
9
|
}>;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { equalRule };
|
|
12
11
|
//# sourceMappingURL=equal.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equal.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/equal.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"equal.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/equal.ts"],"mappings":";;;;;;qBAMa,WAAW;EAAa"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
-
|
|
2
|
+
import "../../types/index.mjs";
|
|
3
3
|
//#region ../../packages/seal/src/rules/core/forbidden.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Forbidden rule - value must not be present
|
|
6
6
|
*/
|
|
7
|
-
declare const forbiddenRule: SchemaRule;
|
|
7
|
+
export declare const forbiddenRule: SchemaRule;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { forbiddenRule };
|
|
10
9
|
//# sourceMappingURL=forbidden.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forbidden.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/forbidden.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"forbidden.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/forbidden.ts"],"mappings":";;;;;;qBAOa,eAAe"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { equalRule } from "./equal.mjs";
|
|
2
|
+
import { forbiddenRule } from "./forbidden.mjs";
|
|
3
|
+
import { presentRule, requiredRule } from "./required.mjs";
|
|
4
|
+
import { unionRule } from "./union.mjs";
|
|
5
|
+
import { whenRule } from "./when.mjs";
|
|
6
|
+
export { equalRule, forbiddenRule, presentRule, requiredRule, unionRule, whenRule };
|
package/esm/rules/core/index.mjs
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
-
|
|
2
|
+
import "../../types/index.mjs";
|
|
3
3
|
//#region ../../packages/seal/src/rules/core/required.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Required rule - value must be present and not empty
|
|
6
6
|
*/
|
|
7
|
-
declare const requiredRule: SchemaRule;
|
|
7
|
+
export declare const requiredRule: SchemaRule;
|
|
8
8
|
/**
|
|
9
9
|
* Present rule - key must exist in the data, but value can be anything
|
|
10
10
|
* (empty string, null are all valid as long as the key exists)
|
|
11
11
|
*/
|
|
12
|
-
declare const presentRule: SchemaRule;
|
|
12
|
+
export declare const presentRule: SchemaRule;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { presentRule, requiredRule };
|
|
15
14
|
//# sourceMappingURL=required.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"required.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/required.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"required.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/required.ts"],"mappings":";;;;;;qBAOa,cAAc;;;;;qBAiBd,aAAa"}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
+
import "../../types/index.mjs";
|
|
2
3
|
import { BaseValidator } from "../../validators/base-validator.mjs";
|
|
3
|
-
|
|
4
4
|
//#region ../../packages/seal/src/rules/core/union.d.ts
|
|
5
5
|
/**
|
|
6
|
-
* Union rule - value must match at least one of the provided validators
|
|
6
|
+
* Union rule - value must match at least one of the provided validators.
|
|
7
|
+
*
|
|
8
|
+
* Every member whose type matches the value is tried, in order, until one
|
|
9
|
+
* passes. When none passes, the errors of the closest failed member (see
|
|
10
|
+
* `isCloser`) are reported at their own paths with the `union` type: its
|
|
11
|
+
* first error under `firstErrorOnly` (the default), all of them otherwise.
|
|
12
|
+
* A custom union error message replaces them with a single error, as does the
|
|
13
|
+
* default message when no member matches the value's type.
|
|
7
14
|
*/
|
|
8
|
-
declare const unionRule: SchemaRule<{
|
|
15
|
+
export declare const unionRule: SchemaRule<{
|
|
9
16
|
validators: BaseValidator[];
|
|
10
17
|
}>;
|
|
11
18
|
//#endregion
|
|
12
|
-
export { unionRule };
|
|
13
19
|
//# sourceMappingURL=union.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/union.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"union.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/union.ts"],"mappings":";;;;;;;;;;;;;;qBAyDa,WAAW;EAAa,YAAY"}
|