bguard 0.4.1 → 0.6.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/README.md +91 -9
- package/lib/InferType.d.mts +1 -1
- package/lib/InferType.d.ts +1 -1
- package/lib/asserts/array/index.d.mts +7 -2
- package/lib/asserts/array/index.d.ts +7 -2
- package/lib/asserts/array/index.js +6 -12
- package/lib/asserts/array/index.js.map +1 -1
- package/lib/asserts/array/index.mjs +6 -12
- package/lib/asserts/array/index.mjs.map +1 -1
- package/lib/asserts/array/maxArrayLength.d.mts +4 -1
- package/lib/asserts/array/maxArrayLength.d.ts +4 -1
- package/lib/asserts/array/maxArrayLength.js +4 -15
- package/lib/asserts/array/maxArrayLength.js.map +1 -1
- package/lib/asserts/array/maxArrayLength.mjs +4 -15
- package/lib/asserts/array/maxArrayLength.mjs.map +1 -1
- package/lib/asserts/array/minArrayLength.d.mts +4 -1
- package/lib/asserts/array/minArrayLength.d.ts +4 -1
- package/lib/asserts/array/minArrayLength.js +4 -15
- package/lib/asserts/array/minArrayLength.js.map +1 -1
- package/lib/asserts/array/minArrayLength.mjs +4 -15
- package/lib/asserts/array/minArrayLength.mjs.map +1 -1
- package/lib/asserts/bigint/bigintMax.d.mts +4 -1
- package/lib/asserts/bigint/bigintMax.d.ts +4 -1
- package/lib/asserts/bigint/bigintMax.js +4 -15
- package/lib/asserts/bigint/bigintMax.js.map +1 -1
- package/lib/asserts/bigint/bigintMax.mjs +4 -15
- package/lib/asserts/bigint/bigintMax.mjs.map +1 -1
- package/lib/asserts/bigint/bigintMaxExcluded.d.mts +4 -1
- package/lib/asserts/bigint/bigintMaxExcluded.d.ts +4 -1
- package/lib/asserts/bigint/bigintMaxExcluded.js +4 -15
- package/lib/asserts/bigint/bigintMaxExcluded.js.map +1 -1
- package/lib/asserts/bigint/bigintMaxExcluded.mjs +4 -15
- package/lib/asserts/bigint/bigintMaxExcluded.mjs.map +1 -1
- package/lib/asserts/bigint/bigintMin.d.mts +4 -1
- package/lib/asserts/bigint/bigintMin.d.ts +4 -1
- package/lib/asserts/bigint/bigintMin.js +4 -15
- package/lib/asserts/bigint/bigintMin.js.map +1 -1
- package/lib/asserts/bigint/bigintMin.mjs +4 -15
- package/lib/asserts/bigint/bigintMin.mjs.map +1 -1
- package/lib/asserts/bigint/bigintMinExcluded.d.mts +4 -1
- package/lib/asserts/bigint/bigintMinExcluded.d.ts +4 -1
- package/lib/asserts/bigint/bigintMinExcluded.js +4 -15
- package/lib/asserts/bigint/bigintMinExcluded.js.map +1 -1
- package/lib/asserts/bigint/bigintMinExcluded.mjs +4 -15
- package/lib/asserts/bigint/bigintMinExcluded.mjs.map +1 -1
- package/lib/asserts/bigint/index.d.mts +30 -3
- package/lib/asserts/bigint/index.d.ts +30 -3
- package/lib/asserts/bigint/index.js +9 -16
- package/lib/asserts/bigint/index.js.map +1 -1
- package/lib/asserts/bigint/index.mjs +9 -16
- package/lib/asserts/bigint/index.mjs.map +1 -1
- package/lib/asserts/boolean/index.d.mts +25 -2
- package/lib/asserts/boolean/index.d.ts +25 -2
- package/lib/asserts/boolean/index.js +7 -13
- package/lib/asserts/boolean/index.js.map +1 -1
- package/lib/asserts/boolean/index.mjs +7 -13
- package/lib/asserts/boolean/index.mjs.map +1 -1
- package/lib/asserts/date/dateMax.d.mts +4 -1
- package/lib/asserts/date/dateMax.d.ts +4 -1
- package/lib/asserts/date/dateMax.js +5 -23
- package/lib/asserts/date/dateMax.js.map +1 -1
- package/lib/asserts/date/dateMax.mjs +5 -23
- package/lib/asserts/date/dateMax.mjs.map +1 -1
- package/lib/asserts/date/dateMin.d.mts +4 -1
- package/lib/asserts/date/dateMin.d.ts +4 -1
- package/lib/asserts/date/dateMin.js +5 -23
- package/lib/asserts/date/dateMin.js.map +1 -1
- package/lib/asserts/date/dateMin.mjs +5 -23
- package/lib/asserts/date/dateMin.mjs.map +1 -1
- package/lib/asserts/date/index.d.mts +6 -2
- package/lib/asserts/date/index.d.ts +6 -2
- package/lib/asserts/date/index.js +6 -12
- package/lib/asserts/date/index.js.map +1 -1
- package/lib/asserts/date/index.mjs +6 -12
- package/lib/asserts/date/index.mjs.map +1 -1
- package/lib/asserts/mix/equalTo.d.mts +4 -1
- package/lib/asserts/mix/equalTo.d.ts +4 -1
- package/lib/asserts/mix/equalTo.js +4 -4
- package/lib/asserts/mix/equalTo.mjs +3 -3
- package/lib/asserts/mix/index.d.mts +3 -3
- package/lib/asserts/mix/index.d.ts +3 -3
- package/lib/asserts/mix/index.js +6 -11
- package/lib/asserts/mix/index.js.map +1 -1
- package/lib/asserts/mix/index.mjs +6 -11
- package/lib/asserts/mix/index.mjs.map +1 -1
- package/lib/asserts/mix/oneOfValues.d.mts +4 -1
- package/lib/asserts/mix/oneOfValues.d.ts +4 -1
- package/lib/asserts/mix/oneOfValues.js +4 -4
- package/lib/asserts/mix/oneOfValues.mjs +3 -3
- package/lib/asserts/number/index.d.mts +28 -2
- package/lib/asserts/number/index.d.ts +28 -2
- package/lib/asserts/number/index.js +9 -16
- package/lib/asserts/number/index.js.map +1 -1
- package/lib/asserts/number/index.mjs +9 -16
- package/lib/asserts/number/index.mjs.map +1 -1
- package/lib/asserts/number/max.d.mts +4 -1
- package/lib/asserts/number/max.d.ts +4 -1
- package/lib/asserts/number/max.js +4 -15
- package/lib/asserts/number/max.js.map +1 -1
- package/lib/asserts/number/max.mjs +4 -15
- package/lib/asserts/number/max.mjs.map +1 -1
- package/lib/asserts/number/maxExcluded.d.mts +4 -1
- package/lib/asserts/number/maxExcluded.d.ts +4 -1
- package/lib/asserts/number/maxExcluded.js +4 -15
- package/lib/asserts/number/maxExcluded.js.map +1 -1
- package/lib/asserts/number/maxExcluded.mjs +4 -15
- package/lib/asserts/number/maxExcluded.mjs.map +1 -1
- package/lib/asserts/number/min.d.mts +4 -1
- package/lib/asserts/number/min.d.ts +4 -1
- package/lib/asserts/number/min.js +4 -15
- package/lib/asserts/number/min.js.map +1 -1
- package/lib/asserts/number/min.mjs +4 -15
- package/lib/asserts/number/min.mjs.map +1 -1
- package/lib/asserts/number/minExcluded.d.mts +4 -1
- package/lib/asserts/number/minExcluded.d.ts +4 -1
- package/lib/asserts/number/minExcluded.js +4 -15
- package/lib/asserts/number/minExcluded.js.map +1 -1
- package/lib/asserts/number/minExcluded.mjs +4 -15
- package/lib/asserts/number/minExcluded.mjs.map +1 -1
- package/lib/asserts/number/negative.d.mts +4 -1
- package/lib/asserts/number/negative.d.ts +4 -1
- package/lib/asserts/number/negative.js +4 -15
- package/lib/asserts/number/negative.js.map +1 -1
- package/lib/asserts/number/negative.mjs +4 -15
- package/lib/asserts/number/negative.mjs.map +1 -1
- package/lib/asserts/number/positive.d.mts +4 -1
- package/lib/asserts/number/positive.d.ts +4 -1
- package/lib/asserts/number/positive.js +4 -15
- package/lib/asserts/number/positive.js.map +1 -1
- package/lib/asserts/number/positive.mjs +4 -15
- package/lib/asserts/number/positive.mjs.map +1 -1
- package/lib/asserts/object/index.d.mts +26 -2
- package/lib/asserts/object/index.d.ts +26 -2
- package/lib/asserts/object/index.js +6 -12
- package/lib/asserts/object/index.js.map +1 -1
- package/lib/asserts/object/index.mjs +6 -12
- package/lib/asserts/object/index.mjs.map +1 -1
- package/lib/asserts/object/maxKeys.d.mts +4 -1
- package/lib/asserts/object/maxKeys.d.ts +4 -1
- package/lib/asserts/object/maxKeys.js +4 -18
- package/lib/asserts/object/maxKeys.js.map +1 -1
- package/lib/asserts/object/maxKeys.mjs +4 -18
- package/lib/asserts/object/maxKeys.mjs.map +1 -1
- package/lib/asserts/string/atLeastOneDigit.d.mts +4 -1
- package/lib/asserts/string/atLeastOneDigit.d.ts +4 -1
- package/lib/asserts/string/atLeastOneDigit.js +4 -16
- package/lib/asserts/string/atLeastOneDigit.js.map +1 -1
- package/lib/asserts/string/atLeastOneDigit.mjs +4 -16
- package/lib/asserts/string/atLeastOneDigit.mjs.map +1 -1
- package/lib/asserts/string/atLeastOneLowerChar.d.mts +4 -1
- package/lib/asserts/string/atLeastOneLowerChar.d.ts +4 -1
- package/lib/asserts/string/atLeastOneLowerChar.js +4 -17
- package/lib/asserts/string/atLeastOneLowerChar.js.map +1 -1
- package/lib/asserts/string/atLeastOneLowerChar.mjs +4 -17
- package/lib/asserts/string/atLeastOneLowerChar.mjs.map +1 -1
- package/lib/asserts/string/atLeastOneSpecialChar.d.mts +5 -2
- package/lib/asserts/string/atLeastOneSpecialChar.d.ts +5 -2
- package/lib/asserts/string/atLeastOneSpecialChar.js +5 -22
- package/lib/asserts/string/atLeastOneSpecialChar.js.map +1 -1
- package/lib/asserts/string/atLeastOneSpecialChar.mjs +4 -21
- package/lib/asserts/string/atLeastOneSpecialChar.mjs.map +1 -1
- package/lib/asserts/string/atLeastOneUpperChar.d.mts +4 -1
- package/lib/asserts/string/atLeastOneUpperChar.d.ts +4 -1
- package/lib/asserts/string/atLeastOneUpperChar.js +4 -17
- package/lib/asserts/string/atLeastOneUpperChar.js.map +1 -1
- package/lib/asserts/string/atLeastOneUpperChar.mjs +4 -17
- package/lib/asserts/string/atLeastOneUpperChar.mjs.map +1 -1
- package/lib/asserts/string/contains.d.mts +4 -1
- package/lib/asserts/string/contains.d.ts +4 -1
- package/lib/asserts/string/contains.js +4 -17
- package/lib/asserts/string/contains.js.map +1 -1
- package/lib/asserts/string/contains.mjs +4 -17
- package/lib/asserts/string/contains.mjs.map +1 -1
- package/lib/asserts/string/email.d.mts +4 -1
- package/lib/asserts/string/email.d.ts +4 -1
- package/lib/asserts/string/email.js +4 -16
- package/lib/asserts/string/email.js.map +1 -1
- package/lib/asserts/string/email.mjs +4 -16
- package/lib/asserts/string/email.mjs.map +1 -1
- package/lib/asserts/string/endsWith.d.mts +4 -1
- package/lib/asserts/string/endsWith.d.ts +4 -1
- package/lib/asserts/string/endsWith.js +4 -17
- package/lib/asserts/string/endsWith.js.map +1 -1
- package/lib/asserts/string/endsWith.mjs +4 -17
- package/lib/asserts/string/endsWith.mjs.map +1 -1
- package/lib/asserts/string/index.d.mts +29 -2
- package/lib/asserts/string/index.d.ts +29 -2
- package/lib/asserts/string/index.js +9 -16
- package/lib/asserts/string/index.js.map +1 -1
- package/lib/asserts/string/index.mjs +9 -16
- package/lib/asserts/string/index.mjs.map +1 -1
- package/lib/asserts/string/isValidDate.d.mts +4 -1
- package/lib/asserts/string/isValidDate.d.ts +4 -1
- package/lib/asserts/string/isValidDate.js +4 -20
- package/lib/asserts/string/isValidDate.js.map +1 -1
- package/lib/asserts/string/isValidDate.mjs +4 -20
- package/lib/asserts/string/isValidDate.mjs.map +1 -1
- package/lib/asserts/string/isValidDateTime.d.mts +4 -1
- package/lib/asserts/string/isValidDateTime.d.ts +4 -1
- package/lib/asserts/string/isValidDateTime.js +4 -27
- package/lib/asserts/string/isValidDateTime.js.map +1 -1
- package/lib/asserts/string/isValidDateTime.mjs +4 -27
- package/lib/asserts/string/isValidDateTime.mjs.map +1 -1
- package/lib/asserts/string/isValidTime.d.mts +4 -1
- package/lib/asserts/string/isValidTime.d.ts +4 -1
- package/lib/asserts/string/isValidTime.js +4 -27
- package/lib/asserts/string/isValidTime.js.map +1 -1
- package/lib/asserts/string/isValidTime.mjs +4 -27
- package/lib/asserts/string/isValidTime.mjs.map +1 -1
- package/lib/asserts/string/lowerCase.d.mts +4 -1
- package/lib/asserts/string/lowerCase.d.ts +4 -1
- package/lib/asserts/string/lowerCase.js +4 -15
- package/lib/asserts/string/lowerCase.js.map +1 -1
- package/lib/asserts/string/lowerCase.mjs +4 -15
- package/lib/asserts/string/lowerCase.mjs.map +1 -1
- package/lib/asserts/string/maxLength.d.mts +4 -1
- package/lib/asserts/string/maxLength.d.ts +4 -1
- package/lib/asserts/string/maxLength.js +4 -15
- package/lib/asserts/string/maxLength.js.map +1 -1
- package/lib/asserts/string/maxLength.mjs +4 -15
- package/lib/asserts/string/maxLength.mjs.map +1 -1
- package/lib/asserts/string/minLength.d.mts +4 -1
- package/lib/asserts/string/minLength.d.ts +4 -1
- package/lib/asserts/string/minLength.js +4 -15
- package/lib/asserts/string/minLength.js.map +1 -1
- package/lib/asserts/string/minLength.mjs +4 -15
- package/lib/asserts/string/minLength.mjs.map +1 -1
- package/lib/asserts/string/regExp.d.mts +4 -1
- package/lib/asserts/string/regExp.d.ts +4 -1
- package/lib/asserts/string/regExp.js +4 -15
- package/lib/asserts/string/regExp.js.map +1 -1
- package/lib/asserts/string/regExp.mjs +4 -15
- package/lib/asserts/string/regExp.mjs.map +1 -1
- package/lib/asserts/string/startsWith.d.mts +4 -1
- package/lib/asserts/string/startsWith.d.ts +4 -1
- package/lib/asserts/string/startsWith.js +4 -17
- package/lib/asserts/string/startsWith.js.map +1 -1
- package/lib/asserts/string/startsWith.mjs +4 -17
- package/lib/asserts/string/startsWith.mjs.map +1 -1
- package/lib/asserts/string/upperCase.d.mts +4 -1
- package/lib/asserts/string/upperCase.d.ts +4 -1
- package/lib/asserts/string/upperCase.js +4 -17
- package/lib/asserts/string/upperCase.js.map +1 -1
- package/lib/asserts/string/upperCase.mjs +4 -17
- package/lib/asserts/string/upperCase.mjs.map +1 -1
- package/lib/asserts/string/uuid.d.mts +4 -1
- package/lib/asserts/string/uuid.d.ts +4 -1
- package/lib/asserts/string/uuid.js +4 -18
- package/lib/asserts/string/uuid.js.map +1 -1
- package/lib/asserts/string/uuid.mjs +4 -18
- package/lib/asserts/string/uuid.mjs.map +1 -1
- package/lib/asserts/string/uuidV1.d.mts +4 -1
- package/lib/asserts/string/uuidV1.d.ts +4 -1
- package/lib/asserts/string/uuidV1.js +4 -18
- package/lib/asserts/string/uuidV1.js.map +1 -1
- package/lib/asserts/string/uuidV1.mjs +4 -18
- package/lib/asserts/string/uuidV1.mjs.map +1 -1
- package/lib/asserts/string/uuidV2.d.mts +4 -1
- package/lib/asserts/string/uuidV2.d.ts +4 -1
- package/lib/asserts/string/uuidV2.js +4 -18
- package/lib/asserts/string/uuidV2.js.map +1 -1
- package/lib/asserts/string/uuidV2.mjs +4 -18
- package/lib/asserts/string/uuidV2.mjs.map +1 -1
- package/lib/asserts/string/uuidV3.d.mts +4 -1
- package/lib/asserts/string/uuidV3.d.ts +4 -1
- package/lib/asserts/string/uuidV3.js +4 -18
- package/lib/asserts/string/uuidV3.js.map +1 -1
- package/lib/asserts/string/uuidV3.mjs +4 -18
- package/lib/asserts/string/uuidV3.mjs.map +1 -1
- package/lib/asserts/string/uuidV4.d.mts +4 -1
- package/lib/asserts/string/uuidV4.d.ts +4 -1
- package/lib/asserts/string/uuidV4.js +4 -18
- package/lib/asserts/string/uuidV4.js.map +1 -1
- package/lib/asserts/string/uuidV4.mjs +4 -18
- package/lib/asserts/string/uuidV4.mjs.map +1 -1
- package/lib/asserts/string/uuidV5.d.mts +4 -1
- package/lib/asserts/string/uuidV5.d.ts +4 -1
- package/lib/asserts/string/uuidV5.js +4 -18
- package/lib/asserts/string/uuidV5.js.map +1 -1
- package/lib/asserts/string/uuidV5.mjs +4 -18
- package/lib/asserts/string/uuidV5.mjs.map +1 -1
- package/lib/asserts/string/validUrl.d.mts +4 -1
- package/lib/asserts/string/validUrl.d.ts +4 -1
- package/lib/asserts/string/validUrl.js +4 -27
- package/lib/asserts/string/validUrl.js.map +1 -1
- package/lib/asserts/string/validUrl.mjs +4 -27
- package/lib/asserts/string/validUrl.mjs.map +1 -1
- package/lib/chunk-22254THF.mjs +21 -0
- package/lib/chunk-22254THF.mjs.map +1 -0
- package/lib/chunk-22VHHJSS.js +28 -0
- package/lib/chunk-22VHHJSS.js.map +1 -0
- package/lib/chunk-23QTSXPQ.js +18 -0
- package/lib/chunk-23QTSXPQ.js.map +1 -0
- package/lib/chunk-24LO7MNY.js +18 -0
- package/lib/chunk-24LO7MNY.js.map +1 -0
- package/lib/{chunk-ASZW6XRM.mjs → chunk-2ANPCB4O.mjs} +4 -2
- package/lib/{chunk-ASZW6XRM.mjs.map → chunk-2ANPCB4O.mjs.map} +1 -1
- package/lib/chunk-2D3HCTJV.js +18 -0
- package/lib/chunk-2D3HCTJV.js.map +1 -0
- package/lib/chunk-2ESDKTV4.js +18 -0
- package/lib/chunk-2ESDKTV4.js.map +1 -0
- package/lib/chunk-2HGS4STD.js +48 -0
- package/lib/chunk-2HGS4STD.js.map +1 -0
- package/lib/chunk-2IPGGARK.mjs +21 -0
- package/lib/chunk-2IPGGARK.mjs.map +1 -0
- package/lib/chunk-3W2COCXV.js +18 -0
- package/lib/chunk-3W2COCXV.js.map +1 -0
- package/lib/chunk-4N5J426R.mjs +20 -0
- package/lib/chunk-4N5J426R.mjs.map +1 -0
- package/lib/chunk-4UPXP4I3.js +25 -0
- package/lib/chunk-4UPXP4I3.js.map +1 -0
- package/lib/{chunk-C3EDEQ3W.mjs → chunk-4ZKU4RJL.mjs} +3 -6
- package/lib/chunk-4ZKU4RJL.mjs.map +1 -0
- package/lib/chunk-5NYVRFG3.mjs +48 -0
- package/lib/chunk-5NYVRFG3.mjs.map +1 -0
- package/lib/chunk-62EKGBXF.js +21 -0
- package/lib/chunk-62EKGBXF.js.map +1 -0
- package/lib/chunk-6JPYR2TS.js +23 -0
- package/lib/chunk-6JPYR2TS.js.map +1 -0
- package/lib/chunk-6LPQRAFN.js +30 -0
- package/lib/chunk-6LPQRAFN.js.map +1 -0
- package/lib/{chunk-LPR3G5T3.mjs → chunk-6WKSLMJG.mjs} +11 -8
- package/lib/chunk-6WKSLMJG.mjs.map +1 -0
- package/lib/chunk-7JL66G7G.mjs +20 -0
- package/lib/chunk-7JL66G7G.mjs.map +1 -0
- package/lib/chunk-AJHBPMZT.mjs +19 -0
- package/lib/chunk-AJHBPMZT.mjs.map +1 -0
- package/lib/chunk-AQCV7PB4.mjs +28 -0
- package/lib/chunk-AQCV7PB4.mjs.map +1 -0
- package/lib/chunk-ARIYSQMH.js +20 -0
- package/lib/chunk-ARIYSQMH.js.map +1 -0
- package/lib/{chunk-42J6CHIO.js → chunk-AXKX5BGH.js} +4 -2
- package/lib/chunk-AXKX5BGH.js.map +1 -0
- package/lib/chunk-BRFUFNU4.js +18 -0
- package/lib/chunk-BRFUFNU4.js.map +1 -0
- package/lib/chunk-C2VSTWID.js +18 -0
- package/lib/chunk-C2VSTWID.js.map +1 -0
- package/lib/chunk-C44KAKMR.js +21 -0
- package/lib/chunk-C44KAKMR.js.map +1 -0
- package/lib/chunk-D6G32F2K.js +69 -0
- package/lib/chunk-D6G32F2K.js.map +1 -0
- package/lib/chunk-DCPRPCZ3.js +20 -0
- package/lib/chunk-DCPRPCZ3.js.map +1 -0
- package/lib/{chunk-U4USIJV3.js → chunk-DED5KDLM.js} +20 -16
- package/lib/chunk-DED5KDLM.js.map +1 -0
- package/lib/chunk-DFYP4GKE.js +21 -0
- package/lib/chunk-DFYP4GKE.js.map +1 -0
- package/lib/chunk-ENZ5WDUQ.js +18 -0
- package/lib/chunk-ENZ5WDUQ.js.map +1 -0
- package/lib/chunk-FI737YZJ.js +19 -0
- package/lib/chunk-FI737YZJ.js.map +1 -0
- package/lib/chunk-FIDPCCCW.js +24 -0
- package/lib/chunk-FIDPCCCW.js.map +1 -0
- package/lib/chunk-GFWZQ4XW.mjs +30 -0
- package/lib/chunk-GFWZQ4XW.mjs.map +1 -0
- package/lib/chunk-GGWJJFXY.mjs +20 -0
- package/lib/chunk-GGWJJFXY.mjs.map +1 -0
- package/lib/chunk-H2M4FCRZ.mjs +21 -0
- package/lib/chunk-H2M4FCRZ.mjs.map +1 -0
- package/lib/chunk-H4OW6OUF.js +21 -0
- package/lib/chunk-H4OW6OUF.js.map +1 -0
- package/lib/chunk-HD37VXPZ.mjs +19 -0
- package/lib/chunk-HD37VXPZ.mjs.map +1 -0
- package/lib/chunk-HPIF2CMT.js +18 -0
- package/lib/chunk-HPIF2CMT.js.map +1 -0
- package/lib/chunk-HUWO5UKU.js +64 -0
- package/lib/chunk-HUWO5UKU.js.map +1 -0
- package/lib/chunk-HWVM4SYU.mjs +18 -0
- package/lib/chunk-HWVM4SYU.mjs.map +1 -0
- package/lib/chunk-IDDU6B6T.js +20 -0
- package/lib/chunk-IDDU6B6T.js.map +1 -0
- package/lib/chunk-KRCOKWAB.mjs +18 -0
- package/lib/chunk-KRCOKWAB.mjs.map +1 -0
- package/lib/chunk-LXZTBF7F.js +18 -0
- package/lib/chunk-LXZTBF7F.js.map +1 -0
- package/lib/chunk-M2GOQ7TZ.mjs +21 -0
- package/lib/chunk-M2GOQ7TZ.mjs.map +1 -0
- package/lib/{chunk-YUMUCQKL.mjs → chunk-M3HYPZLE.mjs} +15 -11
- package/lib/chunk-M3HYPZLE.mjs.map +1 -0
- package/lib/chunk-MCQHWS3E.mjs +18 -0
- package/lib/chunk-MCQHWS3E.mjs.map +1 -0
- package/lib/chunk-MHWPSQB3.js +20 -0
- package/lib/chunk-MHWPSQB3.js.map +1 -0
- package/lib/chunk-N3EHGKZV.mjs +25 -0
- package/lib/chunk-N3EHGKZV.mjs.map +1 -0
- package/lib/chunk-NBR3QGKW.js +23 -0
- package/lib/chunk-NBR3QGKW.js.map +1 -0
- package/lib/chunk-NFD7D5GZ.mjs +71 -0
- package/lib/chunk-NFD7D5GZ.mjs.map +1 -0
- package/lib/chunk-NOJB5GBZ.mjs +18 -0
- package/lib/chunk-NOJB5GBZ.mjs.map +1 -0
- package/lib/chunk-NS4GXUCA.mjs +18 -0
- package/lib/chunk-NS4GXUCA.mjs.map +1 -0
- package/lib/chunk-NY2TPU6O.mjs +18 -0
- package/lib/chunk-NY2TPU6O.mjs.map +1 -0
- package/lib/{chunk-H32B3NHW.mjs → chunk-OE3L7EKN.mjs} +3 -3
- package/lib/chunk-OE3L7EKN.mjs.map +1 -0
- package/lib/chunk-OFZMO7PB.mjs +18 -0
- package/lib/chunk-OFZMO7PB.mjs.map +1 -0
- package/lib/chunk-OHUOBIHX.mjs +52 -0
- package/lib/chunk-OHUOBIHX.mjs.map +1 -0
- package/lib/chunk-OMSHZITC.js +20 -0
- package/lib/chunk-OMSHZITC.js.map +1 -0
- package/lib/chunk-OQYS7JVF.js +28 -0
- package/lib/chunk-OQYS7JVF.js.map +1 -0
- package/lib/chunk-OSFIPFQ3.mjs +28 -0
- package/lib/chunk-OSFIPFQ3.mjs.map +1 -0
- package/lib/chunk-OU5BTUDV.mjs +23 -0
- package/lib/chunk-OU5BTUDV.mjs.map +1 -0
- package/lib/chunk-OZ3BTSSQ.mjs +64 -0
- package/lib/chunk-OZ3BTSSQ.mjs.map +1 -0
- package/lib/{chunk-IZ3CBVEE.js → chunk-PAV4SQQL.js} +4 -7
- package/lib/chunk-PAV4SQQL.js.map +1 -0
- package/lib/chunk-PNSDUVRE.mjs +21 -0
- package/lib/chunk-PNSDUVRE.mjs.map +1 -0
- package/lib/chunk-PVQALO2H.js +23 -0
- package/lib/chunk-PVQALO2H.js.map +1 -0
- package/lib/chunk-QEG24G7E.mjs +18 -0
- package/lib/chunk-QEG24G7E.mjs.map +1 -0
- package/lib/chunk-QIFA6S5U.mjs +18 -0
- package/lib/chunk-QIFA6S5U.mjs.map +1 -0
- package/lib/chunk-QIPGUTIG.mjs +302 -0
- package/lib/chunk-QIPGUTIG.mjs.map +1 -0
- package/lib/chunk-QMIH3A4D.js +18 -0
- package/lib/chunk-QMIH3A4D.js.map +1 -0
- package/lib/chunk-R25HSJPH.js +21 -0
- package/lib/chunk-R25HSJPH.js.map +1 -0
- package/lib/chunk-S4FWDTEW.mjs +20 -0
- package/lib/chunk-S4FWDTEW.mjs.map +1 -0
- package/lib/chunk-S5D5AFDF.js +18 -0
- package/lib/chunk-S5D5AFDF.js.map +1 -0
- package/lib/chunk-SBO6OQIX.mjs +23 -0
- package/lib/chunk-SBO6OQIX.mjs.map +1 -0
- package/lib/chunk-SFIX77W5.js +21 -0
- package/lib/chunk-SFIX77W5.js.map +1 -0
- package/lib/chunk-T2A3XXQZ.mjs +18 -0
- package/lib/chunk-T2A3XXQZ.mjs.map +1 -0
- package/lib/chunk-TCDQA2NU.js +31 -0
- package/lib/chunk-TCDQA2NU.js.map +1 -0
- package/lib/{chunk-H6LHV3EA.mjs → chunk-THU5VBSO.mjs} +2 -2
- package/lib/chunk-THU5VBSO.mjs.map +1 -0
- package/lib/{chunk-5YYRBKDP.js → chunk-TJQ5NVL4.js} +5 -5
- package/lib/chunk-TJQ5NVL4.js.map +1 -0
- package/lib/{chunk-HP3DRZWK.js → chunk-TLPVFRWR.js} +4 -7
- package/lib/chunk-TLPVFRWR.js.map +1 -0
- package/lib/chunk-TLRVQWCI.mjs +30 -0
- package/lib/chunk-TLRVQWCI.mjs.map +1 -0
- package/lib/chunk-TQDMUHTA.mjs +20 -0
- package/lib/chunk-TQDMUHTA.mjs.map +1 -0
- package/lib/chunk-TZBAW5OO.mjs +21 -0
- package/lib/chunk-TZBAW5OO.mjs.map +1 -0
- package/lib/chunk-UHMICS34.mjs +18 -0
- package/lib/chunk-UHMICS34.mjs.map +1 -0
- package/lib/chunk-UYQFYQQG.mjs +69 -0
- package/lib/chunk-UYQFYQQG.mjs.map +1 -0
- package/lib/chunk-V2J4TQR5.mjs +20 -0
- package/lib/chunk-V2J4TQR5.mjs.map +1 -0
- package/lib/chunk-V7C77FML.mjs +18 -0
- package/lib/chunk-V7C77FML.mjs.map +1 -0
- package/lib/chunk-VN4GLOEN.js +302 -0
- package/lib/chunk-VN4GLOEN.js.map +1 -0
- package/lib/chunk-VOFKYSJD.js +20 -0
- package/lib/chunk-VOFKYSJD.js.map +1 -0
- package/lib/chunk-VVXKATDH.js +18 -0
- package/lib/chunk-VVXKATDH.js.map +1 -0
- package/lib/{chunk-K7X6DVM2.mjs → chunk-W3U7RYLP.mjs} +3 -6
- package/lib/chunk-W3U7RYLP.mjs.map +1 -0
- package/lib/chunk-WJGXVKZY.js +21 -0
- package/lib/chunk-WJGXVKZY.js.map +1 -0
- package/lib/chunk-WLPDAJB3.js +52 -0
- package/lib/chunk-WLPDAJB3.js.map +1 -0
- package/lib/chunk-WYM2TIVW.mjs +23 -0
- package/lib/chunk-WYM2TIVW.mjs.map +1 -0
- package/lib/chunk-XBE75VFX.js +13 -0
- package/lib/chunk-XBE75VFX.js.map +1 -0
- package/lib/chunk-XDVSL5B6.js +14 -0
- package/lib/chunk-XDVSL5B6.js.map +1 -0
- package/lib/chunk-XIOV4SHZ.mjs +13 -0
- package/lib/chunk-XIOV4SHZ.mjs.map +1 -0
- package/lib/chunk-Y54K6TQO.js +19 -0
- package/lib/chunk-Y54K6TQO.js.map +1 -0
- package/lib/chunk-Y5MNJGFX.js +30 -0
- package/lib/chunk-Y5MNJGFX.js.map +1 -0
- package/lib/chunk-YDTQASAY.mjs +18 -0
- package/lib/chunk-YDTQASAY.mjs.map +1 -0
- package/lib/chunk-YMPRYKNY.js +18 -0
- package/lib/chunk-YMPRYKNY.js.map +1 -0
- package/lib/chunk-Z2HZXSDA.js +18 -0
- package/lib/chunk-Z2HZXSDA.js.map +1 -0
- package/lib/chunk-Z3NPFUIA.mjs +18 -0
- package/lib/chunk-Z3NPFUIA.mjs.map +1 -0
- package/lib/chunk-Z4XOKGU3.js +71 -0
- package/lib/chunk-Z4XOKGU3.js.map +1 -0
- package/lib/chunk-ZDXO3TGZ.mjs +18 -0
- package/lib/chunk-ZDXO3TGZ.mjs.map +1 -0
- package/lib/chunk-ZEGRYDE5.mjs +18 -0
- package/lib/chunk-ZEGRYDE5.mjs.map +1 -0
- package/lib/chunk-ZGUF5ZDP.mjs +21 -0
- package/lib/chunk-ZGUF5ZDP.mjs.map +1 -0
- package/lib/chunk-ZNQHNLKW.js +18 -0
- package/lib/chunk-ZNQHNLKW.js.map +1 -0
- package/lib/chunk-ZTCXXAKD.mjs +24 -0
- package/lib/chunk-ZTCXXAKD.mjs.map +1 -0
- package/lib/codeGen.d.mts +3 -2
- package/lib/codeGen.d.ts +3 -2
- package/lib/codeGen.js +3 -46
- package/lib/codeGen.js.map +1 -1
- package/lib/codeGen.mjs +4 -47
- package/lib/codeGen.mjs.map +1 -1
- package/lib/commonTypes.d.mts +12 -12
- package/lib/commonTypes.d.ts +12 -12
- package/lib/core.d.mts +200 -0
- package/lib/core.d.ts +200 -0
- package/lib/core.js +17 -0
- package/lib/core.js.map +1 -0
- package/lib/core.mjs +17 -0
- package/lib/exceptions.d.mts +2 -3
- package/lib/exceptions.d.ts +2 -3
- package/lib/exceptions.js +2 -4
- package/lib/exceptions.js.map +1 -1
- package/lib/exceptions.mjs +3 -5
- package/lib/helpers/constants.d.mts +2 -1
- package/lib/helpers/constants.d.ts +2 -1
- package/lib/helpers/constants.js +4 -2
- package/lib/helpers/constants.js.map +1 -1
- package/lib/helpers/constants.mjs +5 -3
- package/lib/helpers/setStrictType.d.mts +3 -2
- package/lib/helpers/setStrictType.d.ts +3 -2
- package/lib/helpers/setStrictType.js +3 -5
- package/lib/helpers/setStrictType.js.map +1 -1
- package/lib/helpers/setStrictType.mjs +2 -4
- package/lib/index.d.mts +52 -4
- package/lib/index.d.ts +52 -4
- package/lib/index.js +203 -6
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +207 -10
- package/lib/translationMap.d.mts +4 -1
- package/lib/translationMap.d.ts +4 -1
- package/lib/translationMap.js +3 -3
- package/lib/translationMap.mjs +2 -2
- package/package.json +46 -41
- package/lib/CommonSchema-DOh3bsL-.d.ts +0 -110
- package/lib/CommonSchema-wi9MOXGF.d.mts +0 -110
- package/lib/chunk-2KQASECD.js +0 -20
- package/lib/chunk-2KQASECD.js.map +0 -1
- package/lib/chunk-42J6CHIO.js.map +0 -1
- package/lib/chunk-5P6AZJCN.js +0 -45
- package/lib/chunk-5P6AZJCN.js.map +0 -1
- package/lib/chunk-5WHCMWXK.js +0 -50
- package/lib/chunk-5WHCMWXK.js.map +0 -1
- package/lib/chunk-5YYRBKDP.js.map +0 -1
- package/lib/chunk-6D5W7SSQ.mjs +0 -44
- package/lib/chunk-6D5W7SSQ.mjs.map +0 -1
- package/lib/chunk-7NBOVYSP.mjs +0 -136
- package/lib/chunk-7NBOVYSP.mjs.map +0 -1
- package/lib/chunk-BNCT7NOR.mjs +0 -91
- package/lib/chunk-BNCT7NOR.mjs.map +0 -1
- package/lib/chunk-C3EDEQ3W.mjs.map +0 -1
- package/lib/chunk-CHUPE6SJ.mjs +0 -58
- package/lib/chunk-CHUPE6SJ.mjs.map +0 -1
- package/lib/chunk-ECBOZ3BM.js +0 -44
- package/lib/chunk-ECBOZ3BM.js.map +0 -1
- package/lib/chunk-FGZKNBDP.mjs +0 -45
- package/lib/chunk-FGZKNBDP.mjs.map +0 -1
- package/lib/chunk-FP5QAEVQ.mjs +0 -63
- package/lib/chunk-FP5QAEVQ.mjs.map +0 -1
- package/lib/chunk-G55SHHAR.js +0 -29
- package/lib/chunk-G55SHHAR.js.map +0 -1
- package/lib/chunk-H32B3NHW.mjs.map +0 -1
- package/lib/chunk-H6LHV3EA.mjs.map +0 -1
- package/lib/chunk-HP3DRZWK.js.map +0 -1
- package/lib/chunk-IZ3CBVEE.js.map +0 -1
- package/lib/chunk-K7X6DVM2.mjs.map +0 -1
- package/lib/chunk-LPR3G5T3.mjs.map +0 -1
- package/lib/chunk-MHBY5OIQ.mjs +0 -20
- package/lib/chunk-MHBY5OIQ.mjs.map +0 -1
- package/lib/chunk-MLNQZ445.js +0 -58
- package/lib/chunk-MLNQZ445.js.map +0 -1
- package/lib/chunk-QIDWASOC.js +0 -14
- package/lib/chunk-QIDWASOC.js.map +0 -1
- package/lib/chunk-SHJVKSEZ.js +0 -136
- package/lib/chunk-SHJVKSEZ.js.map +0 -1
- package/lib/chunk-TRGMD7LA.mjs +0 -29
- package/lib/chunk-TRGMD7LA.mjs.map +0 -1
- package/lib/chunk-TV5IZY4L.mjs +0 -50
- package/lib/chunk-TV5IZY4L.mjs.map +0 -1
- package/lib/chunk-U4USIJV3.js.map +0 -1
- package/lib/chunk-UUY7DPHK.js +0 -65
- package/lib/chunk-UUY7DPHK.js.map +0 -1
- package/lib/chunk-VW4RMQD4.js +0 -28
- package/lib/chunk-VW4RMQD4.js.map +0 -1
- package/lib/chunk-WK4FJ5GD.mjs +0 -65
- package/lib/chunk-WK4FJ5GD.mjs.map +0 -1
- package/lib/chunk-X762EUSZ.js +0 -91
- package/lib/chunk-X762EUSZ.js.map +0 -1
- package/lib/chunk-YUMUCQKL.mjs.map +0 -1
- package/lib/chunk-Z6QU36MM.js +0 -63
- package/lib/chunk-Z6QU36MM.js.map +0 -1
- package/lib/helpers/core.d.mts +0 -3
- package/lib/helpers/core.d.ts +0 -3
- package/lib/helpers/core.js +0 -11
- package/lib/helpers/core.js.map +0 -1
- package/lib/helpers/core.mjs +0 -11
- package/lib/parse.d.mts +0 -61
- package/lib/parse.d.ts +0 -61
- package/lib/parse.js +0 -11
- package/lib/parse.js.map +0 -1
- package/lib/parse.mjs +0 -11
- package/lib/parse.mjs.map +0 -1
- package/lib/parseOrFail.d.mts +0 -43
- package/lib/parseOrFail.d.ts +0 -43
- package/lib/parseOrFail.js +0 -11
- package/lib/parseOrFail.js.map +0 -1
- package/lib/parseOrFail.mjs +0 -11
- package/lib/parseOrFail.mjs.map +0 -1
- package/lib/schemas/ArraySchema.d.mts +0 -11
- package/lib/schemas/ArraySchema.d.ts +0 -11
- package/lib/schemas/ArraySchema.js +0 -13
- package/lib/schemas/ArraySchema.js.map +0 -1
- package/lib/schemas/ArraySchema.mjs +0 -13
- package/lib/schemas/ArraySchema.mjs.map +0 -1
- package/lib/schemas/BigIntSchema.d.mts +0 -30
- package/lib/schemas/BigIntSchema.d.ts +0 -30
- package/lib/schemas/BigIntSchema.js +0 -17
- package/lib/schemas/BigIntSchema.js.map +0 -1
- package/lib/schemas/BigIntSchema.mjs +0 -17
- package/lib/schemas/BigIntSchema.mjs.map +0 -1
- package/lib/schemas/BooleanSchema.d.mts +0 -25
- package/lib/schemas/BooleanSchema.d.ts +0 -25
- package/lib/schemas/BooleanSchema.js +0 -14
- package/lib/schemas/BooleanSchema.js.map +0 -1
- package/lib/schemas/BooleanSchema.mjs +0 -14
- package/lib/schemas/BooleanSchema.mjs.map +0 -1
- package/lib/schemas/CommonSchema.d.mts +0 -3
- package/lib/schemas/CommonSchema.d.ts +0 -3
- package/lib/schemas/CommonSchema.js +0 -12
- package/lib/schemas/CommonSchema.js.map +0 -1
- package/lib/schemas/CommonSchema.mjs +0 -12
- package/lib/schemas/CommonSchema.mjs.map +0 -1
- package/lib/schemas/DateSchema.d.mts +0 -10
- package/lib/schemas/DateSchema.d.ts +0 -10
- package/lib/schemas/DateSchema.js +0 -13
- package/lib/schemas/DateSchema.js.map +0 -1
- package/lib/schemas/DateSchema.mjs +0 -13
- package/lib/schemas/DateSchema.mjs.map +0 -1
- package/lib/schemas/NumberSchema.d.mts +0 -29
- package/lib/schemas/NumberSchema.d.ts +0 -29
- package/lib/schemas/NumberSchema.js +0 -17
- package/lib/schemas/NumberSchema.js.map +0 -1
- package/lib/schemas/NumberSchema.mjs +0 -17
- package/lib/schemas/NumberSchema.mjs.map +0 -1
- package/lib/schemas/ObjectSchema.d.mts +0 -29
- package/lib/schemas/ObjectSchema.d.ts +0 -29
- package/lib/schemas/ObjectSchema.js +0 -13
- package/lib/schemas/ObjectSchema.js.map +0 -1
- package/lib/schemas/ObjectSchema.mjs +0 -13
- package/lib/schemas/ObjectSchema.mjs.map +0 -1
- package/lib/schemas/StringSchema.d.mts +0 -30
- package/lib/schemas/StringSchema.d.ts +0 -30
- package/lib/schemas/StringSchema.js +0 -17
- package/lib/schemas/StringSchema.js.map +0 -1
- package/lib/schemas/StringSchema.mjs +0 -17
- package/lib/schemas/StringSchema.mjs.map +0 -1
- /package/lib/{helpers/core.mjs.map → core.mjs.map} +0 -0
package/lib/helpers/core.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkX762EUSZjs = require('../chunk-X762EUSZ.js');
|
|
5
|
-
require('../chunk-VBTWYDEM.js');
|
|
6
|
-
require('../chunk-5P6AZJCN.js');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.ctxSymbol = _chunkX762EUSZjs.ctxSymbol; exports.innerCheck = _chunkX762EUSZjs.innerCheck;
|
|
11
|
-
//# sourceMappingURL=core.js.map
|
package/lib/helpers/core.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/bguard/bguard/lib/helpers/core.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,iGAAC","file":"/home/runner/work/bguard/bguard/lib/helpers/core.js"}
|
package/lib/helpers/core.mjs
DELETED
package/lib/parse.d.mts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { InferType } from './InferType.mjs';
|
|
2
|
-
import { C as CommonSchema } from './CommonSchema-wi9MOXGF.mjs';
|
|
3
|
-
import { ValidationErrorData } from './commonTypes.mjs';
|
|
4
|
-
|
|
5
|
-
interface ParseOptions {
|
|
6
|
-
/**
|
|
7
|
-
* Set language keyword to map error messages.
|
|
8
|
-
* @default 'default'
|
|
9
|
-
* @example 'sr' or 'Serbia' or any string to identify language
|
|
10
|
-
*/
|
|
11
|
-
lng?: string;
|
|
12
|
-
/**
|
|
13
|
-
* If true, collects all validation errors and returns them.
|
|
14
|
-
* If false or undefined, returns the first validation error it can find and stops looking,
|
|
15
|
-
* which provides a small runtime optimization.
|
|
16
|
-
* @default undefined
|
|
17
|
-
*/
|
|
18
|
-
getAllErrors?: boolean;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Parses and validates a value against the provided schema, returning a type-safe parsedValue.
|
|
22
|
-
*
|
|
23
|
-
* This function will throw a `ValidationError` if the value does not conform to the schema.
|
|
24
|
-
* The inferred TypeScript type of the returned value will match the structure defined by the schema.
|
|
25
|
-
*
|
|
26
|
-
* @template T
|
|
27
|
-
* @param {T} schema - The schema to validate the received value against. This schema dictates the expected structure and type of the value.
|
|
28
|
-
* @param {unknown} receivedValue - The value to be validated and parsed according to the schema.
|
|
29
|
-
* @param {ParseOptions} options - Options
|
|
30
|
-
* @param {ParseOptions.lng} options.lng - Set language keyword to map Error messages
|
|
31
|
-
* @param {ParseOptions.lng} options.getAllErrors - If `false` or `undefined` - returns the first validation error it can find and stops looking, which provides a small runtime optimization.
|
|
32
|
-
* @returns {[undefined, InferType<T>]} A tuple of [undefined, InferType<T>] if parsing is successful.
|
|
33
|
-
* @returns {[ValidationErrorData[], undefined]} A tuple of [ValidationErrorData[], undefined]] if errors occur.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* const schema = object({
|
|
37
|
-
* name: string(),
|
|
38
|
-
* age: number(),
|
|
39
|
-
* });
|
|
40
|
-
*
|
|
41
|
-
* const [errors, parsedValue] = parse(schema, { name: 'Alice', age: 30 });
|
|
42
|
-
* // parsedValue will be inferred as { name: string; age: number }
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* const [errors, parsedValue] = parse(schema, { name: 'Alice', age: '30' });
|
|
46
|
-
* // First element in array "errors" will have an error because 'age' should be a number, not a string.
|
|
47
|
-
* // Array 'errors' returns only one element.
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* const [errors, parsedValue] = parse(schema, { name: true, age: '30' }, { getAllErrors: true});
|
|
51
|
-
* // Returns array "errors" with multiple errors because 'age' should be a number and 'name' a string.
|
|
52
|
-
* // With provided options { getAllErrors: true}, we can expecte more than one error in 'errors' array.
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* const [errors, parsedValue] = parse(schema, { name: true, age: '30' }, { lng: 'SR'});
|
|
56
|
-
* // First element in array "errors" will have an error because 'age' should be a number, not a string.
|
|
57
|
-
* // With provided options { lng: 'SR'}, errors will be translated to a language mapped with keyword 'SR'
|
|
58
|
-
*/
|
|
59
|
-
declare function parse<T extends CommonSchema>(schema: T, receivedValue: unknown, options?: ParseOptions): [ValidationErrorData[], undefined] | [undefined, InferType<T>];
|
|
60
|
-
|
|
61
|
-
export { parse };
|
package/lib/parse.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { InferType } from './InferType.js';
|
|
2
|
-
import { C as CommonSchema } from './CommonSchema-DOh3bsL-.js';
|
|
3
|
-
import { ValidationErrorData } from './commonTypes.js';
|
|
4
|
-
|
|
5
|
-
interface ParseOptions {
|
|
6
|
-
/**
|
|
7
|
-
* Set language keyword to map error messages.
|
|
8
|
-
* @default 'default'
|
|
9
|
-
* @example 'sr' or 'Serbia' or any string to identify language
|
|
10
|
-
*/
|
|
11
|
-
lng?: string;
|
|
12
|
-
/**
|
|
13
|
-
* If true, collects all validation errors and returns them.
|
|
14
|
-
* If false or undefined, returns the first validation error it can find and stops looking,
|
|
15
|
-
* which provides a small runtime optimization.
|
|
16
|
-
* @default undefined
|
|
17
|
-
*/
|
|
18
|
-
getAllErrors?: boolean;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Parses and validates a value against the provided schema, returning a type-safe parsedValue.
|
|
22
|
-
*
|
|
23
|
-
* This function will throw a `ValidationError` if the value does not conform to the schema.
|
|
24
|
-
* The inferred TypeScript type of the returned value will match the structure defined by the schema.
|
|
25
|
-
*
|
|
26
|
-
* @template T
|
|
27
|
-
* @param {T} schema - The schema to validate the received value against. This schema dictates the expected structure and type of the value.
|
|
28
|
-
* @param {unknown} receivedValue - The value to be validated and parsed according to the schema.
|
|
29
|
-
* @param {ParseOptions} options - Options
|
|
30
|
-
* @param {ParseOptions.lng} options.lng - Set language keyword to map Error messages
|
|
31
|
-
* @param {ParseOptions.lng} options.getAllErrors - If `false` or `undefined` - returns the first validation error it can find and stops looking, which provides a small runtime optimization.
|
|
32
|
-
* @returns {[undefined, InferType<T>]} A tuple of [undefined, InferType<T>] if parsing is successful.
|
|
33
|
-
* @returns {[ValidationErrorData[], undefined]} A tuple of [ValidationErrorData[], undefined]] if errors occur.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* const schema = object({
|
|
37
|
-
* name: string(),
|
|
38
|
-
* age: number(),
|
|
39
|
-
* });
|
|
40
|
-
*
|
|
41
|
-
* const [errors, parsedValue] = parse(schema, { name: 'Alice', age: 30 });
|
|
42
|
-
* // parsedValue will be inferred as { name: string; age: number }
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* const [errors, parsedValue] = parse(schema, { name: 'Alice', age: '30' });
|
|
46
|
-
* // First element in array "errors" will have an error because 'age' should be a number, not a string.
|
|
47
|
-
* // Array 'errors' returns only one element.
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* const [errors, parsedValue] = parse(schema, { name: true, age: '30' }, { getAllErrors: true});
|
|
51
|
-
* // Returns array "errors" with multiple errors because 'age' should be a number and 'name' a string.
|
|
52
|
-
* // With provided options { getAllErrors: true}, we can expecte more than one error in 'errors' array.
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* const [errors, parsedValue] = parse(schema, { name: true, age: '30' }, { lng: 'SR'});
|
|
56
|
-
* // First element in array "errors" will have an error because 'age' should be a number, not a string.
|
|
57
|
-
* // With provided options { lng: 'SR'}, errors will be translated to a language mapped with keyword 'SR'
|
|
58
|
-
*/
|
|
59
|
-
declare function parse<T extends CommonSchema>(schema: T, receivedValue: unknown, options?: ParseOptions): [ValidationErrorData[], undefined] | [undefined, InferType<T>];
|
|
60
|
-
|
|
61
|
-
export { parse };
|
package/lib/parse.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunk5WHCMWXKjs = require('./chunk-5WHCMWXK.js');
|
|
4
|
-
require('./chunk-X762EUSZ.js');
|
|
5
|
-
require('./chunk-VBTWYDEM.js');
|
|
6
|
-
require('./chunk-5YYRBKDP.js');
|
|
7
|
-
require('./chunk-5P6AZJCN.js');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.parse = _chunk5WHCMWXKjs.parse;
|
|
11
|
-
//# sourceMappingURL=parse.js.map
|
package/lib/parse.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/bguard/bguard/lib/parse.js"],"names":[],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACF,uCAAC","file":"/home/runner/work/bguard/bguard/lib/parse.js"}
|
package/lib/parse.mjs
DELETED
package/lib/parse.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/lib/parseOrFail.d.mts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { InferType } from './InferType.mjs';
|
|
2
|
-
import { C as CommonSchema } from './CommonSchema-wi9MOXGF.mjs';
|
|
3
|
-
import './commonTypes.mjs';
|
|
4
|
-
|
|
5
|
-
interface ParseOptions {
|
|
6
|
-
/**
|
|
7
|
-
* Set language keyword to map error messages.
|
|
8
|
-
* @default 'default'
|
|
9
|
-
* @example 'sr' or 'Serbia' or any string to identify language
|
|
10
|
-
*/
|
|
11
|
-
lng?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Parses and validates a value against the provided schema, returning a type-safe result.
|
|
15
|
-
*
|
|
16
|
-
* This function will throw a `ValidationError` if the value does not conform to the schema.
|
|
17
|
-
* The inferred TypeScript type of the returned value will match the structure defined by the schema.
|
|
18
|
-
*
|
|
19
|
-
* @template T
|
|
20
|
-
* @param {T} schema - The schema to validate the received value against. This schema dictates the expected structure and type of the value.
|
|
21
|
-
* @param {unknown} receivedValue - The value to be validated and parsed according to the schema.
|
|
22
|
-
* @param {ParseOptions} options - Options
|
|
23
|
-
* @param {ParseOptions.lng} options.lng - Set language keyword to map Error message
|
|
24
|
-
* @returns {InferType<T>} The validated value, with its TypeScript type inferred from the schema.
|
|
25
|
-
*
|
|
26
|
-
* @throws {ValidationError} If the received value does not match the schema, a `ValidationError` will be thrown.
|
|
27
|
-
* @throws {Error} If an unexpected error occurs during validation, an error will be thrown with a generic message.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* const schema = object({
|
|
31
|
-
* name: string(),
|
|
32
|
-
* age: number(),
|
|
33
|
-
* });
|
|
34
|
-
*
|
|
35
|
-
* const result = parseOrFail(schema, { name: 'Alice', age: 30 });
|
|
36
|
-
* // result will be inferred as { name: string; age: number }
|
|
37
|
-
*
|
|
38
|
-
* parseOrFail(schema, { name: 'Alice', age: '30' });
|
|
39
|
-
* // Throws ValidationError because 'age' should be a number, not a string.
|
|
40
|
-
*/
|
|
41
|
-
declare function parseOrFail<T extends CommonSchema>(schema: T, receivedValue: unknown, options?: ParseOptions): InferType<T>;
|
|
42
|
-
|
|
43
|
-
export { parseOrFail };
|
package/lib/parseOrFail.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { InferType } from './InferType.js';
|
|
2
|
-
import { C as CommonSchema } from './CommonSchema-DOh3bsL-.js';
|
|
3
|
-
import './commonTypes.js';
|
|
4
|
-
|
|
5
|
-
interface ParseOptions {
|
|
6
|
-
/**
|
|
7
|
-
* Set language keyword to map error messages.
|
|
8
|
-
* @default 'default'
|
|
9
|
-
* @example 'sr' or 'Serbia' or any string to identify language
|
|
10
|
-
*/
|
|
11
|
-
lng?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Parses and validates a value against the provided schema, returning a type-safe result.
|
|
15
|
-
*
|
|
16
|
-
* This function will throw a `ValidationError` if the value does not conform to the schema.
|
|
17
|
-
* The inferred TypeScript type of the returned value will match the structure defined by the schema.
|
|
18
|
-
*
|
|
19
|
-
* @template T
|
|
20
|
-
* @param {T} schema - The schema to validate the received value against. This schema dictates the expected structure and type of the value.
|
|
21
|
-
* @param {unknown} receivedValue - The value to be validated and parsed according to the schema.
|
|
22
|
-
* @param {ParseOptions} options - Options
|
|
23
|
-
* @param {ParseOptions.lng} options.lng - Set language keyword to map Error message
|
|
24
|
-
* @returns {InferType<T>} The validated value, with its TypeScript type inferred from the schema.
|
|
25
|
-
*
|
|
26
|
-
* @throws {ValidationError} If the received value does not match the schema, a `ValidationError` will be thrown.
|
|
27
|
-
* @throws {Error} If an unexpected error occurs during validation, an error will be thrown with a generic message.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* const schema = object({
|
|
31
|
-
* name: string(),
|
|
32
|
-
* age: number(),
|
|
33
|
-
* });
|
|
34
|
-
*
|
|
35
|
-
* const result = parseOrFail(schema, { name: 'Alice', age: 30 });
|
|
36
|
-
* // result will be inferred as { name: string; age: number }
|
|
37
|
-
*
|
|
38
|
-
* parseOrFail(schema, { name: 'Alice', age: '30' });
|
|
39
|
-
* // Throws ValidationError because 'age' should be a number, not a string.
|
|
40
|
-
*/
|
|
41
|
-
declare function parseOrFail<T extends CommonSchema>(schema: T, receivedValue: unknown, options?: ParseOptions): InferType<T>;
|
|
42
|
-
|
|
43
|
-
export { parseOrFail };
|
package/lib/parseOrFail.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkG55SHHARjs = require('./chunk-G55SHHAR.js');
|
|
4
|
-
require('./chunk-X762EUSZ.js');
|
|
5
|
-
require('./chunk-VBTWYDEM.js');
|
|
6
|
-
require('./chunk-5YYRBKDP.js');
|
|
7
|
-
require('./chunk-5P6AZJCN.js');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.parseOrFail = _chunkG55SHHARjs.parseOrFail;
|
|
11
|
-
//# sourceMappingURL=parseOrFail.js.map
|
package/lib/parseOrFail.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/bguard/bguard/lib/parseOrFail.js"],"names":[],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACF,mDAAC","file":"/home/runner/work/bguard/bguard/lib/parseOrFail.js"}
|
package/lib/parseOrFail.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
parseOrFail
|
|
3
|
-
} from "./chunk-TRGMD7LA.mjs";
|
|
4
|
-
import "./chunk-BNCT7NOR.mjs";
|
|
5
|
-
import "./chunk-YBVMP4EI.mjs";
|
|
6
|
-
import "./chunk-H32B3NHW.mjs";
|
|
7
|
-
import "./chunk-FGZKNBDP.mjs";
|
|
8
|
-
export {
|
|
9
|
-
parseOrFail
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=parseOrFail.mjs.map
|
package/lib/parseOrFail.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { C as CommonSchema, V as ValidatorContext } from '../CommonSchema-wi9MOXGF.mjs';
|
|
2
|
-
import '../InferType.mjs';
|
|
3
|
-
import '../commonTypes.mjs';
|
|
4
|
-
|
|
5
|
-
declare class ArraySchema extends CommonSchema {
|
|
6
|
-
protected _array: number;
|
|
7
|
-
constructor(ctx: ValidatorContext, arraySchema: CommonSchema);
|
|
8
|
-
private validateArrayEntry;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { ArraySchema };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { C as CommonSchema, V as ValidatorContext } from '../CommonSchema-DOh3bsL-.js';
|
|
2
|
-
import '../InferType.js';
|
|
3
|
-
import '../commonTypes.js';
|
|
4
|
-
|
|
5
|
-
declare class ArraySchema extends CommonSchema {
|
|
6
|
-
protected _array: number;
|
|
7
|
-
constructor(ctx: ValidatorContext, arraySchema: CommonSchema);
|
|
8
|
-
private validateArrayEntry;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { ArraySchema };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkVW4RMQD4js = require('../chunk-VW4RMQD4.js');
|
|
4
|
-
require('../chunk-SHJVKSEZ.js');
|
|
5
|
-
require('../chunk-G55SHHAR.js');
|
|
6
|
-
require('../chunk-X762EUSZ.js');
|
|
7
|
-
require('../chunk-VBTWYDEM.js');
|
|
8
|
-
require('../chunk-5YYRBKDP.js');
|
|
9
|
-
require('../chunk-5P6AZJCN.js');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.ArraySchema = _chunkVW4RMQD4js.ArraySchema;
|
|
13
|
-
//# sourceMappingURL=ArraySchema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/bguard/bguard/lib/schemas/ArraySchema.js"],"names":[],"mappings":"AAAA;AACE;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,mDAAC","file":"/home/runner/work/bguard/bguard/lib/schemas/ArraySchema.js"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ArraySchema
|
|
3
|
-
} from "../chunk-LPR3G5T3.mjs";
|
|
4
|
-
import "../chunk-7NBOVYSP.mjs";
|
|
5
|
-
import "../chunk-TRGMD7LA.mjs";
|
|
6
|
-
import "../chunk-BNCT7NOR.mjs";
|
|
7
|
-
import "../chunk-YBVMP4EI.mjs";
|
|
8
|
-
import "../chunk-H32B3NHW.mjs";
|
|
9
|
-
import "../chunk-FGZKNBDP.mjs";
|
|
10
|
-
export {
|
|
11
|
-
ArraySchema
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=ArraySchema.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { WithBGuardType } from '../commonTypes.mjs';
|
|
2
|
-
import { C as CommonSchema } from '../CommonSchema-wi9MOXGF.mjs';
|
|
3
|
-
import '../InferType.mjs';
|
|
4
|
-
|
|
5
|
-
declare class BigIntSchema extends CommonSchema {
|
|
6
|
-
protected _bigint: number;
|
|
7
|
-
private limit;
|
|
8
|
-
/**
|
|
9
|
-
* Restricts the schema to exactly match the specified value and infers the literal value as the TypeScript type.
|
|
10
|
-
*
|
|
11
|
-
* @param expectedValue - The value that the schema must exactly match.
|
|
12
|
-
* @returns - The schema instance restricted to the specified value, with the literal value inferred as the TypeScript type
|
|
13
|
-
*
|
|
14
|
-
* @example - bigint().equalTo(42n); // Infers the type 42n
|
|
15
|
-
*/
|
|
16
|
-
equalTo<Y extends bigint>(expectedValue: Y): WithBGuardType<this, Y>;
|
|
17
|
-
/**
|
|
18
|
-
* Restricts the schema to match one of the specified values and infers the union of those values as the TypeScript type.
|
|
19
|
-
*
|
|
20
|
-
* @param expectedValues - An array of values that the schema can match.
|
|
21
|
-
* @returns - The schema instance restricted to one of the specified values, with the union of those values inferred as the TypeScript type.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* bigint().oneOfValues([5n, 7n]); // Infers the type 5n | 7n
|
|
25
|
-
*/
|
|
26
|
-
oneOfValues<Y extends bigint>(expectedValue: Y[]): WithBGuardType<this, Y>;
|
|
27
|
-
private limitCheck;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { BigIntSchema };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { WithBGuardType } from '../commonTypes.js';
|
|
2
|
-
import { C as CommonSchema } from '../CommonSchema-DOh3bsL-.js';
|
|
3
|
-
import '../InferType.js';
|
|
4
|
-
|
|
5
|
-
declare class BigIntSchema extends CommonSchema {
|
|
6
|
-
protected _bigint: number;
|
|
7
|
-
private limit;
|
|
8
|
-
/**
|
|
9
|
-
* Restricts the schema to exactly match the specified value and infers the literal value as the TypeScript type.
|
|
10
|
-
*
|
|
11
|
-
* @param expectedValue - The value that the schema must exactly match.
|
|
12
|
-
* @returns - The schema instance restricted to the specified value, with the literal value inferred as the TypeScript type
|
|
13
|
-
*
|
|
14
|
-
* @example - bigint().equalTo(42n); // Infers the type 42n
|
|
15
|
-
*/
|
|
16
|
-
equalTo<Y extends bigint>(expectedValue: Y): WithBGuardType<this, Y>;
|
|
17
|
-
/**
|
|
18
|
-
* Restricts the schema to match one of the specified values and infers the union of those values as the TypeScript type.
|
|
19
|
-
*
|
|
20
|
-
* @param expectedValues - An array of values that the schema can match.
|
|
21
|
-
* @returns - The schema instance restricted to one of the specified values, with the union of those values inferred as the TypeScript type.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* bigint().oneOfValues([5n, 7n]); // Infers the type 5n | 7n
|
|
25
|
-
*/
|
|
26
|
-
oneOfValues<Y extends bigint>(expectedValue: Y[]): WithBGuardType<this, Y>;
|
|
27
|
-
private limitCheck;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { BigIntSchema };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkUUY7DPHKjs = require('../chunk-UUY7DPHK.js');
|
|
4
|
-
require('../chunk-HP3DRZWK.js');
|
|
5
|
-
require('../chunk-IZ3CBVEE.js');
|
|
6
|
-
require('../chunk-42J6CHIO.js');
|
|
7
|
-
require('../chunk-QIDWASOC.js');
|
|
8
|
-
require('../chunk-SHJVKSEZ.js');
|
|
9
|
-
require('../chunk-G55SHHAR.js');
|
|
10
|
-
require('../chunk-X762EUSZ.js');
|
|
11
|
-
require('../chunk-VBTWYDEM.js');
|
|
12
|
-
require('../chunk-5YYRBKDP.js');
|
|
13
|
-
require('../chunk-5P6AZJCN.js');
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
exports.BigIntSchema = _chunkUUY7DPHKjs.BigIntSchema;
|
|
17
|
-
//# sourceMappingURL=BigIntSchema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/bguard/bguard/lib/schemas/BigIntSchema.js"],"names":[],"mappings":"AAAA;AACE;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,qDAAC","file":"/home/runner/work/bguard/bguard/lib/schemas/BigIntSchema.js"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BigIntSchema
|
|
3
|
-
} from "../chunk-WK4FJ5GD.mjs";
|
|
4
|
-
import "../chunk-C3EDEQ3W.mjs";
|
|
5
|
-
import "../chunk-K7X6DVM2.mjs";
|
|
6
|
-
import "../chunk-ASZW6XRM.mjs";
|
|
7
|
-
import "../chunk-H6LHV3EA.mjs";
|
|
8
|
-
import "../chunk-7NBOVYSP.mjs";
|
|
9
|
-
import "../chunk-TRGMD7LA.mjs";
|
|
10
|
-
import "../chunk-BNCT7NOR.mjs";
|
|
11
|
-
import "../chunk-YBVMP4EI.mjs";
|
|
12
|
-
import "../chunk-H32B3NHW.mjs";
|
|
13
|
-
import "../chunk-FGZKNBDP.mjs";
|
|
14
|
-
export {
|
|
15
|
-
BigIntSchema
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=BigIntSchema.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { C as CommonSchema } from '../CommonSchema-wi9MOXGF.mjs';
|
|
2
|
-
import { WithBGuardType } from '../commonTypes.mjs';
|
|
3
|
-
import '../InferType.mjs';
|
|
4
|
-
|
|
5
|
-
declare class BooleanSchema extends CommonSchema {
|
|
6
|
-
protected _boolean: number;
|
|
7
|
-
/**
|
|
8
|
-
* Restricts the schema to exactly match the boolean value true and infers the true value as the TypeScript type.
|
|
9
|
-
*
|
|
10
|
-
* @returns - The schema instance restricted to the value true, with the true value inferred as the TypeScript type
|
|
11
|
-
*
|
|
12
|
-
* @example - boolean().onlyTrue(); // Infers the type true
|
|
13
|
-
*/
|
|
14
|
-
onlyTrue(): WithBGuardType<this, true>;
|
|
15
|
-
/**
|
|
16
|
-
* Restricts the schema to exactly match the boolean value false and infers the false value as the TypeScript type.
|
|
17
|
-
*
|
|
18
|
-
* @returns - The schema instance restricted to the value false, with the false value inferred as the TypeScript type
|
|
19
|
-
*
|
|
20
|
-
* @example - boolean().onlyFalse(); // Infers the type false
|
|
21
|
-
*/
|
|
22
|
-
onlyFalse(): WithBGuardType<this, false>;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { BooleanSchema };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { C as CommonSchema } from '../CommonSchema-DOh3bsL-.js';
|
|
2
|
-
import { WithBGuardType } from '../commonTypes.js';
|
|
3
|
-
import '../InferType.js';
|
|
4
|
-
|
|
5
|
-
declare class BooleanSchema extends CommonSchema {
|
|
6
|
-
protected _boolean: number;
|
|
7
|
-
/**
|
|
8
|
-
* Restricts the schema to exactly match the boolean value true and infers the true value as the TypeScript type.
|
|
9
|
-
*
|
|
10
|
-
* @returns - The schema instance restricted to the value true, with the true value inferred as the TypeScript type
|
|
11
|
-
*
|
|
12
|
-
* @example - boolean().onlyTrue(); // Infers the type true
|
|
13
|
-
*/
|
|
14
|
-
onlyTrue(): WithBGuardType<this, true>;
|
|
15
|
-
/**
|
|
16
|
-
* Restricts the schema to exactly match the boolean value false and infers the false value as the TypeScript type.
|
|
17
|
-
*
|
|
18
|
-
* @returns - The schema instance restricted to the value false, with the false value inferred as the TypeScript type
|
|
19
|
-
*
|
|
20
|
-
* @example - boolean().onlyFalse(); // Infers the type false
|
|
21
|
-
*/
|
|
22
|
-
onlyFalse(): WithBGuardType<this, false>;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { BooleanSchema };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkECBOZ3BMjs = require('../chunk-ECBOZ3BM.js');
|
|
4
|
-
require('../chunk-QIDWASOC.js');
|
|
5
|
-
require('../chunk-SHJVKSEZ.js');
|
|
6
|
-
require('../chunk-G55SHHAR.js');
|
|
7
|
-
require('../chunk-X762EUSZ.js');
|
|
8
|
-
require('../chunk-VBTWYDEM.js');
|
|
9
|
-
require('../chunk-5YYRBKDP.js');
|
|
10
|
-
require('../chunk-5P6AZJCN.js');
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.BooleanSchema = _chunkECBOZ3BMjs.BooleanSchema;
|
|
14
|
-
//# sourceMappingURL=BooleanSchema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/bguard/bguard/lib/schemas/BooleanSchema.js"],"names":[],"mappings":"AAAA;AACE;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,uDAAC","file":"/home/runner/work/bguard/bguard/lib/schemas/BooleanSchema.js"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BooleanSchema
|
|
3
|
-
} from "../chunk-6D5W7SSQ.mjs";
|
|
4
|
-
import "../chunk-H6LHV3EA.mjs";
|
|
5
|
-
import "../chunk-7NBOVYSP.mjs";
|
|
6
|
-
import "../chunk-TRGMD7LA.mjs";
|
|
7
|
-
import "../chunk-BNCT7NOR.mjs";
|
|
8
|
-
import "../chunk-YBVMP4EI.mjs";
|
|
9
|
-
import "../chunk-H32B3NHW.mjs";
|
|
10
|
-
import "../chunk-FGZKNBDP.mjs";
|
|
11
|
-
export {
|
|
12
|
-
BooleanSchema
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=BooleanSchema.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkSHJVKSEZjs = require('../chunk-SHJVKSEZ.js');
|
|
4
|
-
require('../chunk-G55SHHAR.js');
|
|
5
|
-
require('../chunk-X762EUSZ.js');
|
|
6
|
-
require('../chunk-VBTWYDEM.js');
|
|
7
|
-
require('../chunk-5YYRBKDP.js');
|
|
8
|
-
require('../chunk-5P6AZJCN.js');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports.CommonSchema = _chunkSHJVKSEZjs.CommonSchema;
|
|
12
|
-
//# sourceMappingURL=CommonSchema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/bguard/bguard/lib/schemas/CommonSchema.js"],"names":[],"mappings":"AAAA;AACE;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,qDAAC","file":"/home/runner/work/bguard/bguard/lib/schemas/CommonSchema.js"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CommonSchema
|
|
3
|
-
} from "../chunk-7NBOVYSP.mjs";
|
|
4
|
-
import "../chunk-TRGMD7LA.mjs";
|
|
5
|
-
import "../chunk-BNCT7NOR.mjs";
|
|
6
|
-
import "../chunk-YBVMP4EI.mjs";
|
|
7
|
-
import "../chunk-H32B3NHW.mjs";
|
|
8
|
-
import "../chunk-FGZKNBDP.mjs";
|
|
9
|
-
export {
|
|
10
|
-
CommonSchema
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=CommonSchema.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { C as CommonSchema, V as ValidatorContext } from '../CommonSchema-wi9MOXGF.mjs';
|
|
2
|
-
import '../InferType.mjs';
|
|
3
|
-
import '../commonTypes.mjs';
|
|
4
|
-
|
|
5
|
-
declare class DateSchema extends CommonSchema {
|
|
6
|
-
protected _date: number;
|
|
7
|
-
constructor(ctx: ValidatorContext);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { DateSchema };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { C as CommonSchema, V as ValidatorContext } from '../CommonSchema-DOh3bsL-.js';
|
|
2
|
-
import '../InferType.js';
|
|
3
|
-
import '../commonTypes.js';
|
|
4
|
-
|
|
5
|
-
declare class DateSchema extends CommonSchema {
|
|
6
|
-
protected _date: number;
|
|
7
|
-
constructor(ctx: ValidatorContext);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { DateSchema };
|