bguard 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.md +29 -11
  2. package/lib/asserts/array/index.d.mts +1 -1
  3. package/lib/asserts/array/index.d.ts +1 -1
  4. package/lib/asserts/array/index.js +4 -2
  5. package/lib/asserts/array/index.js.map +1 -1
  6. package/lib/asserts/array/index.mjs +3 -1
  7. package/lib/asserts/bigint/index.d.mts +1 -1
  8. package/lib/asserts/bigint/index.d.ts +1 -1
  9. package/lib/asserts/bigint/index.js +5 -3
  10. package/lib/asserts/bigint/index.js.map +1 -1
  11. package/lib/asserts/bigint/index.mjs +4 -2
  12. package/lib/asserts/boolean/index.d.mts +1 -1
  13. package/lib/asserts/boolean/index.d.ts +1 -1
  14. package/lib/asserts/boolean/index.js +4 -2
  15. package/lib/asserts/boolean/index.js.map +1 -1
  16. package/lib/asserts/boolean/index.mjs +3 -1
  17. package/lib/asserts/coerce/bigint.d.mts +32 -0
  18. package/lib/asserts/coerce/bigint.d.ts +32 -0
  19. package/lib/asserts/coerce/bigint.js +16 -0
  20. package/lib/asserts/coerce/bigint.js.map +1 -0
  21. package/lib/asserts/coerce/bigint.mjs +16 -0
  22. package/lib/asserts/coerce/bigint.mjs.map +1 -0
  23. package/lib/asserts/coerce/boolean.d.mts +35 -0
  24. package/lib/asserts/coerce/boolean.d.ts +35 -0
  25. package/lib/asserts/coerce/boolean.js +14 -0
  26. package/lib/asserts/coerce/boolean.js.map +1 -0
  27. package/lib/asserts/coerce/boolean.mjs +14 -0
  28. package/lib/asserts/coerce/boolean.mjs.map +1 -0
  29. package/lib/asserts/coerce/date.d.mts +32 -0
  30. package/lib/asserts/coerce/date.d.ts +32 -0
  31. package/lib/asserts/coerce/date.js +13 -0
  32. package/lib/asserts/coerce/date.js.map +1 -0
  33. package/lib/asserts/coerce/date.mjs +13 -0
  34. package/lib/asserts/coerce/date.mjs.map +1 -0
  35. package/lib/asserts/coerce/index.d.mts +25 -36
  36. package/lib/asserts/coerce/index.d.ts +25 -36
  37. package/lib/asserts/coerce/index.js +28 -8
  38. package/lib/asserts/coerce/index.js.map +1 -1
  39. package/lib/asserts/coerce/index.mjs +28 -8
  40. package/lib/asserts/coerce/number.d.mts +33 -0
  41. package/lib/asserts/coerce/number.d.ts +33 -0
  42. package/lib/asserts/coerce/number.js +16 -0
  43. package/lib/asserts/coerce/number.js.map +1 -0
  44. package/lib/asserts/coerce/number.mjs +16 -0
  45. package/lib/asserts/coerce/number.mjs.map +1 -0
  46. package/lib/asserts/coerce/string.d.mts +30 -0
  47. package/lib/asserts/coerce/string.d.ts +30 -0
  48. package/lib/asserts/coerce/string.js +17 -0
  49. package/lib/asserts/coerce/string.js.map +1 -0
  50. package/lib/asserts/coerce/string.mjs +17 -0
  51. package/lib/asserts/coerce/string.mjs.map +1 -0
  52. package/lib/asserts/date/index.d.mts +1 -1
  53. package/lib/asserts/date/index.d.ts +1 -1
  54. package/lib/asserts/date/index.js +4 -2
  55. package/lib/asserts/date/index.js.map +1 -1
  56. package/lib/asserts/date/index.mjs +3 -1
  57. package/lib/asserts/number/index.d.mts +1 -1
  58. package/lib/asserts/number/index.d.ts +1 -1
  59. package/lib/asserts/number/index.js +5 -3
  60. package/lib/asserts/number/index.js.map +1 -1
  61. package/lib/asserts/number/index.mjs +4 -2
  62. package/lib/asserts/string/index.d.mts +1 -1
  63. package/lib/asserts/string/index.d.ts +1 -1
  64. package/lib/asserts/string/index.js +5 -3
  65. package/lib/asserts/string/index.js.map +1 -1
  66. package/lib/asserts/string/index.mjs +4 -2
  67. package/lib/{chunk-GYLCPX6O.js → chunk-23R5R7PL.js} +3 -2
  68. package/lib/chunk-23R5R7PL.js.map +1 -0
  69. package/lib/{chunk-EVM26M2C.js → chunk-4PPMVVQY.js} +5 -4
  70. package/lib/chunk-4PPMVVQY.js.map +1 -0
  71. package/lib/chunk-56TWNROC.js +20 -0
  72. package/lib/chunk-56TWNROC.js.map +1 -0
  73. package/lib/{chunk-UWONIZJZ.mjs → chunk-5PXMSVTE.mjs} +6 -5
  74. package/lib/chunk-5PXMSVTE.mjs.map +1 -0
  75. package/lib/{chunk-B2R5S6OH.mjs → chunk-A2LPSUNQ.mjs} +3 -2
  76. package/lib/{chunk-B2R5S6OH.mjs.map → chunk-A2LPSUNQ.mjs.map} +1 -1
  77. package/lib/{chunk-EJCCIGXH.js → chunk-AGB5RWYD.js} +3 -2
  78. package/lib/chunk-AGB5RWYD.js.map +1 -0
  79. package/lib/{chunk-CJCIOMS7.mjs → chunk-DS2LUTTF.mjs} +6 -5
  80. package/lib/chunk-DS2LUTTF.mjs.map +1 -0
  81. package/lib/{chunk-UCHEFFWR.js → chunk-EI6TQG4L.js} +5 -4
  82. package/lib/chunk-EI6TQG4L.js.map +1 -0
  83. package/lib/chunk-ET2I4EXQ.mjs +18 -0
  84. package/lib/chunk-ET2I4EXQ.mjs.map +1 -0
  85. package/lib/chunk-FA3S35LQ.mjs +20 -0
  86. package/lib/chunk-FA3S35LQ.mjs.map +1 -0
  87. package/lib/{chunk-O646PJXY.mjs → chunk-FU5WAVRB.mjs} +3 -2
  88. package/lib/{chunk-O646PJXY.mjs.map → chunk-FU5WAVRB.mjs.map} +1 -1
  89. package/lib/chunk-HU5SDECP.js +29 -0
  90. package/lib/chunk-HU5SDECP.js.map +1 -0
  91. package/lib/{chunk-YJZXJKM4.mjs → chunk-J3EKIWPZ.mjs} +6 -5
  92. package/lib/chunk-J3EKIWPZ.mjs.map +1 -0
  93. package/lib/chunk-JCX2TB7E.js +13 -0
  94. package/lib/chunk-JCX2TB7E.js.map +1 -0
  95. package/lib/chunk-K7CDOU6F.js +13 -0
  96. package/lib/chunk-K7CDOU6F.js.map +1 -0
  97. package/lib/chunk-KALHMMEN.mjs +29 -0
  98. package/lib/chunk-KALHMMEN.mjs.map +1 -0
  99. package/lib/{chunk-5VZDHJKM.mjs → chunk-KGXWQ3XP.mjs} +3 -2
  100. package/lib/chunk-KGXWQ3XP.mjs.map +1 -0
  101. package/lib/chunk-MUXY6Q45.mjs +13 -0
  102. package/lib/chunk-MUXY6Q45.mjs.map +1 -0
  103. package/lib/chunk-SBNUNRI3.mjs +13 -0
  104. package/lib/chunk-SBNUNRI3.mjs.map +1 -0
  105. package/lib/chunk-TD3Y3IV3.js +13 -0
  106. package/lib/chunk-TD3Y3IV3.js.map +1 -0
  107. package/lib/chunk-UCY3HEYZ.mjs +13 -0
  108. package/lib/chunk-UCY3HEYZ.mjs.map +1 -0
  109. package/lib/{chunk-L7YFDMZU.js → chunk-WH7WJMFF.js} +5 -4
  110. package/lib/chunk-WH7WJMFF.js.map +1 -0
  111. package/lib/chunk-WLZZTIOV.js +18 -0
  112. package/lib/chunk-WLZZTIOV.js.map +1 -0
  113. package/lib/{chunk-DPXTSNEX.js → chunk-YPOEO3UF.js} +3 -2
  114. package/lib/chunk-YPOEO3UF.js.map +1 -0
  115. package/lib/index.d.mts +5 -0
  116. package/lib/index.d.ts +5 -0
  117. package/lib/index.js +64 -44
  118. package/lib/index.js.map +1 -1
  119. package/lib/index.mjs +78 -58
  120. package/package.json +12 -1
  121. package/lib/chunk-5VZDHJKM.mjs.map +0 -1
  122. package/lib/chunk-CJCIOMS7.mjs.map +0 -1
  123. package/lib/chunk-DPXTSNEX.js.map +0 -1
  124. package/lib/chunk-EJCCIGXH.js.map +0 -1
  125. package/lib/chunk-EVM26M2C.js.map +0 -1
  126. package/lib/chunk-GYLCPX6O.js.map +0 -1
  127. package/lib/chunk-KGNT5T35.mjs +0 -70
  128. package/lib/chunk-KGNT5T35.mjs.map +0 -1
  129. package/lib/chunk-L7YFDMZU.js.map +0 -1
  130. package/lib/chunk-TLLR2DXI.js +0 -70
  131. package/lib/chunk-TLLR2DXI.js.map +0 -1
  132. package/lib/chunk-UCHEFFWR.js.map +0 -1
  133. package/lib/chunk-UWONIZJZ.mjs.map +0 -1
  134. package/lib/chunk-YJZXJKM4.mjs.map +0 -1
@@ -1,70 +0,0 @@
1
- import {
2
- string
3
- } from "./chunk-YJZXJKM4.mjs";
4
- import {
5
- number
6
- } from "./chunk-CJCIOMS7.mjs";
7
- import {
8
- date
9
- } from "./chunk-O646PJXY.mjs";
10
- import {
11
- bigint
12
- } from "./chunk-UWONIZJZ.mjs";
13
- import {
14
- boolean
15
- } from "./chunk-5VZDHJKM.mjs";
16
-
17
- // src/asserts/coerce/index.ts
18
- var coerce = {
19
- /** Anything that is not already a string is passed through `String`. */
20
- string: () => string().transformBeforeValidation(
21
- (received) => received === null || typeof received === "string" ? received : String(received)
22
- ),
23
- /**
24
- * Anything that is not already a number is passed through `Number`. A value `Number` cannot read
25
- * becomes `NaN`, which `number()` rejects, so `'abc'` fails validation rather than passing as a
26
- * number.
27
- */
28
- number: () => number().transformBeforeValidation(
29
- (received) => received === null || typeof received === "number" ? received : Number(received)
30
- ),
31
- /**
32
- * Only the values that unambiguously mean a boolean are converted: the strings `'true'` and
33
- * `'false'` in any case, and the numbers `1` and `0`. Everything else is left for validation to
34
- * reject.
35
- *
36
- * Deliberately narrower than passing the value through `Boolean`, which would accept every input
37
- * and quietly read `'false'` as `true`.
38
- */
39
- boolean: () => boolean().transformBeforeValidation((received) => {
40
- if (typeof received === "string") {
41
- const lowered = received.toLowerCase();
42
- if (lowered === "true") return true;
43
- if (lowered === "false") return false;
44
- }
45
- if (received === 1) return true;
46
- if (received === 0) return false;
47
- return received;
48
- }),
49
- /** `BigInt` throws on a value it cannot read, so the original is kept for validation to reject. */
50
- bigint: () => bigint().transformBeforeValidation((received) => {
51
- if (received === null || typeof received === "bigint") return received;
52
- try {
53
- return BigInt(received);
54
- } catch {
55
- return received;
56
- }
57
- }),
58
- /**
59
- * Anything that is not already a Date is passed through `new Date`. An unreadable value becomes an
60
- * invalid Date, which `date()` rejects.
61
- */
62
- date: () => date().transformBeforeValidation(
63
- (received) => received === null || received instanceof Date ? received : new Date(received)
64
- )
65
- };
66
-
67
- export {
68
- coerce
69
- };
70
- //# sourceMappingURL=chunk-KGNT5T35.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/asserts/coerce/index.ts"],"sourcesContent":["import { WithBGuardType, WithInput } from '../../commonTypes';\nimport { CommonSchema } from '../../core';\nimport { bigint } from '../bigint/index';\nimport { boolean } from '../boolean/index';\nimport { date } from '../date/index';\nimport { number } from '../number/index';\nimport { string } from '../string/index';\n\n/**\n * A coercing transform must never throw: it runs before validation, and throwing would replace a\n * clear validation error with an unexplained failure. Anything it cannot convert is passed through\n * unchanged so that validation reports the type problem itself.\n */\ntype Coerced<S, In> = WithInput<S, In>;\n\n/**\n * Converts the received value before validating it, for input that does not arrive already typed —\n * query strings, form data, environment variables.\n *\n * Each of these accepts `unknown` and reports that in its inferred input type, while the output type\n * is unchanged. `null` is left alone, so `nullable()` still decides whether it is allowed rather than\n * being turned into the string `'null'` or the number `0`.\n *\n * @example\n * const querySchema = object({ page: coerce.number().default(1), q: coerce.string() });\n * parseOrFail(querySchema, { page: '3', q: 'shoes' }); // { page: 3, q: 'shoes' }\n */\nexport const coerce = {\n /** Anything that is not already a string is passed through `String`. */\n string: (): Coerced<WithBGuardType<CommonSchema, string>, unknown> =>\n string().transformBeforeValidation<unknown>((received) =>\n received === null || typeof received === 'string' ? (received as string) : String(received),\n ) as unknown as Coerced<WithBGuardType<CommonSchema, string>, unknown>,\n\n /**\n * Anything that is not already a number is passed through `Number`. A value `Number` cannot read\n * becomes `NaN`, which `number()` rejects, so `'abc'` fails validation rather than passing as a\n * number.\n */\n number: (): Coerced<WithBGuardType<CommonSchema, number>, unknown> =>\n number().transformBeforeValidation<unknown>((received) =>\n received === null || typeof received === 'number' ? (received as number) : Number(received),\n ) as unknown as Coerced<WithBGuardType<CommonSchema, number>, unknown>,\n\n /**\n * Only the values that unambiguously mean a boolean are converted: the strings `'true'` and\n * `'false'` in any case, and the numbers `1` and `0`. Everything else is left for validation to\n * reject.\n *\n * Deliberately narrower than passing the value through `Boolean`, which would accept every input\n * and quietly read `'false'` as `true`.\n */\n boolean: (): Coerced<WithBGuardType<CommonSchema, boolean>, unknown> =>\n boolean().transformBeforeValidation<unknown>((received) => {\n if (typeof received === 'string') {\n const lowered = received.toLowerCase();\n if (lowered === 'true') return true;\n if (lowered === 'false') return false;\n }\n\n if (received === 1) return true;\n if (received === 0) return false;\n\n return received as boolean;\n }) as unknown as Coerced<WithBGuardType<CommonSchema, boolean>, unknown>,\n\n /** `BigInt` throws on a value it cannot read, so the original is kept for validation to reject. */\n bigint: (): Coerced<WithBGuardType<CommonSchema, bigint>, unknown> =>\n bigint().transformBeforeValidation<unknown>((received) => {\n if (received === null || typeof received === 'bigint') return received as bigint;\n\n try {\n return BigInt(received as string | number);\n } catch {\n return received as bigint;\n }\n }) as unknown as Coerced<WithBGuardType<CommonSchema, bigint>, unknown>,\n\n /**\n * Anything that is not already a Date is passed through `new Date`. An unreadable value becomes an\n * invalid Date, which `date()` rejects.\n */\n date: (): Coerced<WithBGuardType<CommonSchema, Date>, unknown> =>\n date().transformBeforeValidation<unknown>((received) =>\n received === null || received instanceof Date ? (received as Date) : new Date(received as string),\n ) as unknown as Coerced<WithBGuardType<CommonSchema, Date>, unknown>,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AA2BO,IAAM,SAAS;AAAA;AAAA,EAEpB,QAAQ,MACN,OAAO,EAAE;AAAA,IAAmC,CAAC,aAC3C,aAAa,QAAQ,OAAO,aAAa,WAAY,WAAsB,OAAO,QAAQ;AAAA,EAC5F;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOF,QAAQ,MACN,OAAO,EAAE;AAAA,IAAmC,CAAC,aAC3C,aAAa,QAAQ,OAAO,aAAa,WAAY,WAAsB,OAAO,QAAQ;AAAA,EAC5F;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUF,SAAS,MACP,QAAQ,EAAE,0BAAmC,CAAC,aAAa;AACzD,QAAI,OAAO,aAAa,UAAU;AAChC,YAAM,UAAU,SAAS,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UAAA,CAAW,CAAA;AAChB,IAAA,MAAM,KAAA,EAAO,IAAA,CAAK,MAAA,CAAO,sCAAA,aAAqB,CAAC,CAAA;AAC/C,IAAA,IAAA,CAAK,MAAA,EAAQ,IAAA;AACb,IAAA,6CAAA,IAAe,EAAM,CAAA,EAAA;AACd,IAAA;AACT,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYqC,EAAA;AAC9B,IAAA;AACW,IAAA;AACE,IAAA;AACL,IAAA;AACb,IAAA;AACE,MAAA;AACmB,MAAA;AACrB,IAAA;AACO,IAAA;AACT,EAAA;AAAA;AAAA;AAAA;AAAA;AAMqB,EAAA;AACG,IAAA;AACxB,EAAA;AACF;ADF0B;AACA;AACA;AACA","file":"/home/runner/work/bguard/bguard/lib/chunk-L7YFDMZU.js","sourcesContent":[null,"import { WithBGuardType } from '../../commonTypes';\nimport { BuildSchemaError } from '../../exceptions';\nimport { ONLY_ONCE } from '../../helpers/constants';\nimport { CommonSchema } from '../../core';\nimport { _setStrictType } from '../../helpers/setStrictType';\nimport { equalTo } from '../mix/equalTo';\nimport { oneOfValues } from '../mix/oneOfValues';\n\n/**\n * @description - Creates a new schema for validating bigint values.\n * @returns {WithBGuardType<BigIntSchema, bigint>} A new instance of `BigIntSchema` for validating bigints.\n * @example\n * const schema = bigint();\n * parseOrFail(schema, 42n); // Validates successfully\n * parseOrFail(schema, 42); // Throws a validation error\n * parseOrFail(schema, '42'); // Throws a validation error\n *\n * @instance Of BigIntSchema\n */\nexport function bigint(): WithBGuardType<BigIntSchema, bigint> {\n return new BigIntSchema({ type: ['bigint'], requiredValidations: [] }) as WithBGuardType<BigIntSchema, bigint>;\n}\n\nclass BigIntSchema extends CommonSchema {\n protected _bigint = 1;\n private limit: boolean | undefined;\n\n /**\n * @method equalTo\n * @description Restricts the schema to exactly match the specified value and infers the literal value as the TypeScript type.\n * @param expectedValue - The value that the schema must exactly match.\n * @returns A new schema restricted to the specified value, with the literal value inferred as the TypeScript type\n * @example\n * bigint().equalTo(42n); // Infers the type 42n\n *\n * @public\n */\n public equalTo<Y extends bigint>(expectedValue: Y): WithBGuardType<this, Y> {\n this.defaultValueCheck();\n this.limitGuard();\n const next = this.custom(equalTo(expectedValue));\n next.limit = true;\n _setStrictType(next, `${expectedValue}n`);\n return next as WithBGuardType<this, Y>;\n }\n\n /**\n * @method oneOfValues\n * @description Restricts the schema to match one of the specified values and infers the union of those values as the TypeScript type.\n * @param expectedValues - An array of values that the schema can match.\n * @returns A new schema restricted to one of the specified values, with the union of those values inferred as the TypeScript type.\n * @example\n * bigint().oneOfValues([5n, 7n]); // Infers the type 5n | 7n\n *\n * @public\n */\n public oneOfValues<Y extends bigint>(expectedValue: Y[]): WithBGuardType<this, Y> {\n this.defaultValueCheck();\n this.limitGuard();\n const next = this.custom(oneOfValues(expectedValue));\n next.limit = true;\n _setStrictType(\n next,\n expectedValue.map((el) => `${el}n`),\n );\n return next as WithBGuardType<this, Y>;\n }\n\n /**\n * Reads the once-only flag without setting it. The flag belongs on the schema that `custom`\n * returns, not on the one it was derived from.\n */\n private limitGuard() {\n if (this.limit) throw new BuildSchemaError(ONLY_ONCE);\n }\n}\n"]}
@@ -1,70 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkUCHEFFWRjs = require('./chunk-UCHEFFWR.js');
4
-
5
-
6
- var _chunkEVM26M2Cjs = require('./chunk-EVM26M2C.js');
7
-
8
-
9
- var _chunkDPXTSNEXjs = require('./chunk-DPXTSNEX.js');
10
-
11
-
12
- var _chunkL7YFDMZUjs = require('./chunk-L7YFDMZU.js');
13
-
14
-
15
- var _chunkGYLCPX6Ojs = require('./chunk-GYLCPX6O.js');
16
-
17
- // src/asserts/coerce/index.ts
18
- var coerce = {
19
- /** Anything that is not already a string is passed through `String`. */
20
- string: () => _chunkUCHEFFWRjs.string.call(void 0, ).transformBeforeValidation(
21
- (received) => received === null || typeof received === "string" ? received : String(received)
22
- ),
23
- /**
24
- * Anything that is not already a number is passed through `Number`. A value `Number` cannot read
25
- * becomes `NaN`, which `number()` rejects, so `'abc'` fails validation rather than passing as a
26
- * number.
27
- */
28
- number: () => _chunkEVM26M2Cjs.number.call(void 0, ).transformBeforeValidation(
29
- (received) => received === null || typeof received === "number" ? received : Number(received)
30
- ),
31
- /**
32
- * Only the values that unambiguously mean a boolean are converted: the strings `'true'` and
33
- * `'false'` in any case, and the numbers `1` and `0`. Everything else is left for validation to
34
- * reject.
35
- *
36
- * Deliberately narrower than passing the value through `Boolean`, which would accept every input
37
- * and quietly read `'false'` as `true`.
38
- */
39
- boolean: () => _chunkGYLCPX6Ojs.boolean.call(void 0, ).transformBeforeValidation((received) => {
40
- if (typeof received === "string") {
41
- const lowered = received.toLowerCase();
42
- if (lowered === "true") return true;
43
- if (lowered === "false") return false;
44
- }
45
- if (received === 1) return true;
46
- if (received === 0) return false;
47
- return received;
48
- }),
49
- /** `BigInt` throws on a value it cannot read, so the original is kept for validation to reject. */
50
- bigint: () => _chunkL7YFDMZUjs.bigint.call(void 0, ).transformBeforeValidation((received) => {
51
- if (received === null || typeof received === "bigint") return received;
52
- try {
53
- return BigInt(received);
54
- } catch (e) {
55
- return received;
56
- }
57
- }),
58
- /**
59
- * Anything that is not already a Date is passed through `new Date`. An unreadable value becomes an
60
- * invalid Date, which `date()` rejects.
61
- */
62
- date: () => _chunkDPXTSNEXjs.date.call(void 0, ).transformBeforeValidation(
63
- (received) => received === null || received instanceof Date ? received : new Date(received)
64
- )
65
- };
66
-
67
-
68
-
69
- exports.coerce = coerce;
70
- //# sourceMappingURL=chunk-TLLR2DXI.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/bguard/bguard/lib/chunk-TLLR2DXI.js","../src/asserts/coerce/index.ts"],"names":[],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4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IAAa,KAAA,GAAQ,OAAO,SAAA,IAAa,QAAA,EAAU,OAAO,QAAA;AAE9D,IAAA,IAAI;AACF,MAAA,OAAO,MAAA,CAAO,QAA2B,CAAA;AAAA,IAC3C,EAAA,UAAQ;AACN,MAAA,OAAO,QAAA;AAAA,IACT;AAAA,EACF,CAAC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMH,IAAA,EAAM,CAAA,EAAA,GACJ,mCAAA,CAAK,CAAE,yBAAA;AAAA,IAAmC,CAAC,QAAA,EAAA,GACzC,SAAA,IAAa,KAAA,GAAQ,SAAA,WAAoB,KAAA,EAAQ,SAAA,EAAoB,IAAI,IAAA,CAAK,QAAkB;AAAA,EAClG;AACJ,CAAA;ADrBA;AACA;AACE;AACF,wBAAC","file":"/home/runner/work/bguard/bguard/lib/chunk-TLLR2DXI.js","sourcesContent":[null,"import { WithBGuardType, WithInput } from '../../commonTypes';\nimport { CommonSchema } from '../../core';\nimport { bigint } from '../bigint/index';\nimport { boolean } from '../boolean/index';\nimport { date } from '../date/index';\nimport { number } from '../number/index';\nimport { string } from '../string/index';\n\n/**\n * A coercing transform must never throw: it runs before validation, and throwing would replace a\n * clear validation error with an unexplained failure. Anything it cannot convert is passed through\n * unchanged so that validation reports the type problem itself.\n */\ntype Coerced<S, In> = WithInput<S, In>;\n\n/**\n * Converts the received value before validating it, for input that does not arrive already typed —\n * query strings, form data, environment variables.\n *\n * Each of these accepts `unknown` and reports that in its inferred input type, while the output type\n * is unchanged. `null` is left alone, so `nullable()` still decides whether it is allowed rather than\n * being turned into the string `'null'` or the number `0`.\n *\n * @example\n * const querySchema = object({ page: coerce.number().default(1), q: coerce.string() });\n * parseOrFail(querySchema, { page: '3', q: 'shoes' }); // { page: 3, q: 'shoes' }\n */\nexport const coerce = {\n /** Anything that is not already a string is passed through `String`. */\n string: (): Coerced<WithBGuardType<CommonSchema, string>, unknown> =>\n string().transformBeforeValidation<unknown>((received) =>\n received === null || typeof received === 'string' ? (received as string) : String(received),\n ) as unknown as Coerced<WithBGuardType<CommonSchema, string>, unknown>,\n\n /**\n * Anything that is not already a number is passed through `Number`. A value `Number` cannot read\n * becomes `NaN`, which `number()` rejects, so `'abc'` fails validation rather than passing as a\n * number.\n */\n number: (): Coerced<WithBGuardType<CommonSchema, number>, unknown> =>\n number().transformBeforeValidation<unknown>((received) =>\n received === null || typeof received === 'number' ? (received as number) : Number(received),\n ) as unknown as Coerced<WithBGuardType<CommonSchema, number>, unknown>,\n\n /**\n * Only the values that unambiguously mean a boolean are converted: the strings `'true'` and\n * `'false'` in any case, and the numbers `1` and `0`. Everything else is left for validation to\n * reject.\n *\n * Deliberately narrower than passing the value through `Boolean`, which would accept every input\n * and quietly read `'false'` as `true`.\n */\n boolean: (): Coerced<WithBGuardType<CommonSchema, boolean>, unknown> =>\n boolean().transformBeforeValidation<unknown>((received) => {\n if (typeof received === 'string') {\n const lowered = received.toLowerCase();\n if (lowered === 'true') return true;\n if (lowered === 'false') return false;\n }\n\n if (received === 1) return true;\n if (received === 0) return false;\n\n return received as boolean;\n }) as unknown as Coerced<WithBGuardType<CommonSchema, boolean>, unknown>,\n\n /** `BigInt` throws on a value it cannot read, so the original is kept for validation to reject. */\n bigint: (): Coerced<WithBGuardType<CommonSchema, bigint>, unknown> =>\n bigint().transformBeforeValidation<unknown>((received) => {\n if (received === null || typeof received === 'bigint') return received as bigint;\n\n try {\n return BigInt(received as string | number);\n } catch {\n return received as bigint;\n }\n }) as unknown as Coerced<WithBGuardType<CommonSchema, bigint>, unknown>,\n\n /**\n * Anything that is not already a Date is passed through `new Date`. An unreadable value becomes an\n * invalid Date, which `date()` rejects.\n */\n date: (): Coerced<WithBGuardType<CommonSchema, Date>, unknown> =>\n date().transformBeforeValidation<unknown>((received) =>\n received === null || received instanceof Date ? (received as Date) : new Date(received as string),\n ) as unknown as Coerced<WithBGuardType<CommonSchema, Date>, unknown>,\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/bguard/bgu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,IACnD,CAAA;AACA,IAAA,OAAO,IAAA;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA,EAMQ,UAAA,CAAA,EAAa;AACnB,IAAA,GAAA,CAAI,IAAA,CAAK,KAAA,EAAO,MAAM,IAAI,sCAAA,CAAiB,0BAAS,CAAA;AAAA,EACtD;AACF,UAAA;ADDA;AACA;AACE;AACF,wBAAC","file":"/home/runner/work/bguard/bguard/lib/chunk-UCHEFFWR.js","sourcesContent":[null,"import { WithBGuardType } from '../../commonTypes';\nimport { BuildSchemaError } from '../../exceptions';\nimport { ONLY_ONCE } from '../../helpers/constants';\nimport { CommonSchema } from '../../core';\nimport { _setStrictType } from '../../helpers/setStrictType';\nimport { _quoteStringLiteral } from '../../helpers/quoteStringLiteral';\nimport { equalTo } from '../mix/equalTo';\nimport { oneOfValues } from '../mix/oneOfValues';\n\n/**\n * @description Creates a new schema for validating string values.\n * @returns {WithBGuardType<StringSchema, string>} A new instance of `StringSchema` for validating strings.\n * @example\n * const schema = string();\n * parseOrFail(schema, 'hello'); // Validates successfully\n * parseOrFail(schema, 123); // Throws a validation error\n *\n * @instance Of StringSchema\n */\nexport function string(): WithBGuardType<StringSchema, string> {\n return new StringSchema({ type: ['string'], requiredValidations: [] }) as WithBGuardType<StringSchema, string>;\n}\n\nclass StringSchema extends CommonSchema {\n protected _string = 1;\n private limit: boolean | undefined;\n\n /**\n * @method equalTo\n * @description Restricts the schema to exactly match the specified value and infers the literal value as the TypeScript type.\n * @param expectedValue - The value that the schema must exactly match.\n * @returns A new schema restricted to the specified value, with the literal value inferred as the TypeScript type\n * @example\n * string().equalTo('hello'); // Infers the type 'hello'\n *\n * @public\n */\n public equalTo<Y extends string>(expectedValue: Y): WithBGuardType<this, Y> {\n this.limitGuard();\n // custom() returns the copy, so the strict type and the once-only flag are set on it. Setting\n // them on `this` first would refine the schema this one was derived from.\n const next = this.custom(equalTo(expectedValue));\n next.limit = true;\n _setStrictType(next, _quoteStringLiteral(expectedValue));\n return next as WithBGuardType<this, Y>;\n }\n\n /**\n * @method oneOfValues\n * @description Restricts the schema to match one of the specified values and infers the union of those values as the TypeScript type.\n * @param expectedValues - An array of values that the schema can match.\n * @returns A new schema restricted to one of the specified values, with the union of those values inferred as the TypeScript type.\n * @example\n * string().oneOfValues(['foo', 'bar']); // Infers the type 'foo' | 'bar'\n *\n * @public\n */\n public oneOfValues<Y extends string>(expectedValue: Y[]): WithBGuardType<this, Y> {\n this.limitGuard();\n const next = this.custom(oneOfValues(expectedValue));\n next.limit = true;\n _setStrictType(\n next,\n expectedValue.map((el) => _quoteStringLiteral(el)),\n );\n return next as WithBGuardType<this, Y>;\n }\n\n /**\n * Reads the once-only flag without setting it. The flag belongs on the schema that `custom`\n * returns, not on the one it was derived from.\n */\n private limitGuard() {\n if (this.limit) throw new BuildSchemaError(ONLY_ONCE);\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/asserts/bigint/index.ts"],"sourcesContent":["import { WithBGuardType } from '../../commonTypes';\nimport { BuildSchemaError } from '../../exceptions';\nimport { ONLY_ONCE } from '../../helpers/constants';\nimport { CommonSchema } from '../../core';\nimport { _setStrictType } from '../../helpers/setStrictType';\nimport { equalTo } from '../mix/equalTo';\nimport { oneOfValues } from '../mix/oneOfValues';\n\n/**\n * @description - Creates a new schema for validating bigint values.\n * @returns {WithBGuardType<BigIntSchema, bigint>} A new instance of `BigIntSchema` for validating bigints.\n * @example\n * const schema = bigint();\n * parseOrFail(schema, 42n); // Validates successfully\n * parseOrFail(schema, 42); // Throws a validation error\n * parseOrFail(schema, '42'); // Throws a validation error\n *\n * @instance Of BigIntSchema\n */\nexport function bigint(): WithBGuardType<BigIntSchema, bigint> {\n return new BigIntSchema({ type: ['bigint'], requiredValidations: [] }) as WithBGuardType<BigIntSchema, bigint>;\n}\n\nclass BigIntSchema extends CommonSchema {\n protected _bigint = 1;\n private limit: boolean | undefined;\n\n /**\n * @method equalTo\n * @description Restricts the schema to exactly match the specified value and infers the literal value as the TypeScript type.\n * @param expectedValue - The value that the schema must exactly match.\n * @returns A new schema restricted to the specified value, with the literal value inferred as the TypeScript type\n * @example\n * bigint().equalTo(42n); // Infers the type 42n\n *\n * @public\n */\n public equalTo<Y extends bigint>(expectedValue: Y): WithBGuardType<this, Y> {\n this.defaultValueCheck();\n this.limitGuard();\n const next = this.custom(equalTo(expectedValue));\n next.limit = true;\n _setStrictType(next, `${expectedValue}n`);\n return next as WithBGuardType<this, Y>;\n }\n\n /**\n * @method oneOfValues\n * @description Restricts the schema to match one of the specified values and infers the union of those values as the TypeScript type.\n * @param expectedValues - An array of values that the schema can match.\n * @returns A new schema restricted to one of the specified values, with the union of those values inferred as the TypeScript type.\n * @example\n * bigint().oneOfValues([5n, 7n]); // Infers the type 5n | 7n\n *\n * @public\n */\n public oneOfValues<Y extends bigint>(expectedValue: Y[]): WithBGuardType<this, Y> {\n this.defaultValueCheck();\n this.limitGuard();\n const next = this.custom(oneOfValues(expectedValue));\n next.limit = true;\n _setStrictType(\n next,\n expectedValue.map((el) => `${el}n`),\n );\n return next as WithBGuardType<this, Y>;\n }\n\n /**\n * Reads the once-only flag without setting it. The flag belongs on the schema that `custom`\n * returns, not on the one it was derived from.\n */\n private limitGuard() {\n if (this.limit) throw new BuildSchemaError(ONLY_ONCE);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAmBO,SAAS,SAA+C;AAC7D,SAAO,IAAI,aAAa,EAAE,MAAM,CAAC,QAAQ,GAAG,qBAAqB,CAAC,EAAE,CAAC;AACvE;AAEA,IAAM,eAAN,cAA2B,aAAa;AAAA,EAC5B,UAAU;AAAA,EACZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYD,QAA0B,eAA2C;AAC1E,SAAK,kBAAkB;AACvB,SAAK,WAAW;AAChB,UAAM,OAAO,KAAK,OAAO,QAAQ,aAAa,CAAC;AAC/C,SAAK,QAAQ;AACb,mBAAe,MAAM,GAAG,aAAa,GAAG;AACxC,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYO,YAA8B,eAA6C;AAChF,SAAK,kBAAkB;AACvB,SAAK,WAAW;AAChB,UAAM,OAAO,KAAK,OAAO,YAAY,aAAa,CAAC;AACnD,SAAK,QAAQ;AACb;AAAA,MACE;AAAA,MACA,cAAc,IAAI,CAAC,OAAO,GAAG,EAAE,GAAG;AAAA,IACpC;AACA,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA,EAMQ,aAAa;AACnB,QAAI,KAAK,MAAO,OAAM,IAAI,iBAAiB,SAAS;AAAA,EACtD;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/asserts/string/index.ts"],"sourcesContent":["import { WithBGuardType } from '../../commonTypes';\nimport { BuildSchemaError } from '../../exceptions';\nimport { ONLY_ONCE } from '../../helpers/constants';\nimport { CommonSchema } from '../../core';\nimport { _setStrictType } from '../../helpers/setStrictType';\nimport { _quoteStringLiteral } from '../../helpers/quoteStringLiteral';\nimport { equalTo } from '../mix/equalTo';\nimport { oneOfValues } from '../mix/oneOfValues';\n\n/**\n * @description Creates a new schema for validating string values.\n * @returns {WithBGuardType<StringSchema, string>} A new instance of `StringSchema` for validating strings.\n * @example\n * const schema = string();\n * parseOrFail(schema, 'hello'); // Validates successfully\n * parseOrFail(schema, 123); // Throws a validation error\n *\n * @instance Of StringSchema\n */\nexport function string(): WithBGuardType<StringSchema, string> {\n return new StringSchema({ type: ['string'], requiredValidations: [] }) as WithBGuardType<StringSchema, string>;\n}\n\nclass StringSchema extends CommonSchema {\n protected _string = 1;\n private limit: boolean | undefined;\n\n /**\n * @method equalTo\n * @description Restricts the schema to exactly match the specified value and infers the literal value as the TypeScript type.\n * @param expectedValue - The value that the schema must exactly match.\n * @returns A new schema restricted to the specified value, with the literal value inferred as the TypeScript type\n * @example\n * string().equalTo('hello'); // Infers the type 'hello'\n *\n * @public\n */\n public equalTo<Y extends string>(expectedValue: Y): WithBGuardType<this, Y> {\n this.limitGuard();\n // custom() returns the copy, so the strict type and the once-only flag are set on it. Setting\n // them on `this` first would refine the schema this one was derived from.\n const next = this.custom(equalTo(expectedValue));\n next.limit = true;\n _setStrictType(next, _quoteStringLiteral(expectedValue));\n return next as WithBGuardType<this, Y>;\n }\n\n /**\n * @method oneOfValues\n * @description Restricts the schema to match one of the specified values and infers the union of those values as the TypeScript type.\n * @param expectedValues - An array of values that the schema can match.\n * @returns A new schema restricted to one of the specified values, with the union of those values inferred as the TypeScript type.\n * @example\n * string().oneOfValues(['foo', 'bar']); // Infers the type 'foo' | 'bar'\n *\n * @public\n */\n public oneOfValues<Y extends string>(expectedValue: Y[]): WithBGuardType<this, Y> {\n this.limitGuard();\n const next = this.custom(oneOfValues(expectedValue));\n next.limit = true;\n _setStrictType(\n next,\n expectedValue.map((el) => _quoteStringLiteral(el)),\n );\n return next as WithBGuardType<this, Y>;\n }\n\n /**\n * Reads the once-only flag without setting it. The flag belongs on the schema that `custom`\n * returns, not on the one it was derived from.\n */\n private limitGuard() {\n if (this.limit) throw new BuildSchemaError(ONLY_ONCE);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmBO,SAAS,SAA+C;AAC7D,SAAO,IAAI,aAAa,EAAE,MAAM,CAAC,QAAQ,GAAG,qBAAqB,CAAC,EAAE,CAAC;AACvE;AAEA,IAAM,eAAN,cAA2B,aAAa;AAAA,EAC5B,UAAU;AAAA,EACZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYD,QAA0B,eAA2C;AAC1E,SAAK,WAAW;AAGhB,UAAM,OAAO,KAAK,OAAO,QAAQ,aAAa,CAAC;AAC/C,SAAK,QAAQ;AACb,mBAAe,MAAM,oBAAoB,aAAa,CAAC;AACvD,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYO,YAA8B,eAA6C;AAChF,SAAK,WAAW;AAChB,UAAM,OAAO,KAAK,OAAO,YAAY,aAAa,CAAC;AACnD,SAAK,QAAQ;AACb;AAAA,MACE;AAAA,MACA,cAAc,IAAI,CAAC,OAAO,oBAAoB,EAAE,CAAC;AAAA,IACnD;AACA,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA,EAMQ,aAAa;AACnB,QAAI,KAAK,MAAO,OAAM,IAAI,iBAAiB,SAAS;AAAA,EACtD;AACF;","names":[]}