@guru-ai-product/ai-product-kit 0.2.251117213210 → 0.2.251118120602

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 (966) hide show
  1. package/package.json +1 -1
  2. package/skills/aipk_aso-new-release/GURU_AI.md +4 -4
  3. package/skills/aipk_development/GURU_AI.md +3 -3
  4. package/skills/aipk_format-requirement-pages-with-design/GURU_AI.md +3 -3
  5. package/skills/aipk_init_project/GURU_AI.md +5 -5
  6. package/skills/aipk_initiative-planning/GURU_AI.md +7 -7
  7. package/skills/aipk_requirements-changes/GURU_AI.md +6 -6
  8. package/skills/aipk_requirements-documentation/GURU_AI.md +15 -15
  9. package/skills/aipk_requirements-intake/GURU_AI.md +9 -9
  10. package/skills/aipk_skill_generate/GURU_AI.md +5 -5
  11. package/skills/aipk_tool_prompts/GURU_AI.md +8 -8
  12. package/skills/aipk_update-requirements-from-design/GURU_AI.md +6 -116
  13. package/mcp/.doc_cache/04980c3595edbf2d_SKILL.md +0 -218
  14. package/mcp/.doc_cache/04e80f12d73851a2_/346/214/207/345/215/227/346/226/207/346/241/243/346/240/207/345/207/206/346/250/241/346/235/277.md +0 -59
  15. package/mcp/.doc_cache/07cc092c31fd7015_/345/267/245/345/205/267/344/275/277/347/224/250/346/214/207/345/215/227/346/250/241/346/235/277.md +0 -106
  16. package/mcp/.doc_cache/09ac9834a831e8b5_/346/212/200/346/234/257/346/226/271/346/241/210/350/257/204/344/274/260/344/270/216/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220/346/250/241/346/235/277.md +0 -72
  17. package/mcp/.doc_cache/0c0570b87cf4a98a_/351/234/200/346/261/202/350/277/255/344/273/243/346/250/241/346/235/277.md +0 -821
  18. package/mcp/.doc_cache/0c284fc4be48dbd3_/346/267/261/345/272/246/347/224/250/346/210/267/350/241/214/344/270/272/344/270/216/351/234/200/346/261/202/346/264/236/345/257/237/346/250/241/346/235/277.md +0 -59
  19. package/mcp/.doc_cache/0da74fe7b9aad548_K12/346/225/260/345/255/246/345/255/246/344/271/240/345/272/224/347/224/250/346/241/210/344/276/213.md +0 -371
  20. package/mcp/.doc_cache/1546780035ed893b_Draft_/344/272/247/345/223/201/351/234/200/346/261/202/350/215/211/347/250/277.md +0 -60
  21. package/mcp/.doc_cache/16d5f6b79f02c65e_/351/234/200/346/261/202/350/277/255/344/273/243/347/264/242/345/274/225.md +0 -30
  22. package/mcp/.doc_cache/1c631acd2940588e_index.md +0 -83
  23. package/mcp/.doc_cache/1e4a829f0abddb00_/344/272/247/345/223/201/350/247/204/345/210/222/346/250/241/346/235/277.md +0 -322
  24. package/mcp/.doc_cache/24f00280e7b9b2c7_index.md +0 -83
  25. package/mcp/.doc_cache/2767e2d4cd6afd5c_/345/225/206/344/270/232/345/214/226/350/247/204/345/210/222/346/250/241/346/235/277.md +0 -201
  26. package/mcp/.doc_cache/276d12074fd7af7d_SKILL.md +0 -243
  27. package/mcp/.doc_cache/2b6b35389546c3b9_SKILL.md +0 -407
  28. package/mcp/.doc_cache/2f45cddfb05ac32c_/351/234/200/346/261/202/350/277/255/344/273/243/347/264/242/345/274/225.md +0 -30
  29. package/mcp/.doc_cache/3086c6d32a0393da_Draft_/347/224/250/346/210/267/346/227/205/347/250/213/350/215/211/347/250/277.md +0 -84
  30. package/mcp/.doc_cache/33cd96cf79c86eaa_K12/346/225/260/345/255/246/345/255/246/344/271/240/345/272/224/347/224/250/346/241/210/344/276/213.md +0 -371
  31. package/mcp/.doc_cache/341909c063335dd2_/351/234/200/346/261/202/345/217/230/345/212/250/350/257/264/346/230/216/347/224/237/346/210/220Prompt.md +0 -349
  32. package/mcp/.doc_cache/3e0dfd0a1b9f6ce7_/344/272/247/345/223/201/351/234/200/346/261/202/345/217/221/347/216/260/344/270/216/351/252/214/350/257/201/346/250/241/346/235/277.md +0 -53
  33. package/mcp/.doc_cache/3eab19b804522d23_SKILL.md +0 -407
  34. package/mcp/.doc_cache/4b671afde6bb1fa8_/351/234/200/346/261/202/345/217/230/345/212/250/350/257/264/346/230/216/347/224/237/346/210/220/346/214/207/345/215/227.md +0 -292
  35. package/mcp/.doc_cache/4c780724e27f6f94_/351/234/200/346/261/202/350/277/255/344/273/243/346/250/241/346/235/277.md +0 -821
  36. package/mcp/.doc_cache/563de023ffa4a630_/345/237/213/347/202/271/350/247/204/350/214/203/346/226/207/346/241/243.md +0 -372
  37. package/mcp/.doc_cache/56975fb92532ee87_2_/345/212/237/350/203/275/351/234/200/346/261/202.md +0 -67
  38. package/mcp/.doc_cache/5a67e1c18353cfca_/345/270/202/345/234/272/346/234/272/344/274/232/350/257/204/344/274/260/344/270/216/347/253/236/344/272/211/345/210/206/346/236/220/346/250/241/346/235/277.md +0 -53
  39. package/mcp/.doc_cache/5b8ba3d67e39371a_SKILL.md +0 -930
  40. package/mcp/.doc_cache/5b91334295d6ad31_SKILL.md +0 -588
  41. package/mcp/.doc_cache/609688b8b4332a01_/351/234/200/346/261/202/345/217/230/345/212/250/350/257/264/346/230/216/346/226/207/346/241/243/346/250/241/346/235/277.md +0 -576
  42. package/mcp/.doc_cache/61a0859a11a562ca_3_/345/225/206/344/270/232/345/214/226/347/255/226/347/225/245.md +0 -131
  43. package/mcp/.doc_cache/6643f4d546c6a03c_/346/267/261/345/272/246/347/224/250/346/210/267/350/241/214/344/270/272/344/270/216/351/234/200/346/261/202/346/264/236/345/257/237/346/250/241/346/235/277.md +0 -59
  44. package/mcp/.doc_cache/674c69479a90ad15_4_/347/224/250/346/210/267/347/225/214/351/235/242/344/270/216/344/275/223/351/252/214.md +0 -665
  45. package/mcp/.doc_cache/674f8b285658055d_/345/270/202/345/234/272/344/270/216/345/225/206/344/270/232/345/210/206/346/236/220/346/250/241/346/235/277.md +0 -176
  46. package/mcp/.doc_cache/6cfccfda6b0e7641_SWOT/345/210/206/346/236/220/346/250/241/346/235/277.md +0 -381
  47. package/mcp/.doc_cache/6fbc13740044659b_1_/344/272/247/345/223/201/345/256/232/344/275/215/344/270/216/345/210/206/346/236/220.md +0 -86
  48. package/mcp/.doc_cache/7842a4e7fe7a3b91_/346/212/200/346/234/257/350/247/204/345/210/222/346/250/241/346/235/277.md +0 -314
  49. package/mcp/.doc_cache/7db63a8354bf8037_2_/345/212/237/350/203/275/351/234/200/346/261/202.md +0 -67
  50. package/mcp/.doc_cache/81528b4e0b12a881_SKILL.md +0 -196
  51. package/mcp/.doc_cache/83d17bdb48d30903_4_/347/224/250/346/210/267/347/225/214/351/235/242/344/270/216/344/275/223/351/252/214.md +0 -665
  52. package/mcp/.doc_cache/88e1d483f18abd02_/345/237/213/347/202/271/350/247/204/350/214/203/346/226/207/346/241/243.md +0 -372
  53. package/mcp/.doc_cache/8f420425062dcb93_SWOT/345/210/206/346/236/220/346/250/241/346/235/277.md +0 -381
  54. package/mcp/.doc_cache/8f981c56b3d4b17d_/345/225/206/344/270/232/345/214/226/350/247/204/345/210/222/346/250/241/346/235/277.md +0 -201
  55. package/mcp/.doc_cache/a3328dcce1521943_/345/270/202/345/234/272/344/270/216/345/225/206/344/270/232/345/210/206/346/236/220/346/250/241/346/235/277.md +0 -176
  56. package/mcp/.doc_cache/a4ef757633f13133_/346/212/200/346/234/257/346/226/271/346/241/210/350/257/204/344/274/260/344/270/216/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220/346/250/241/346/235/277.md +0 -72
  57. package/mcp/.doc_cache/a90401fc94ca29a3_SKILL.md +0 -260
  58. package/mcp/.doc_cache/bad4b7992748a7a0_/344/272/247/345/223/201/351/234/200/346/261/202/345/217/221/347/216/260/344/270/216/351/252/214/350/257/201/346/250/241/346/235/277.md +0 -53
  59. package/mcp/.doc_cache/baeac26fdbcd25de_/344/272/247/345/223/201/350/247/204/345/210/222/346/250/241/346/235/277.md +0 -322
  60. package/mcp/.doc_cache/c58bcfc199ada118_SKILL.md +0 -196
  61. package/mcp/.doc_cache/c8305789db809e48_SKILL.md +0 -588
  62. package/mcp/.doc_cache/cache_mapping.json +0 -69
  63. package/mcp/.doc_cache/d09142514e6a9de0_/347/224/265/345/225/206/345/271/263/345/217/260/344/274/230/345/214/226/346/241/210/344/276/213.md +0 -426
  64. package/mcp/.doc_cache/d165d35fea568d64_/351/234/200/346/261/202/345/217/230/345/212/250/350/257/264/346/230/216/346/226/207/346/241/243/346/250/241/346/235/277.md +0 -576
  65. package/mcp/.doc_cache/d17b04c82d2497b2_/347/224/265/345/225/206/345/271/263/345/217/260/344/274/230/345/214/226/346/241/210/344/276/213.md +0 -426
  66. package/mcp/.doc_cache/d1cfa2f8882fcdf9_/346/214/207/345/215/227/346/226/207/346/241/243/346/240/207/345/207/206/346/250/241/346/235/277.md +0 -59
  67. package/mcp/.doc_cache/d2585b5df3d21fc9_3_/345/225/206/344/270/232/345/214/226/347/255/226/347/225/245.md +0 -131
  68. package/mcp/.doc_cache/d604a1290099121c_/351/234/200/346/261/202/345/217/230/345/212/250/350/257/264/346/230/216/347/224/237/346/210/220/346/214/207/345/215/227.md +0 -292
  69. package/mcp/.doc_cache/d66edce025de6b82_Draft_/344/272/247/345/223/201/351/234/200/346/261/202/350/215/211/347/250/277.md +0 -60
  70. package/mcp/.doc_cache/d6c3ff791e7da726_SKILL.md +0 -33
  71. package/mcp/.doc_cache/da2c3d4d7b8957af_SKILL.md +0 -218
  72. package/mcp/.doc_cache/da8f4d40a1e8f36a_/346/212/200/346/234/257/350/247/204/345/210/222/346/250/241/346/235/277.md +0 -314
  73. package/mcp/.doc_cache/db70562fc59f1658_SKILL.md +0 -260
  74. package/mcp/.doc_cache/dd61f22b0ec13e10_Draft_/347/224/250/346/210/267/346/227/205/347/250/213/350/215/211/347/250/277.md +0 -84
  75. package/mcp/.doc_cache/e1451d5b65894789_SKILL.md +0 -930
  76. package/mcp/.doc_cache/e4f23de1b5313796_1_/344/272/247/345/223/201/345/256/232/344/275/215/344/270/216/345/210/206/346/236/220.md +0 -86
  77. package/mcp/.doc_cache/e668cf08c5f905ca_/345/267/245/345/205/267/344/275/277/347/224/250/346/214/207/345/215/227/346/250/241/346/235/277.md +0 -106
  78. package/mcp/.doc_cache/e69eeaaf88a175df_/345/270/202/345/234/272/346/234/272/344/274/232/350/257/204/344/274/260/344/270/216/347/253/236/344/272/211/345/210/206/346/236/220/346/250/241/346/235/277.md +0 -53
  79. package/mcp/.doc_cache/ea4c5e5a6254f616_SKILL.md +0 -243
  80. package/mcp/.doc_cache/ec9ad6ce24808f0a_/351/234/200/346/261/202/345/217/230/345/212/250/350/257/264/346/230/216/347/224/237/346/210/220Prompt.md +0 -349
  81. package/mcp/node_modules/.package-lock.json +0 -147
  82. package/mcp/node_modules/@modelcontextprotocol/sdk/LICENSE +0 -7
  83. package/mcp/node_modules/@modelcontextprotocol/sdk/README.md +0 -110
  84. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/cli.d.ts +0 -2
  85. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/cli.d.ts.map +0 -1
  86. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/cli.js +0 -129
  87. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/cli.js.map +0 -1
  88. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.d.ts +0 -773
  89. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.d.ts.map +0 -1
  90. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.js +0 -206
  91. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.js.map +0 -1
  92. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.test.d.ts +0 -2
  93. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.test.d.ts.map +0 -1
  94. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.test.js +0 -357
  95. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/index.test.js.map +0 -1
  96. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/sse.d.ts +0 -22
  97. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/sse.d.ts.map +0 -1
  98. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/sse.js +0 -91
  99. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/sse.js.map +0 -1
  100. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.d.ts +0 -56
  101. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.d.ts.map +0 -1
  102. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.js +0 -135
  103. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.js.map +0 -1
  104. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.test.d.ts +0 -2
  105. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.test.d.ts.map +0 -1
  106. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.test.js +0 -51
  107. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.test.js.map +0 -1
  108. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/websocket.d.ts +0 -17
  109. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/websocket.d.ts.map +0 -1
  110. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/websocket.js +0 -61
  111. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/client/websocket.js.map +0 -1
  112. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.d.ts +0 -20
  113. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.d.ts.map +0 -1
  114. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.js +0 -47
  115. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.js.map +0 -1
  116. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.test.d.ts +0 -2
  117. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.test.d.ts.map +0 -1
  118. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.test.js +0 -74
  119. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/inMemory.test.js.map +0 -1
  120. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.d.ts +0 -112
  121. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.d.ts.map +0 -1
  122. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.js +0 -182
  123. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.js.map +0 -1
  124. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.test.d.ts +0 -2
  125. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.test.d.ts.map +0 -1
  126. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.test.js +0 -360
  127. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/index.test.js.map +0 -1
  128. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/sse.d.ts +0 -46
  129. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/sse.d.ts.map +0 -1
  130. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/sse.js +0 -116
  131. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/sse.js.map +0 -1
  132. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.d.ts +0 -28
  133. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.d.ts.map +0 -1
  134. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.js +0 -69
  135. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.js.map +0 -1
  136. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.test.d.ts +0 -2
  137. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.test.d.ts.map +0 -1
  138. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.test.js +0 -87
  139. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.test.js.map +0 -1
  140. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/protocol.d.ts +0 -149
  141. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/protocol.d.ts.map +0 -1
  142. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/protocol.js +0 -274
  143. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/protocol.js.map +0 -1
  144. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.d.ts +0 -13
  145. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.d.ts.map +0 -1
  146. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.js +0 -31
  147. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.js.map +0 -1
  148. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.test.d.ts +0 -2
  149. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.test.d.ts.map +0 -1
  150. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.test.js +0 -27
  151. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.test.js.map +0 -1
  152. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/transport.d.ts +0 -39
  153. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/transport.d.ts.map +0 -1
  154. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/transport.js +0 -2
  155. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/shared/transport.js.map +0 -1
  156. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/types.d.ts +0 -26424
  157. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/types.d.ts.map +0 -1
  158. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/types.js +0 -996
  159. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/types.js.map +0 -1
  160. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.d.ts +0 -5
  161. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.d.ts.map +0 -1
  162. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.js +0 -11
  163. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.js.map +0 -1
  164. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.test.d.ts +0 -2
  165. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.test.d.ts.map +0 -1
  166. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.test.js +0 -14
  167. package/mcp/node_modules/@modelcontextprotocol/sdk/dist/utils.test.js.map +0 -1
  168. package/mcp/node_modules/@modelcontextprotocol/sdk/package.json +0 -61
  169. package/mcp/node_modules/bytes/History.md +0 -97
  170. package/mcp/node_modules/bytes/LICENSE +0 -23
  171. package/mcp/node_modules/bytes/Readme.md +0 -152
  172. package/mcp/node_modules/bytes/index.js +0 -170
  173. package/mcp/node_modules/bytes/package.json +0 -42
  174. package/mcp/node_modules/content-type/HISTORY.md +0 -29
  175. package/mcp/node_modules/content-type/LICENSE +0 -22
  176. package/mcp/node_modules/content-type/README.md +0 -94
  177. package/mcp/node_modules/content-type/index.js +0 -225
  178. package/mcp/node_modules/content-type/package.json +0 -42
  179. package/mcp/node_modules/depd/History.md +0 -103
  180. package/mcp/node_modules/depd/LICENSE +0 -22
  181. package/mcp/node_modules/depd/Readme.md +0 -280
  182. package/mcp/node_modules/depd/index.js +0 -538
  183. package/mcp/node_modules/depd/lib/browser/index.js +0 -77
  184. package/mcp/node_modules/depd/package.json +0 -45
  185. package/mcp/node_modules/http-errors/HISTORY.md +0 -180
  186. package/mcp/node_modules/http-errors/LICENSE +0 -23
  187. package/mcp/node_modules/http-errors/README.md +0 -169
  188. package/mcp/node_modules/http-errors/index.js +0 -289
  189. package/mcp/node_modules/http-errors/package.json +0 -50
  190. package/mcp/node_modules/iconv-lite/Changelog.md +0 -236
  191. package/mcp/node_modules/iconv-lite/LICENSE +0 -21
  192. package/mcp/node_modules/iconv-lite/README.md +0 -138
  193. package/mcp/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -532
  194. package/mcp/node_modules/iconv-lite/encodings/dbcs-data.js +0 -185
  195. package/mcp/node_modules/iconv-lite/encodings/index.js +0 -23
  196. package/mcp/node_modules/iconv-lite/encodings/internal.js +0 -218
  197. package/mcp/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -75
  198. package/mcp/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
  199. package/mcp/node_modules/iconv-lite/encodings/sbcs-data.js +0 -178
  200. package/mcp/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
  201. package/mcp/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
  202. package/mcp/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
  203. package/mcp/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
  204. package/mcp/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
  205. package/mcp/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
  206. package/mcp/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -56
  207. package/mcp/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
  208. package/mcp/node_modules/iconv-lite/encodings/utf16.js +0 -187
  209. package/mcp/node_modules/iconv-lite/encodings/utf32.js +0 -307
  210. package/mcp/node_modules/iconv-lite/encodings/utf7.js +0 -283
  211. package/mcp/node_modules/iconv-lite/lib/bom-handling.js +0 -48
  212. package/mcp/node_modules/iconv-lite/lib/helpers/merge-exports.js +0 -13
  213. package/mcp/node_modules/iconv-lite/lib/index.d.ts +0 -41
  214. package/mcp/node_modules/iconv-lite/lib/index.js +0 -183
  215. package/mcp/node_modules/iconv-lite/lib/streams.js +0 -105
  216. package/mcp/node_modules/iconv-lite/package.json +0 -59
  217. package/mcp/node_modules/inherits/LICENSE +0 -16
  218. package/mcp/node_modules/inherits/README.md +0 -42
  219. package/mcp/node_modules/inherits/inherits.js +0 -9
  220. package/mcp/node_modules/inherits/inherits_browser.js +0 -27
  221. package/mcp/node_modules/inherits/package.json +0 -29
  222. package/mcp/node_modules/raw-body/HISTORY.md +0 -333
  223. package/mcp/node_modules/raw-body/LICENSE +0 -22
  224. package/mcp/node_modules/raw-body/README.md +0 -223
  225. package/mcp/node_modules/raw-body/SECURITY.md +0 -24
  226. package/mcp/node_modules/raw-body/index.d.ts +0 -85
  227. package/mcp/node_modules/raw-body/index.js +0 -336
  228. package/mcp/node_modules/raw-body/package.json +0 -50
  229. package/mcp/node_modules/safer-buffer/LICENSE +0 -21
  230. package/mcp/node_modules/safer-buffer/Porting-Buffer.md +0 -268
  231. package/mcp/node_modules/safer-buffer/Readme.md +0 -156
  232. package/mcp/node_modules/safer-buffer/dangerous.js +0 -58
  233. package/mcp/node_modules/safer-buffer/package.json +0 -34
  234. package/mcp/node_modules/safer-buffer/safer.js +0 -77
  235. package/mcp/node_modules/safer-buffer/tests.js +0 -406
  236. package/mcp/node_modules/setprototypeof/LICENSE +0 -13
  237. package/mcp/node_modules/setprototypeof/README.md +0 -31
  238. package/mcp/node_modules/setprototypeof/index.d.ts +0 -2
  239. package/mcp/node_modules/setprototypeof/index.js +0 -17
  240. package/mcp/node_modules/setprototypeof/package.json +0 -38
  241. package/mcp/node_modules/setprototypeof/test/index.js +0 -24
  242. package/mcp/node_modules/statuses/HISTORY.md +0 -82
  243. package/mcp/node_modules/statuses/LICENSE +0 -23
  244. package/mcp/node_modules/statuses/README.md +0 -136
  245. package/mcp/node_modules/statuses/codes.json +0 -65
  246. package/mcp/node_modules/statuses/index.js +0 -146
  247. package/mcp/node_modules/statuses/package.json +0 -49
  248. package/mcp/node_modules/toidentifier/HISTORY.md +0 -9
  249. package/mcp/node_modules/toidentifier/LICENSE +0 -21
  250. package/mcp/node_modules/toidentifier/README.md +0 -61
  251. package/mcp/node_modules/toidentifier/index.js +0 -32
  252. package/mcp/node_modules/toidentifier/package.json +0 -38
  253. package/mcp/node_modules/unpipe/HISTORY.md +0 -4
  254. package/mcp/node_modules/unpipe/LICENSE +0 -22
  255. package/mcp/node_modules/unpipe/README.md +0 -43
  256. package/mcp/node_modules/unpipe/index.js +0 -69
  257. package/mcp/node_modules/unpipe/package.json +0 -27
  258. package/mcp/node_modules/zod/LICENSE +0 -21
  259. package/mcp/node_modules/zod/README.md +0 -208
  260. package/mcp/node_modules/zod/index.cjs +0 -33
  261. package/mcp/node_modules/zod/index.d.cts +0 -4
  262. package/mcp/node_modules/zod/index.d.ts +0 -4
  263. package/mcp/node_modules/zod/index.js +0 -4
  264. package/mcp/node_modules/zod/package.json +0 -118
  265. package/mcp/node_modules/zod/src/index.ts +0 -4
  266. package/mcp/node_modules/zod/src/v3/ZodError.ts +0 -330
  267. package/mcp/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
  268. package/mcp/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
  269. package/mcp/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
  270. package/mcp/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
  271. package/mcp/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
  272. package/mcp/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
  273. package/mcp/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
  274. package/mcp/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
  275. package/mcp/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
  276. package/mcp/node_modules/zod/src/v3/errors.ts +0 -13
  277. package/mcp/node_modules/zod/src/v3/external.ts +0 -6
  278. package/mcp/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
  279. package/mcp/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
  280. package/mcp/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
  281. package/mcp/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
  282. package/mcp/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
  283. package/mcp/node_modules/zod/src/v3/helpers/util.ts +0 -224
  284. package/mcp/node_modules/zod/src/v3/index.ts +0 -4
  285. package/mcp/node_modules/zod/src/v3/locales/en.ts +0 -124
  286. package/mcp/node_modules/zod/src/v3/standard-schema.ts +0 -113
  287. package/mcp/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
  288. package/mcp/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
  289. package/mcp/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
  290. package/mcp/node_modules/zod/src/v3/tests/array.test.ts +0 -71
  291. package/mcp/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
  292. package/mcp/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
  293. package/mcp/node_modules/zod/src/v3/tests/base.test.ts +0 -29
  294. package/mcp/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
  295. package/mcp/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
  296. package/mcp/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
  297. package/mcp/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
  298. package/mcp/node_modules/zod/src/v3/tests/complex.test.ts +0 -56
  299. package/mcp/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
  300. package/mcp/node_modules/zod/src/v3/tests/date.test.ts +0 -32
  301. package/mcp/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
  302. package/mcp/node_modules/zod/src/v3/tests/default.test.ts +0 -112
  303. package/mcp/node_modules/zod/src/v3/tests/description.test.ts +0 -33
  304. package/mcp/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
  305. package/mcp/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
  306. package/mcp/node_modules/zod/src/v3/tests/error.test.ts +0 -551
  307. package/mcp/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
  308. package/mcp/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
  309. package/mcp/node_modules/zod/src/v3/tests/function.test.ts +0 -257
  310. package/mcp/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
  311. package/mcp/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
  312. package/mcp/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
  313. package/mcp/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
  314. package/mcp/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
  315. package/mcp/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
  316. package/mcp/node_modules/zod/src/v3/tests/map.test.ts +0 -110
  317. package/mcp/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
  318. package/mcp/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
  319. package/mcp/node_modules/zod/src/v3/tests/nan.test.ts +0 -21
  320. package/mcp/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
  321. package/mcp/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
  322. package/mcp/node_modules/zod/src/v3/tests/number.test.ts +0 -176
  323. package/mcp/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
  324. package/mcp/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
  325. package/mcp/node_modules/zod/src/v3/tests/object.test.ts +0 -434
  326. package/mcp/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
  327. package/mcp/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
  328. package/mcp/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
  329. package/mcp/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
  330. package/mcp/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
  331. package/mcp/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
  332. package/mcp/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
  333. package/mcp/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
  334. package/mcp/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
  335. package/mcp/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
  336. package/mcp/node_modules/zod/src/v3/tests/record.test.ts +0 -171
  337. package/mcp/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
  338. package/mcp/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
  339. package/mcp/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
  340. package/mcp/node_modules/zod/src/v3/tests/set.test.ts +0 -142
  341. package/mcp/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
  342. package/mcp/node_modules/zod/src/v3/tests/string.test.ts +0 -916
  343. package/mcp/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
  344. package/mcp/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
  345. package/mcp/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
  346. package/mcp/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
  347. package/mcp/node_modules/zod/src/v3/tests/void.test.ts +0 -15
  348. package/mcp/node_modules/zod/src/v3/types.ts +0 -5136
  349. package/mcp/node_modules/zod/src/v4/classic/checks.ts +0 -30
  350. package/mcp/node_modules/zod/src/v4/classic/coerce.ts +0 -27
  351. package/mcp/node_modules/zod/src/v4/classic/compat.ts +0 -66
  352. package/mcp/node_modules/zod/src/v4/classic/errors.ts +0 -75
  353. package/mcp/node_modules/zod/src/v4/classic/external.ts +0 -50
  354. package/mcp/node_modules/zod/src/v4/classic/index.ts +0 -5
  355. package/mcp/node_modules/zod/src/v4/classic/iso.ts +0 -90
  356. package/mcp/node_modules/zod/src/v4/classic/parse.ts +0 -33
  357. package/mcp/node_modules/zod/src/v4/classic/schemas.ts +0 -2054
  358. package/mcp/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
  359. package/mcp/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
  360. package/mcp/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -210
  361. package/mcp/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
  362. package/mcp/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
  363. package/mcp/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
  364. package/mcp/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
  365. package/mcp/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -63
  366. package/mcp/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -252
  367. package/mcp/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
  368. package/mcp/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
  369. package/mcp/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -352
  370. package/mcp/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
  371. package/mcp/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -31
  372. package/mcp/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -296
  373. package/mcp/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -313
  374. package/mcp/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
  375. package/mcp/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -619
  376. package/mcp/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
  377. package/mcp/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -527
  378. package/mcp/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
  379. package/mcp/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -91
  380. package/mcp/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -175
  381. package/mcp/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -268
  382. package/mcp/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
  383. package/mcp/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -829
  384. package/mcp/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -34
  385. package/mcp/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -171
  386. package/mcp/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -108
  387. package/mcp/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
  388. package/mcp/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -92
  389. package/mcp/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -196
  390. package/mcp/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
  391. package/mcp/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
  392. package/mcp/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -86
  393. package/mcp/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
  394. package/mcp/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -247
  395. package/mcp/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -563
  396. package/mcp/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -123
  397. package/mcp/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -147
  398. package/mcp/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -127
  399. package/mcp/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -81
  400. package/mcp/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -37
  401. package/mcp/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -298
  402. package/mcp/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
  403. package/mcp/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
  404. package/mcp/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
  405. package/mcp/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
  406. package/mcp/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -342
  407. package/mcp/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -356
  408. package/mcp/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -532
  409. package/mcp/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -204
  410. package/mcp/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -179
  411. package/mcp/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -57
  412. package/mcp/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -109
  413. package/mcp/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -881
  414. package/mcp/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -66
  415. package/mcp/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -758
  416. package/mcp/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -2314
  417. package/mcp/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -250
  418. package/mcp/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -163
  419. package/mcp/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -94
  420. package/mcp/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
  421. package/mcp/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
  422. package/mcp/node_modules/zod/src/v4/core/api.ts +0 -1594
  423. package/mcp/node_modules/zod/src/v4/core/checks.ts +0 -1283
  424. package/mcp/node_modules/zod/src/v4/core/config.ts +0 -15
  425. package/mcp/node_modules/zod/src/v4/core/core.ts +0 -134
  426. package/mcp/node_modules/zod/src/v4/core/doc.ts +0 -44
  427. package/mcp/node_modules/zod/src/v4/core/errors.ts +0 -424
  428. package/mcp/node_modules/zod/src/v4/core/function.ts +0 -176
  429. package/mcp/node_modules/zod/src/v4/core/index.ts +0 -15
  430. package/mcp/node_modules/zod/src/v4/core/json-schema.ts +0 -143
  431. package/mcp/node_modules/zod/src/v4/core/parse.ts +0 -94
  432. package/mcp/node_modules/zod/src/v4/core/regexes.ts +0 -135
  433. package/mcp/node_modules/zod/src/v4/core/registries.ts +0 -96
  434. package/mcp/node_modules/zod/src/v4/core/schemas.ts +0 -3842
  435. package/mcp/node_modules/zod/src/v4/core/standard-schema.ts +0 -64
  436. package/mcp/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
  437. package/mcp/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
  438. package/mcp/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
  439. package/mcp/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
  440. package/mcp/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
  441. package/mcp/node_modules/zod/src/v4/core/to-json-schema.ts +0 -977
  442. package/mcp/node_modules/zod/src/v4/core/util.ts +0 -775
  443. package/mcp/node_modules/zod/src/v4/core/versions.ts +0 -5
  444. package/mcp/node_modules/zod/src/v4/core/zsf.ts +0 -323
  445. package/mcp/node_modules/zod/src/v4/index.ts +0 -4
  446. package/mcp/node_modules/zod/src/v4/locales/ar.ts +0 -125
  447. package/mcp/node_modules/zod/src/v4/locales/az.ts +0 -121
  448. package/mcp/node_modules/zod/src/v4/locales/be.ts +0 -184
  449. package/mcp/node_modules/zod/src/v4/locales/ca.ts +0 -127
  450. package/mcp/node_modules/zod/src/v4/locales/cs.ts +0 -142
  451. package/mcp/node_modules/zod/src/v4/locales/de.ts +0 -124
  452. package/mcp/node_modules/zod/src/v4/locales/en.ts +0 -127
  453. package/mcp/node_modules/zod/src/v4/locales/eo.ts +0 -125
  454. package/mcp/node_modules/zod/src/v4/locales/es.ts +0 -125
  455. package/mcp/node_modules/zod/src/v4/locales/fa.ts +0 -134
  456. package/mcp/node_modules/zod/src/v4/locales/fi.ts +0 -131
  457. package/mcp/node_modules/zod/src/v4/locales/fr-CA.ts +0 -126
  458. package/mcp/node_modules/zod/src/v4/locales/fr.ts +0 -124
  459. package/mcp/node_modules/zod/src/v4/locales/he.ts +0 -125
  460. package/mcp/node_modules/zod/src/v4/locales/hu.ts +0 -126
  461. package/mcp/node_modules/zod/src/v4/locales/id.ts +0 -125
  462. package/mcp/node_modules/zod/src/v4/locales/index.ts +0 -39
  463. package/mcp/node_modules/zod/src/v4/locales/it.ts +0 -125
  464. package/mcp/node_modules/zod/src/v4/locales/ja.ts +0 -122
  465. package/mcp/node_modules/zod/src/v4/locales/kh.ts +0 -126
  466. package/mcp/node_modules/zod/src/v4/locales/ko.ts +0 -131
  467. package/mcp/node_modules/zod/src/v4/locales/mk.ts +0 -127
  468. package/mcp/node_modules/zod/src/v4/locales/ms.ts +0 -124
  469. package/mcp/node_modules/zod/src/v4/locales/nl.ts +0 -126
  470. package/mcp/node_modules/zod/src/v4/locales/no.ts +0 -124
  471. package/mcp/node_modules/zod/src/v4/locales/ota.ts +0 -125
  472. package/mcp/node_modules/zod/src/v4/locales/pl.ts +0 -126
  473. package/mcp/node_modules/zod/src/v4/locales/ps.ts +0 -133
  474. package/mcp/node_modules/zod/src/v4/locales/pt.ts +0 -123
  475. package/mcp/node_modules/zod/src/v4/locales/ru.ts +0 -184
  476. package/mcp/node_modules/zod/src/v4/locales/sl.ts +0 -126
  477. package/mcp/node_modules/zod/src/v4/locales/sv.ts +0 -127
  478. package/mcp/node_modules/zod/src/v4/locales/ta.ts +0 -125
  479. package/mcp/node_modules/zod/src/v4/locales/th.ts +0 -126
  480. package/mcp/node_modules/zod/src/v4/locales/tr.ts +0 -121
  481. package/mcp/node_modules/zod/src/v4/locales/ua.ts +0 -126
  482. package/mcp/node_modules/zod/src/v4/locales/ur.ts +0 -126
  483. package/mcp/node_modules/zod/src/v4/locales/vi.ts +0 -125
  484. package/mcp/node_modules/zod/src/v4/locales/zh-CN.ts +0 -123
  485. package/mcp/node_modules/zod/src/v4/locales/zh-TW.ts +0 -125
  486. package/mcp/node_modules/zod/src/v4/mini/checks.ts +0 -32
  487. package/mcp/node_modules/zod/src/v4/mini/coerce.ts +0 -22
  488. package/mcp/node_modules/zod/src/v4/mini/external.ts +0 -40
  489. package/mcp/node_modules/zod/src/v4/mini/index.ts +0 -3
  490. package/mcp/node_modules/zod/src/v4/mini/iso.ts +0 -62
  491. package/mcp/node_modules/zod/src/v4/mini/parse.ts +0 -1
  492. package/mcp/node_modules/zod/src/v4/mini/schemas.ts +0 -1579
  493. package/mcp/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
  494. package/mcp/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -51
  495. package/mcp/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
  496. package/mcp/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
  497. package/mcp/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
  498. package/mcp/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -43
  499. package/mcp/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -871
  500. package/mcp/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
  501. package/mcp/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -185
  502. package/mcp/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
  503. package/mcp/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -275
  504. package/mcp/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -299
  505. package/mcp/node_modules/zod/src/v4-mini/index.ts +0 -1
  506. package/mcp/node_modules/zod/v3/ZodError.cjs +0 -138
  507. package/mcp/node_modules/zod/v3/ZodError.d.cts +0 -164
  508. package/mcp/node_modules/zod/v3/ZodError.d.ts +0 -164
  509. package/mcp/node_modules/zod/v3/ZodError.js +0 -133
  510. package/mcp/node_modules/zod/v3/errors.cjs +0 -17
  511. package/mcp/node_modules/zod/v3/errors.d.cts +0 -5
  512. package/mcp/node_modules/zod/v3/errors.d.ts +0 -5
  513. package/mcp/node_modules/zod/v3/errors.js +0 -9
  514. package/mcp/node_modules/zod/v3/external.cjs +0 -22
  515. package/mcp/node_modules/zod/v3/external.d.cts +0 -6
  516. package/mcp/node_modules/zod/v3/external.d.ts +0 -6
  517. package/mcp/node_modules/zod/v3/external.js +0 -6
  518. package/mcp/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
  519. package/mcp/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
  520. package/mcp/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
  521. package/mcp/node_modules/zod/v3/helpers/enumUtil.js +0 -1
  522. package/mcp/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
  523. package/mcp/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
  524. package/mcp/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
  525. package/mcp/node_modules/zod/v3/helpers/errorUtil.js +0 -6
  526. package/mcp/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
  527. package/mcp/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
  528. package/mcp/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
  529. package/mcp/node_modules/zod/v3/helpers/parseUtil.js +0 -109
  530. package/mcp/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
  531. package/mcp/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
  532. package/mcp/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
  533. package/mcp/node_modules/zod/v3/helpers/partialUtil.js +0 -1
  534. package/mcp/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
  535. package/mcp/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
  536. package/mcp/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
  537. package/mcp/node_modules/zod/v3/helpers/typeAliases.js +0 -1
  538. package/mcp/node_modules/zod/v3/helpers/util.cjs +0 -137
  539. package/mcp/node_modules/zod/v3/helpers/util.d.cts +0 -85
  540. package/mcp/node_modules/zod/v3/helpers/util.d.ts +0 -85
  541. package/mcp/node_modules/zod/v3/helpers/util.js +0 -133
  542. package/mcp/node_modules/zod/v3/index.cjs +0 -33
  543. package/mcp/node_modules/zod/v3/index.d.cts +0 -4
  544. package/mcp/node_modules/zod/v3/index.d.ts +0 -4
  545. package/mcp/node_modules/zod/v3/index.js +0 -4
  546. package/mcp/node_modules/zod/v3/locales/en.cjs +0 -111
  547. package/mcp/node_modules/zod/v3/locales/en.d.cts +0 -3
  548. package/mcp/node_modules/zod/v3/locales/en.d.ts +0 -3
  549. package/mcp/node_modules/zod/v3/locales/en.js +0 -109
  550. package/mcp/node_modules/zod/v3/standard-schema.cjs +0 -2
  551. package/mcp/node_modules/zod/v3/standard-schema.d.cts +0 -102
  552. package/mcp/node_modules/zod/v3/standard-schema.d.ts +0 -102
  553. package/mcp/node_modules/zod/v3/standard-schema.js +0 -1
  554. package/mcp/node_modules/zod/v3/types.cjs +0 -3775
  555. package/mcp/node_modules/zod/v3/types.d.cts +0 -1031
  556. package/mcp/node_modules/zod/v3/types.d.ts +0 -1031
  557. package/mcp/node_modules/zod/v3/types.js +0 -3693
  558. package/mcp/node_modules/zod/v4/classic/checks.cjs +0 -32
  559. package/mcp/node_modules/zod/v4/classic/checks.d.cts +0 -1
  560. package/mcp/node_modules/zod/v4/classic/checks.d.ts +0 -1
  561. package/mcp/node_modules/zod/v4/classic/checks.js +0 -1
  562. package/mcp/node_modules/zod/v4/classic/coerce.cjs +0 -47
  563. package/mcp/node_modules/zod/v4/classic/coerce.d.cts +0 -17
  564. package/mcp/node_modules/zod/v4/classic/coerce.d.ts +0 -17
  565. package/mcp/node_modules/zod/v4/classic/coerce.js +0 -17
  566. package/mcp/node_modules/zod/v4/classic/compat.cjs +0 -57
  567. package/mcp/node_modules/zod/v4/classic/compat.d.cts +0 -46
  568. package/mcp/node_modules/zod/v4/classic/compat.d.ts +0 -46
  569. package/mcp/node_modules/zod/v4/classic/compat.js +0 -27
  570. package/mcp/node_modules/zod/v4/classic/errors.cjs +0 -67
  571. package/mcp/node_modules/zod/v4/classic/errors.d.cts +0 -30
  572. package/mcp/node_modules/zod/v4/classic/errors.d.ts +0 -30
  573. package/mcp/node_modules/zod/v4/classic/errors.js +0 -41
  574. package/mcp/node_modules/zod/v4/classic/external.cjs +0 -70
  575. package/mcp/node_modules/zod/v4/classic/external.d.cts +0 -13
  576. package/mcp/node_modules/zod/v4/classic/external.d.ts +0 -13
  577. package/mcp/node_modules/zod/v4/classic/external.js +0 -18
  578. package/mcp/node_modules/zod/v4/classic/index.cjs +0 -33
  579. package/mcp/node_modules/zod/v4/classic/index.d.cts +0 -4
  580. package/mcp/node_modules/zod/v4/classic/index.d.ts +0 -4
  581. package/mcp/node_modules/zod/v4/classic/index.js +0 -4
  582. package/mcp/node_modules/zod/v4/classic/iso.cjs +0 -60
  583. package/mcp/node_modules/zod/v4/classic/iso.d.cts +0 -22
  584. package/mcp/node_modules/zod/v4/classic/iso.d.ts +0 -22
  585. package/mcp/node_modules/zod/v4/classic/iso.js +0 -30
  586. package/mcp/node_modules/zod/v4/classic/parse.cjs +0 -32
  587. package/mcp/node_modules/zod/v4/classic/parse.d.cts +0 -23
  588. package/mcp/node_modules/zod/v4/classic/parse.d.ts +0 -23
  589. package/mcp/node_modules/zod/v4/classic/parse.js +0 -6
  590. package/mcp/node_modules/zod/v4/classic/schemas.cjs +0 -1109
  591. package/mcp/node_modules/zod/v4/classic/schemas.d.cts +0 -630
  592. package/mcp/node_modules/zod/v4/classic/schemas.d.ts +0 -630
  593. package/mcp/node_modules/zod/v4/classic/schemas.js +0 -1006
  594. package/mcp/node_modules/zod/v4/core/api.cjs +0 -1039
  595. package/mcp/node_modules/zod/v4/core/api.d.cts +0 -284
  596. package/mcp/node_modules/zod/v4/core/api.d.ts +0 -284
  597. package/mcp/node_modules/zod/v4/core/api.js +0 -906
  598. package/mcp/node_modules/zod/v4/core/checks.cjs +0 -591
  599. package/mcp/node_modules/zod/v4/core/checks.d.cts +0 -278
  600. package/mcp/node_modules/zod/v4/core/checks.d.ts +0 -278
  601. package/mcp/node_modules/zod/v4/core/checks.js +0 -565
  602. package/mcp/node_modules/zod/v4/core/core.cjs +0 -67
  603. package/mcp/node_modules/zod/v4/core/core.d.cts +0 -49
  604. package/mcp/node_modules/zod/v4/core/core.d.ts +0 -49
  605. package/mcp/node_modules/zod/v4/core/core.js +0 -61
  606. package/mcp/node_modules/zod/v4/core/doc.cjs +0 -39
  607. package/mcp/node_modules/zod/v4/core/doc.d.cts +0 -14
  608. package/mcp/node_modules/zod/v4/core/doc.d.ts +0 -14
  609. package/mcp/node_modules/zod/v4/core/doc.js +0 -35
  610. package/mcp/node_modules/zod/v4/core/errors.cjs +0 -226
  611. package/mcp/node_modules/zod/v4/core/errors.d.cts +0 -208
  612. package/mcp/node_modules/zod/v4/core/errors.d.ts +0 -208
  613. package/mcp/node_modules/zod/v4/core/errors.js +0 -195
  614. package/mcp/node_modules/zod/v4/core/function.cjs +0 -102
  615. package/mcp/node_modules/zod/v4/core/function.d.cts +0 -52
  616. package/mcp/node_modules/zod/v4/core/function.d.ts +0 -52
  617. package/mcp/node_modules/zod/v4/core/function.js +0 -75
  618. package/mcp/node_modules/zod/v4/core/index.cjs +0 -44
  619. package/mcp/node_modules/zod/v4/core/index.d.cts +0 -15
  620. package/mcp/node_modules/zod/v4/core/index.d.ts +0 -15
  621. package/mcp/node_modules/zod/v4/core/index.js +0 -15
  622. package/mcp/node_modules/zod/v4/core/json-schema.cjs +0 -2
  623. package/mcp/node_modules/zod/v4/core/json-schema.d.cts +0 -87
  624. package/mcp/node_modules/zod/v4/core/json-schema.d.ts +0 -87
  625. package/mcp/node_modules/zod/v4/core/json-schema.js +0 -1
  626. package/mcp/node_modules/zod/v4/core/parse.cjs +0 -87
  627. package/mcp/node_modules/zod/v4/core/parse.d.cts +0 -25
  628. package/mcp/node_modules/zod/v4/core/parse.d.ts +0 -25
  629. package/mcp/node_modules/zod/v4/core/parse.js +0 -57
  630. package/mcp/node_modules/zod/v4/core/regexes.cjs +0 -103
  631. package/mcp/node_modules/zod/v4/core/regexes.d.cts +0 -62
  632. package/mcp/node_modules/zod/v4/core/regexes.d.ts +0 -62
  633. package/mcp/node_modules/zod/v4/core/regexes.js +0 -95
  634. package/mcp/node_modules/zod/v4/core/registries.cjs +0 -56
  635. package/mcp/node_modules/zod/v4/core/registries.d.cts +0 -35
  636. package/mcp/node_modules/zod/v4/core/registries.d.ts +0 -35
  637. package/mcp/node_modules/zod/v4/core/registries.js +0 -51
  638. package/mcp/node_modules/zod/v4/core/schemas.cjs +0 -1748
  639. package/mcp/node_modules/zod/v4/core/schemas.d.cts +0 -1041
  640. package/mcp/node_modules/zod/v4/core/schemas.d.ts +0 -1041
  641. package/mcp/node_modules/zod/v4/core/schemas.js +0 -1717
  642. package/mcp/node_modules/zod/v4/core/standard-schema.cjs +0 -2
  643. package/mcp/node_modules/zod/v4/core/standard-schema.d.cts +0 -55
  644. package/mcp/node_modules/zod/v4/core/standard-schema.d.ts +0 -55
  645. package/mcp/node_modules/zod/v4/core/standard-schema.js +0 -1
  646. package/mcp/node_modules/zod/v4/core/to-json-schema.cjs +0 -854
  647. package/mcp/node_modules/zod/v4/core/to-json-schema.d.cts +0 -88
  648. package/mcp/node_modules/zod/v4/core/to-json-schema.d.ts +0 -88
  649. package/mcp/node_modules/zod/v4/core/to-json-schema.js +0 -849
  650. package/mcp/node_modules/zod/v4/core/util.cjs +0 -539
  651. package/mcp/node_modules/zod/v4/core/util.d.cts +0 -183
  652. package/mcp/node_modules/zod/v4/core/util.d.ts +0 -183
  653. package/mcp/node_modules/zod/v4/core/util.js +0 -493
  654. package/mcp/node_modules/zod/v4/core/versions.cjs +0 -8
  655. package/mcp/node_modules/zod/v4/core/versions.d.cts +0 -5
  656. package/mcp/node_modules/zod/v4/core/versions.d.ts +0 -5
  657. package/mcp/node_modules/zod/v4/core/versions.js +0 -5
  658. package/mcp/node_modules/zod/v4/index.cjs +0 -22
  659. package/mcp/node_modules/zod/v4/index.d.cts +0 -3
  660. package/mcp/node_modules/zod/v4/index.d.ts +0 -3
  661. package/mcp/node_modules/zod/v4/index.js +0 -3
  662. package/mcp/node_modules/zod/v4/locales/ar.cjs +0 -142
  663. package/mcp/node_modules/zod/v4/locales/ar.d.cts +0 -4
  664. package/mcp/node_modules/zod/v4/locales/ar.d.ts +0 -4
  665. package/mcp/node_modules/zod/v4/locales/ar.js +0 -116
  666. package/mcp/node_modules/zod/v4/locales/az.cjs +0 -141
  667. package/mcp/node_modules/zod/v4/locales/az.d.cts +0 -4
  668. package/mcp/node_modules/zod/v4/locales/az.d.ts +0 -4
  669. package/mcp/node_modules/zod/v4/locales/az.js +0 -115
  670. package/mcp/node_modules/zod/v4/locales/be.cjs +0 -190
  671. package/mcp/node_modules/zod/v4/locales/be.d.cts +0 -4
  672. package/mcp/node_modules/zod/v4/locales/be.d.ts +0 -4
  673. package/mcp/node_modules/zod/v4/locales/be.js +0 -164
  674. package/mcp/node_modules/zod/v4/locales/ca.cjs +0 -144
  675. package/mcp/node_modules/zod/v4/locales/ca.d.cts +0 -4
  676. package/mcp/node_modules/zod/v4/locales/ca.d.ts +0 -4
  677. package/mcp/node_modules/zod/v4/locales/ca.js +0 -118
  678. package/mcp/node_modules/zod/v4/locales/cs.cjs +0 -161
  679. package/mcp/node_modules/zod/v4/locales/cs.d.cts +0 -4
  680. package/mcp/node_modules/zod/v4/locales/cs.d.ts +0 -4
  681. package/mcp/node_modules/zod/v4/locales/cs.js +0 -135
  682. package/mcp/node_modules/zod/v4/locales/de.cjs +0 -142
  683. package/mcp/node_modules/zod/v4/locales/de.d.cts +0 -4
  684. package/mcp/node_modules/zod/v4/locales/de.d.ts +0 -4
  685. package/mcp/node_modules/zod/v4/locales/de.js +0 -116
  686. package/mcp/node_modules/zod/v4/locales/en.cjs +0 -145
  687. package/mcp/node_modules/zod/v4/locales/en.d.cts +0 -5
  688. package/mcp/node_modules/zod/v4/locales/en.d.ts +0 -5
  689. package/mcp/node_modules/zod/v4/locales/en.js +0 -117
  690. package/mcp/node_modules/zod/v4/locales/eo.cjs +0 -144
  691. package/mcp/node_modules/zod/v4/locales/eo.d.cts +0 -5
  692. package/mcp/node_modules/zod/v4/locales/eo.d.ts +0 -5
  693. package/mcp/node_modules/zod/v4/locales/eo.js +0 -116
  694. package/mcp/node_modules/zod/v4/locales/es.cjs +0 -143
  695. package/mcp/node_modules/zod/v4/locales/es.d.cts +0 -4
  696. package/mcp/node_modules/zod/v4/locales/es.d.ts +0 -4
  697. package/mcp/node_modules/zod/v4/locales/es.js +0 -117
  698. package/mcp/node_modules/zod/v4/locales/fa.cjs +0 -148
  699. package/mcp/node_modules/zod/v4/locales/fa.d.cts +0 -4
  700. package/mcp/node_modules/zod/v4/locales/fa.d.ts +0 -4
  701. package/mcp/node_modules/zod/v4/locales/fa.js +0 -122
  702. package/mcp/node_modules/zod/v4/locales/fi.cjs +0 -148
  703. package/mcp/node_modules/zod/v4/locales/fi.d.cts +0 -4
  704. package/mcp/node_modules/zod/v4/locales/fi.d.ts +0 -4
  705. package/mcp/node_modules/zod/v4/locales/fi.js +0 -122
  706. package/mcp/node_modules/zod/v4/locales/fr-CA.cjs +0 -143
  707. package/mcp/node_modules/zod/v4/locales/fr-CA.d.cts +0 -4
  708. package/mcp/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  709. package/mcp/node_modules/zod/v4/locales/fr-CA.js +0 -117
  710. package/mcp/node_modules/zod/v4/locales/fr.cjs +0 -142
  711. package/mcp/node_modules/zod/v4/locales/fr.d.cts +0 -4
  712. package/mcp/node_modules/zod/v4/locales/fr.d.ts +0 -4
  713. package/mcp/node_modules/zod/v4/locales/fr.js +0 -116
  714. package/mcp/node_modules/zod/v4/locales/he.cjs +0 -143
  715. package/mcp/node_modules/zod/v4/locales/he.d.cts +0 -4
  716. package/mcp/node_modules/zod/v4/locales/he.d.ts +0 -4
  717. package/mcp/node_modules/zod/v4/locales/he.js +0 -117
  718. package/mcp/node_modules/zod/v4/locales/hu.cjs +0 -143
  719. package/mcp/node_modules/zod/v4/locales/hu.d.cts +0 -4
  720. package/mcp/node_modules/zod/v4/locales/hu.d.ts +0 -4
  721. package/mcp/node_modules/zod/v4/locales/hu.js +0 -117
  722. package/mcp/node_modules/zod/v4/locales/id.cjs +0 -142
  723. package/mcp/node_modules/zod/v4/locales/id.d.cts +0 -4
  724. package/mcp/node_modules/zod/v4/locales/id.d.ts +0 -4
  725. package/mcp/node_modules/zod/v4/locales/id.js +0 -116
  726. package/mcp/node_modules/zod/v4/locales/index.cjs +0 -84
  727. package/mcp/node_modules/zod/v4/locales/index.d.cts +0 -39
  728. package/mcp/node_modules/zod/v4/locales/index.d.ts +0 -39
  729. package/mcp/node_modules/zod/v4/locales/index.js +0 -39
  730. package/mcp/node_modules/zod/v4/locales/it.cjs +0 -143
  731. package/mcp/node_modules/zod/v4/locales/it.d.cts +0 -4
  732. package/mcp/node_modules/zod/v4/locales/it.d.ts +0 -4
  733. package/mcp/node_modules/zod/v4/locales/it.js +0 -117
  734. package/mcp/node_modules/zod/v4/locales/ja.cjs +0 -141
  735. package/mcp/node_modules/zod/v4/locales/ja.d.cts +0 -4
  736. package/mcp/node_modules/zod/v4/locales/ja.d.ts +0 -4
  737. package/mcp/node_modules/zod/v4/locales/ja.js +0 -115
  738. package/mcp/node_modules/zod/v4/locales/kh.cjs +0 -143
  739. package/mcp/node_modules/zod/v4/locales/kh.d.cts +0 -4
  740. package/mcp/node_modules/zod/v4/locales/kh.d.ts +0 -4
  741. package/mcp/node_modules/zod/v4/locales/kh.js +0 -117
  742. package/mcp/node_modules/zod/v4/locales/ko.cjs +0 -147
  743. package/mcp/node_modules/zod/v4/locales/ko.d.cts +0 -4
  744. package/mcp/node_modules/zod/v4/locales/ko.d.ts +0 -4
  745. package/mcp/node_modules/zod/v4/locales/ko.js +0 -121
  746. package/mcp/node_modules/zod/v4/locales/mk.cjs +0 -144
  747. package/mcp/node_modules/zod/v4/locales/mk.d.cts +0 -4
  748. package/mcp/node_modules/zod/v4/locales/mk.d.ts +0 -4
  749. package/mcp/node_modules/zod/v4/locales/mk.js +0 -118
  750. package/mcp/node_modules/zod/v4/locales/ms.cjs +0 -142
  751. package/mcp/node_modules/zod/v4/locales/ms.d.cts +0 -4
  752. package/mcp/node_modules/zod/v4/locales/ms.d.ts +0 -4
  753. package/mcp/node_modules/zod/v4/locales/ms.js +0 -116
  754. package/mcp/node_modules/zod/v4/locales/nl.cjs +0 -143
  755. package/mcp/node_modules/zod/v4/locales/nl.d.cts +0 -4
  756. package/mcp/node_modules/zod/v4/locales/nl.d.ts +0 -4
  757. package/mcp/node_modules/zod/v4/locales/nl.js +0 -117
  758. package/mcp/node_modules/zod/v4/locales/no.cjs +0 -142
  759. package/mcp/node_modules/zod/v4/locales/no.d.cts +0 -4
  760. package/mcp/node_modules/zod/v4/locales/no.d.ts +0 -4
  761. package/mcp/node_modules/zod/v4/locales/no.js +0 -116
  762. package/mcp/node_modules/zod/v4/locales/ota.cjs +0 -143
  763. package/mcp/node_modules/zod/v4/locales/ota.d.cts +0 -4
  764. package/mcp/node_modules/zod/v4/locales/ota.d.ts +0 -4
  765. package/mcp/node_modules/zod/v4/locales/ota.js +0 -117
  766. package/mcp/node_modules/zod/v4/locales/pl.cjs +0 -143
  767. package/mcp/node_modules/zod/v4/locales/pl.d.cts +0 -4
  768. package/mcp/node_modules/zod/v4/locales/pl.d.ts +0 -4
  769. package/mcp/node_modules/zod/v4/locales/pl.js +0 -117
  770. package/mcp/node_modules/zod/v4/locales/ps.cjs +0 -148
  771. package/mcp/node_modules/zod/v4/locales/ps.d.cts +0 -4
  772. package/mcp/node_modules/zod/v4/locales/ps.d.ts +0 -4
  773. package/mcp/node_modules/zod/v4/locales/ps.js +0 -122
  774. package/mcp/node_modules/zod/v4/locales/pt.cjs +0 -142
  775. package/mcp/node_modules/zod/v4/locales/pt.d.cts +0 -4
  776. package/mcp/node_modules/zod/v4/locales/pt.d.ts +0 -4
  777. package/mcp/node_modules/zod/v4/locales/pt.js +0 -116
  778. package/mcp/node_modules/zod/v4/locales/ru.cjs +0 -190
  779. package/mcp/node_modules/zod/v4/locales/ru.d.cts +0 -4
  780. package/mcp/node_modules/zod/v4/locales/ru.d.ts +0 -4
  781. package/mcp/node_modules/zod/v4/locales/ru.js +0 -164
  782. package/mcp/node_modules/zod/v4/locales/sl.cjs +0 -143
  783. package/mcp/node_modules/zod/v4/locales/sl.d.cts +0 -4
  784. package/mcp/node_modules/zod/v4/locales/sl.d.ts +0 -4
  785. package/mcp/node_modules/zod/v4/locales/sl.js +0 -117
  786. package/mcp/node_modules/zod/v4/locales/sv.cjs +0 -144
  787. package/mcp/node_modules/zod/v4/locales/sv.d.cts +0 -4
  788. package/mcp/node_modules/zod/v4/locales/sv.d.ts +0 -4
  789. package/mcp/node_modules/zod/v4/locales/sv.js +0 -118
  790. package/mcp/node_modules/zod/v4/locales/ta.cjs +0 -143
  791. package/mcp/node_modules/zod/v4/locales/ta.d.cts +0 -4
  792. package/mcp/node_modules/zod/v4/locales/ta.d.ts +0 -4
  793. package/mcp/node_modules/zod/v4/locales/ta.js +0 -117
  794. package/mcp/node_modules/zod/v4/locales/th.cjs +0 -143
  795. package/mcp/node_modules/zod/v4/locales/th.d.cts +0 -4
  796. package/mcp/node_modules/zod/v4/locales/th.d.ts +0 -4
  797. package/mcp/node_modules/zod/v4/locales/th.js +0 -117
  798. package/mcp/node_modules/zod/v4/locales/tr.cjs +0 -143
  799. package/mcp/node_modules/zod/v4/locales/tr.d.cts +0 -5
  800. package/mcp/node_modules/zod/v4/locales/tr.d.ts +0 -5
  801. package/mcp/node_modules/zod/v4/locales/tr.js +0 -115
  802. package/mcp/node_modules/zod/v4/locales/ua.cjs +0 -143
  803. package/mcp/node_modules/zod/v4/locales/ua.d.cts +0 -4
  804. package/mcp/node_modules/zod/v4/locales/ua.d.ts +0 -4
  805. package/mcp/node_modules/zod/v4/locales/ua.js +0 -117
  806. package/mcp/node_modules/zod/v4/locales/ur.cjs +0 -143
  807. package/mcp/node_modules/zod/v4/locales/ur.d.cts +0 -4
  808. package/mcp/node_modules/zod/v4/locales/ur.d.ts +0 -4
  809. package/mcp/node_modules/zod/v4/locales/ur.js +0 -117
  810. package/mcp/node_modules/zod/v4/locales/vi.cjs +0 -142
  811. package/mcp/node_modules/zod/v4/locales/vi.d.cts +0 -4
  812. package/mcp/node_modules/zod/v4/locales/vi.d.ts +0 -4
  813. package/mcp/node_modules/zod/v4/locales/vi.js +0 -116
  814. package/mcp/node_modules/zod/v4/locales/zh-CN.cjs +0 -142
  815. package/mcp/node_modules/zod/v4/locales/zh-CN.d.cts +0 -4
  816. package/mcp/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  817. package/mcp/node_modules/zod/v4/locales/zh-CN.js +0 -116
  818. package/mcp/node_modules/zod/v4/locales/zh-TW.cjs +0 -143
  819. package/mcp/node_modules/zod/v4/locales/zh-TW.d.cts +0 -4
  820. package/mcp/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
  821. package/mcp/node_modules/zod/v4/locales/zh-TW.js +0 -117
  822. package/mcp/node_modules/zod/v4/mini/checks.cjs +0 -34
  823. package/mcp/node_modules/zod/v4/mini/checks.d.cts +0 -1
  824. package/mcp/node_modules/zod/v4/mini/checks.d.ts +0 -1
  825. package/mcp/node_modules/zod/v4/mini/checks.js +0 -1
  826. package/mcp/node_modules/zod/v4/mini/coerce.cjs +0 -47
  827. package/mcp/node_modules/zod/v4/mini/coerce.d.cts +0 -7
  828. package/mcp/node_modules/zod/v4/mini/coerce.d.ts +0 -7
  829. package/mcp/node_modules/zod/v4/mini/coerce.js +0 -17
  830. package/mcp/node_modules/zod/v4/mini/external.cjs +0 -62
  831. package/mcp/node_modules/zod/v4/mini/external.d.cts +0 -11
  832. package/mcp/node_modules/zod/v4/mini/external.d.ts +0 -11
  833. package/mcp/node_modules/zod/v4/mini/external.js +0 -13
  834. package/mcp/node_modules/zod/v4/mini/index.cjs +0 -32
  835. package/mcp/node_modules/zod/v4/mini/index.d.cts +0 -3
  836. package/mcp/node_modules/zod/v4/mini/index.d.ts +0 -3
  837. package/mcp/node_modules/zod/v4/mini/index.js +0 -3
  838. package/mcp/node_modules/zod/v4/mini/iso.cjs +0 -60
  839. package/mcp/node_modules/zod/v4/mini/iso.d.cts +0 -22
  840. package/mcp/node_modules/zod/v4/mini/iso.d.ts +0 -22
  841. package/mcp/node_modules/zod/v4/mini/iso.js +0 -30
  842. package/mcp/node_modules/zod/v4/mini/parse.cjs +0 -8
  843. package/mcp/node_modules/zod/v4/mini/parse.d.cts +0 -1
  844. package/mcp/node_modules/zod/v4/mini/parse.d.ts +0 -1
  845. package/mcp/node_modules/zod/v4/mini/parse.js +0 -1
  846. package/mcp/node_modules/zod/v4/mini/schemas.cjs +0 -839
  847. package/mcp/node_modules/zod/v4/mini/schemas.d.cts +0 -356
  848. package/mcp/node_modules/zod/v4/mini/schemas.d.ts +0 -356
  849. package/mcp/node_modules/zod/v4/mini/schemas.js +0 -732
  850. package/mcp/node_modules/zod/v4-mini/index.cjs +0 -17
  851. package/mcp/node_modules/zod/v4-mini/index.d.cts +0 -1
  852. package/mcp/node_modules/zod/v4-mini/index.d.ts +0 -1
  853. package/mcp/node_modules/zod/v4-mini/index.js +0 -1
  854. package/mcp/src/__pycache__/server.cpython-312.pyc +0 -0
  855. package/mcp/src/__pycache__/server_core.cpython-312.pyc +0 -0
  856. package/mcp/test/__pycache__/test_server.cpython-312-pytest-8.4.1.pyc +0 -0
  857. package/mcp/test/__pycache__/test_server.cpython-312.pyc +0 -0
  858. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/.package-lock.json +0 -113
  859. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/colour/LICENSE.md +0 -82
  860. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/colour/README.md +0 -15
  861. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/colour/color.cjs +0 -1594
  862. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/colour/index.cjs +0 -1
  863. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/colour/package.json +0 -45
  864. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/sharp-darwin-arm64/LICENSE +0 -191
  865. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/sharp-darwin-arm64/README.md +0 -18
  866. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
  867. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/sharp-darwin-arm64/package.json +0 -40
  868. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/sharp-libvips-darwin-arm64/README.md +0 -46
  869. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/sharp-libvips-darwin-arm64/lib/glib-2.0/include/glibconfig.h +0 -220
  870. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/sharp-libvips-darwin-arm64/lib/index.js +0 -1
  871. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib +0 -0
  872. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/sharp-libvips-darwin-arm64/package.json +0 -36
  873. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/sharp-libvips-darwin-arm64/versions.json +0 -30
  874. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/detect-libc/LICENSE +0 -201
  875. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/detect-libc/README.md +0 -163
  876. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/detect-libc/index.d.ts +0 -14
  877. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/detect-libc/lib/detect-libc.js +0 -313
  878. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/detect-libc/lib/elf.js +0 -39
  879. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/detect-libc/lib/filesystem.js +0 -51
  880. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/detect-libc/lib/process.js +0 -24
  881. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/detect-libc/package.json +0 -44
  882. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/LICENSE +0 -15
  883. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/README.md +0 -664
  884. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/bin/semver.js +0 -191
  885. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/classes/comparator.js +0 -143
  886. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/classes/index.js +0 -7
  887. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/classes/range.js +0 -557
  888. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/classes/semver.js +0 -333
  889. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/clean.js +0 -8
  890. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/cmp.js +0 -54
  891. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/coerce.js +0 -62
  892. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/compare-build.js +0 -9
  893. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/compare-loose.js +0 -5
  894. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/compare.js +0 -7
  895. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/diff.js +0 -60
  896. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/eq.js +0 -5
  897. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/gt.js +0 -5
  898. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/gte.js +0 -5
  899. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/inc.js +0 -21
  900. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/lt.js +0 -5
  901. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/lte.js +0 -5
  902. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/major.js +0 -5
  903. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/minor.js +0 -5
  904. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/neq.js +0 -5
  905. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/parse.js +0 -18
  906. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/patch.js +0 -5
  907. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/prerelease.js +0 -8
  908. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/rcompare.js +0 -5
  909. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/rsort.js +0 -5
  910. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/satisfies.js +0 -12
  911. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/sort.js +0 -5
  912. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/functions/valid.js +0 -8
  913. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/index.js +0 -91
  914. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/internal/constants.js +0 -37
  915. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/internal/debug.js +0 -11
  916. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/internal/identifiers.js +0 -29
  917. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/internal/lrucache.js +0 -42
  918. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/internal/parse-options.js +0 -17
  919. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/internal/re.js +0 -223
  920. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/package.json +0 -78
  921. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/preload.js +0 -4
  922. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/range.bnf +0 -16
  923. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/ranges/gtr.js +0 -6
  924. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/ranges/intersects.js +0 -9
  925. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/ranges/ltr.js +0 -6
  926. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/ranges/max-satisfying.js +0 -27
  927. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/ranges/min-satisfying.js +0 -26
  928. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/ranges/min-version.js +0 -63
  929. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/ranges/outside.js +0 -82
  930. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/ranges/simplify.js +0 -49
  931. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/ranges/subset.js +0 -249
  932. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/ranges/to-comparators.js +0 -10
  933. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/semver/ranges/valid.js +0 -13
  934. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/LICENSE +0 -191
  935. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/README.md +0 -118
  936. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/install/build.js +0 -38
  937. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/install/check.js +0 -14
  938. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/lib/channel.js +0 -177
  939. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/lib/colour.js +0 -195
  940. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/lib/composite.js +0 -212
  941. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/lib/constructor.js +0 -499
  942. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/lib/index.d.ts +0 -1971
  943. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/lib/index.js +0 -16
  944. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/lib/input.js +0 -809
  945. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/lib/is.js +0 -143
  946. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/lib/libvips.js +0 -207
  947. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/lib/operation.js +0 -1016
  948. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/lib/output.js +0 -1666
  949. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/lib/resize.js +0 -595
  950. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/lib/sharp.js +0 -121
  951. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/lib/utility.js +0 -291
  952. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/package.json +0 -202
  953. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/src/binding.gyp +0 -298
  954. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/src/common.cc +0 -1130
  955. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/src/common.h +0 -402
  956. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/src/metadata.cc +0 -346
  957. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/src/metadata.h +0 -90
  958. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/src/operations.cc +0 -499
  959. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/src/operations.h +0 -137
  960. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/src/pipeline.cc +0 -1814
  961. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/src/pipeline.h +0 -408
  962. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/src/sharp.cc +0 -43
  963. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/src/stats.cc +0 -186
  964. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/src/stats.h +0 -62
  965. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/src/utilities.cc +0 -288
  966. package/skills/aipk_update-requirements-from-design/scripts/sharp-runtime/node_modules/sharp/src/utilities.h +0 -22
@@ -1,3842 +0,0 @@
1
- import type { $ZodTypeDiscriminable } from "./api.js";
2
- import * as checks from "./checks.js";
3
- import * as core from "./core.js";
4
- import { Doc } from "./doc.js";
5
- import type * as errors from "./errors.js";
6
- import { safeParse, safeParseAsync } from "./parse.js";
7
- import * as regexes from "./regexes.js";
8
- import type { StandardSchemaV1 } from "./standard-schema.js";
9
- import * as util from "./util.js";
10
- import { version } from "./versions.js";
11
-
12
- ///////////////////////////// PARSE //////////////////////////////
13
-
14
- export interface ParseContext<T extends errors.$ZodIssueBase = never> {
15
- /** Customize error messages. */
16
- readonly error?: errors.$ZodErrorMap<T>;
17
- /** Include the `input` field in issue objects. Default `false`. */
18
- readonly reportInput?: boolean;
19
- /** Skip eval-based fast path. Default `false`. */
20
- readonly jitless?: boolean;
21
- /** Abort validation after the first error. Default `false`. */
22
- // readonly abortEarly?: boolean;
23
- }
24
-
25
- /** @internal */
26
- export interface ParseContextInternal<T extends errors.$ZodIssueBase = never> extends ParseContext<T> {
27
- readonly async?: boolean | undefined;
28
- }
29
-
30
- export interface ParsePayload<T = unknown> {
31
- value: T;
32
- issues: errors.$ZodRawIssue[];
33
- }
34
-
35
- export type CheckFn<T> = (input: ParsePayload<T>) => util.MaybeAsync<void>;
36
-
37
- ///////////////////////////// SCHEMAS //////////////////////////////
38
-
39
- export interface $ZodTypeDef {
40
- type:
41
- | "string"
42
- | "number"
43
- | "int"
44
- | "boolean"
45
- | "bigint"
46
- | "symbol"
47
- | "null"
48
- | "undefined"
49
- | "void" // merge with undefined?
50
- | "never"
51
- | "any"
52
- | "unknown"
53
- | "date"
54
- | "object"
55
- | "record"
56
- | "file"
57
- | "array"
58
- | "tuple"
59
- | "union"
60
- | "intersection"
61
- | "map"
62
- | "set"
63
- | "enum"
64
- | "literal"
65
- | "nullable"
66
- | "optional"
67
- | "nonoptional"
68
- | "success"
69
- | "transform"
70
- | "default"
71
- | "prefault"
72
- | "catch"
73
- | "nan"
74
- | "pipe"
75
- | "readonly"
76
- | "template_literal"
77
- | "promise"
78
- | "lazy"
79
- | "custom";
80
- error?: errors.$ZodErrorMap<never> | undefined;
81
- checks?: checks.$ZodCheck<never>[];
82
- }
83
-
84
- export interface _$ZodTypeInternals {
85
- /** The `@zod/core` version of this schema */
86
- version: typeof version;
87
-
88
- /** Schema definition. */
89
- def: $ZodTypeDef;
90
- // types: Types;
91
-
92
- /** @internal Randomly generated ID for this schema. */
93
- // id: string;
94
-
95
- /** @internal List of deferred initializers. */
96
- deferred: util.AnyFunc[] | undefined;
97
-
98
- /** @internal Parses input and runs all checks (refinements). */
99
- run(payload: ParsePayload<any>, ctx: ParseContextInternal): util.MaybeAsync<ParsePayload>;
100
-
101
- /** @internal Parses input, doesn't run checks. */
102
- parse(payload: ParsePayload<any>, ctx: ParseContextInternal): util.MaybeAsync<ParsePayload>;
103
-
104
- /** @internal Stores identifiers for the set of traits implemented by this schema. */
105
- traits: Set<string>;
106
-
107
- /** @internal Indicates that a schema output type should be considered optional inside objects.
108
- * @default Required
109
- */
110
-
111
- /** @internal */
112
- optin?: "optional" | undefined;
113
- /** @internal */
114
- optout?: "optional" | undefined;
115
-
116
- /** @internal The set of literal values that will pass validation. Must be an exhaustive set. Used to determine optionality in z.record().
117
- *
118
- * Defined on: enum, const, literal, null, undefined
119
- * Passthrough: optional, nullable, branded, default, catch, pipe
120
- * Todo: unions?
121
- */
122
- values?: util.PrimitiveSet | undefined;
123
-
124
- /** @internal A set of literal discriminators used for the fast path in discriminated unions. */
125
- propValues?: util.PropValues | undefined;
126
-
127
- /** @internal This flag indicates that a schema validation can be represented with a regular expression. Used to determine allowable schemas in z.templateLiteral(). */
128
- pattern: RegExp | undefined;
129
-
130
- /** @internal The constructor function of this schema. */
131
- constr: new (
132
- def: any
133
- ) => $ZodType;
134
-
135
- /** @internal A catchall object for bag metadata related to this schema. Commonly modified by checks using `onattach`. */
136
- bag: Record<string, unknown>;
137
-
138
- /** @internal The set of issues this schema might throw during type checking. */
139
- isst: errors.$ZodIssueBase;
140
-
141
- /** An optional method used to override `toJSONSchema` logic. */
142
- toJSONSchema?: () => unknown;
143
-
144
- /** @internal The parent of this schema. Only set during certain clone operations. */
145
- parent?: $ZodType | undefined;
146
- }
147
- /** @internal */
148
- export interface $ZodTypeInternals<out O = unknown, out I = unknown> extends _$ZodTypeInternals {
149
- /** @internal The inferred output type */
150
- output: O; //extends { $out: infer O } ? O : Out;
151
- /** @internal The inferred input type */
152
- input: I; //extends { $in: infer I } ? I : In;
153
- }
154
-
155
- export type $ZodStandardSchema<T> = StandardSchemaV1.Props<core.input<T>, core.output<T>>;
156
-
157
- export type SomeType = { _zod: _$ZodTypeInternals };
158
-
159
- export interface $ZodType<
160
- O = unknown,
161
- I = unknown,
162
- Internals extends $ZodTypeInternals<O, I> = $ZodTypeInternals<O, I>,
163
- > {
164
- _zod: Internals;
165
- "~standard": $ZodStandardSchema<this>;
166
- }
167
- export interface _$ZodType<T extends $ZodTypeInternals = $ZodTypeInternals>
168
- extends $ZodType<T["output"], T["input"], T> {
169
- // _zod: T;
170
- }
171
-
172
- export const $ZodType: core.$constructor<$ZodType> = /*@__PURE__*/ core.$constructor("$ZodType", (inst, def) => {
173
- inst ??= {} as any;
174
-
175
- inst._zod.def = def; // set _def property
176
- inst._zod.bag = inst._zod.bag || {}; // initialize _bag object
177
- inst._zod.version = version;
178
-
179
- const checks = [...(inst._zod.def.checks ?? [])];
180
-
181
- // if inst is itself a checks.$ZodCheck, run it as a check
182
- if (inst._zod.traits.has("$ZodCheck")) {
183
- checks.unshift(inst as any);
184
- }
185
- //
186
-
187
- for (const ch of checks) {
188
- for (const fn of ch._zod.onattach) {
189
- fn(inst);
190
- }
191
- }
192
-
193
- if (checks.length === 0) {
194
- // deferred initializer
195
- // inst._zod.parse is not yet defined
196
- inst._zod.deferred ??= [];
197
- inst._zod.deferred?.push(() => {
198
- inst._zod.run = inst._zod.parse;
199
- });
200
- } else {
201
- const runChecks = (
202
- payload: ParsePayload,
203
- checks: checks.$ZodCheck<never>[],
204
- ctx?: ParseContextInternal | undefined
205
- ): util.MaybeAsync<ParsePayload> => {
206
- let isAborted = util.aborted(payload);
207
-
208
- let asyncResult!: Promise<unknown> | undefined;
209
- for (const ch of checks) {
210
- if (ch._zod.def.when) {
211
- const shouldRun = ch._zod.def.when(payload);
212
- if (!shouldRun) continue;
213
- } else if (isAborted) {
214
- continue;
215
- }
216
- const currLen = payload.issues.length;
217
- const _ = ch._zod.check(payload as any) as any as ParsePayload;
218
-
219
- if (_ instanceof Promise && ctx?.async === false) {
220
- throw new core.$ZodAsyncError();
221
- }
222
- if (asyncResult || _ instanceof Promise) {
223
- asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
224
- await _;
225
- const nextLen = payload.issues.length;
226
- if (nextLen === currLen) return;
227
- if (!isAborted) isAborted = util.aborted(payload, currLen);
228
- });
229
- } else {
230
- const nextLen = payload.issues.length;
231
- if (nextLen === currLen) continue;
232
- if (!isAborted) isAborted = util.aborted(payload, currLen);
233
- }
234
- }
235
-
236
- if (asyncResult) {
237
- return asyncResult.then(() => {
238
- return payload;
239
- });
240
- }
241
- return payload;
242
- };
243
-
244
- inst._zod.run = (payload, ctx) => {
245
- const result = inst._zod.parse(payload, ctx);
246
-
247
- if (result instanceof Promise) {
248
- if (ctx.async === false) throw new core.$ZodAsyncError();
249
- return result.then((result) => runChecks(result, checks, ctx));
250
- }
251
-
252
- return runChecks(result, checks, ctx);
253
- };
254
- }
255
-
256
- inst["~standard"] = {
257
- validate: (value: unknown) => {
258
- try {
259
- const r = safeParse(inst, value);
260
- return r.success ? { value: r.data } : { issues: r.error?.issues };
261
- } catch (_) {
262
- return safeParseAsync(inst, value).then((r) => (r.success ? { value: r.data } : { issues: r.error?.issues }));
263
- }
264
- },
265
- vendor: "zod",
266
- version: 1 as const,
267
- };
268
- });
269
-
270
- export { clone } from "./util.js";
271
-
272
- //////////////////////////////////////////
273
- //////////////////////////////////////////
274
- ////////// //////////
275
- ////////// $ZodString //////////
276
- ////////// //////////
277
- //////////////////////////////////////////
278
- //////////////////////////////////////////
279
- export interface $ZodStringDef extends $ZodTypeDef {
280
- type: "string";
281
- coerce?: boolean;
282
- checks?: checks.$ZodCheck<string>[];
283
- }
284
-
285
- export interface $ZodStringInternals<Input> extends $ZodTypeInternals<string, Input> {
286
- def: $ZodStringDef;
287
- /** @deprecated Internal API, use with caution (not deprecated) */
288
- pattern: RegExp;
289
-
290
- /** @deprecated Internal API, use with caution (not deprecated) */
291
- isst: errors.$ZodIssueInvalidType;
292
- bag: util.LoosePartial<{
293
- minimum: number;
294
- maximum: number;
295
- patterns: Set<RegExp>;
296
- format: string;
297
- contentEncoding: string;
298
- }>;
299
- }
300
-
301
- export interface $ZodString<Input = unknown> extends _$ZodType<$ZodStringInternals<Input>> {
302
- // _zod: $ZodStringInternals<Input>;
303
- }
304
-
305
- export const $ZodString: core.$constructor<$ZodString> = /*@__PURE__*/ core.$constructor("$ZodString", (inst, def) => {
306
- $ZodType.init(inst, def);
307
- inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? regexes.string(inst._zod.bag);
308
- inst._zod.parse = (payload, _) => {
309
- if (def.coerce)
310
- try {
311
- payload.value = String(payload.value);
312
- } catch (_) {}
313
-
314
- if (typeof payload.value === "string") return payload;
315
-
316
- payload.issues.push({
317
- expected: "string",
318
- code: "invalid_type",
319
- input: payload.value,
320
- inst,
321
- });
322
- return payload;
323
- };
324
- });
325
-
326
- ////////////////////////////// ZodStringFormat //////////////////////////////
327
-
328
- export interface $ZodStringFormatDef<Format extends string = string>
329
- extends $ZodStringDef,
330
- checks.$ZodCheckStringFormatDef<Format> {}
331
-
332
- export interface $ZodStringFormatInternals<Format extends string = string>
333
- extends $ZodStringInternals<string>,
334
- checks.$ZodCheckStringFormatInternals {
335
- def: $ZodStringFormatDef<Format>;
336
- }
337
- export interface $ZodStringFormat<Format extends string = string> extends $ZodType {
338
- _zod: $ZodStringFormatInternals<Format>;
339
- }
340
-
341
- export const $ZodStringFormat: core.$constructor<$ZodStringFormat> = /*@__PURE__*/ core.$constructor(
342
- "$ZodStringFormat",
343
- (inst, def): void => {
344
- // check initialization must come first
345
- checks.$ZodCheckStringFormat.init(inst, def);
346
- $ZodString.init(inst, def);
347
- }
348
- );
349
-
350
- ////////////////////////////// ZodGUID //////////////////////////////
351
- export interface $ZodGUIDDef extends $ZodStringFormatDef<"guid"> {}
352
- export interface $ZodGUIDInternals extends $ZodStringFormatInternals<"guid"> {}
353
-
354
- export interface $ZodGUID extends $ZodType {
355
- _zod: $ZodGUIDInternals;
356
- }
357
-
358
- export const $ZodGUID: core.$constructor<$ZodGUID> = /*@__PURE__*/ core.$constructor("$ZodGUID", (inst, def): void => {
359
- def.pattern ??= regexes.guid;
360
- $ZodStringFormat.init(inst, def);
361
- });
362
-
363
- ////////////////////////////// ZodUUID //////////////////////////////
364
-
365
- export interface $ZodUUIDDef extends $ZodStringFormatDef<"uuid"> {
366
- version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8";
367
- }
368
-
369
- export interface $ZodUUIDInternals extends $ZodStringFormatInternals<"uuid"> {
370
- def: $ZodUUIDDef;
371
- }
372
-
373
- export interface $ZodUUID extends $ZodType {
374
- _zod: $ZodUUIDInternals;
375
- }
376
-
377
- export const $ZodUUID: core.$constructor<$ZodUUID> = /*@__PURE__*/ core.$constructor("$ZodUUID", (inst, def): void => {
378
- if (def.version) {
379
- const versionMap: Record<string, number> = {
380
- v1: 1,
381
- v2: 2,
382
- v3: 3,
383
- v4: 4,
384
- v5: 5,
385
- v6: 6,
386
- v7: 7,
387
- v8: 8,
388
- };
389
- const v = versionMap[def.version];
390
- if (v === undefined) throw new Error(`Invalid UUID version: "${def.version}"`);
391
- def.pattern ??= regexes.uuid(v);
392
- } else def.pattern ??= regexes.uuid();
393
- $ZodStringFormat.init(inst, def);
394
- });
395
-
396
- ////////////////////////////// ZodEmail //////////////////////////////
397
-
398
- export interface $ZodEmailDef extends $ZodStringFormatDef<"email"> {}
399
- export interface $ZodEmailInternals extends $ZodStringFormatInternals<"email"> {}
400
- export interface $ZodEmail extends $ZodType {
401
- _zod: $ZodEmailInternals;
402
- }
403
-
404
- export const $ZodEmail: core.$constructor<$ZodEmail> = /*@__PURE__*/ core.$constructor(
405
- "$ZodEmail",
406
- (inst, def): void => {
407
- def.pattern ??= regexes.email;
408
- $ZodStringFormat.init(inst, def);
409
- }
410
- );
411
-
412
- ////////////////////////////// ZodURL //////////////////////////////
413
-
414
- export interface $ZodURLDef extends $ZodStringFormatDef<"url"> {
415
- hostname?: RegExp | undefined;
416
- protocol?: RegExp | undefined;
417
- }
418
- export interface $ZodURLInternals extends $ZodStringFormatInternals<"url"> {
419
- def: $ZodURLDef;
420
- }
421
-
422
- export interface $ZodURL extends $ZodType {
423
- _zod: $ZodURLInternals;
424
- }
425
-
426
- export const $ZodURL: core.$constructor<$ZodURL> = /*@__PURE__*/ core.$constructor("$ZodURL", (inst, def) => {
427
- $ZodStringFormat.init(inst, def);
428
- inst._zod.check = (payload) => {
429
- try {
430
- const orig = payload.value;
431
- const url = new URL(orig);
432
- const href = url.href;
433
-
434
- if (def.hostname) {
435
- def.hostname.lastIndex = 0;
436
- if (!def.hostname.test(url.hostname)) {
437
- payload.issues.push({
438
- code: "invalid_format",
439
- format: "url",
440
- note: "Invalid hostname",
441
- pattern: regexes.hostname.source,
442
- input: payload.value,
443
- inst,
444
- continue: !def.abort,
445
- });
446
- }
447
- }
448
-
449
- if (def.protocol) {
450
- def.protocol.lastIndex = 0;
451
- if (!def.protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol)) {
452
- payload.issues.push({
453
- code: "invalid_format",
454
- format: "url",
455
- note: "Invalid protocol",
456
- pattern: def.protocol.source,
457
- input: payload.value,
458
- inst,
459
- continue: !def.abort,
460
- });
461
- }
462
- }
463
-
464
- // payload.value = url.href;
465
- if (!orig.endsWith("/") && href.endsWith("/")) {
466
- payload.value = href.slice(0, -1);
467
- } else {
468
- payload.value = href;
469
- }
470
-
471
- return;
472
- } catch (_) {
473
- payload.issues.push({
474
- code: "invalid_format",
475
- format: "url",
476
- input: payload.value,
477
- inst,
478
- continue: !def.abort,
479
- });
480
- }
481
- };
482
- });
483
-
484
- ////////////////////////////// ZodEmoji //////////////////////////////
485
-
486
- export interface $ZodEmojiDef extends $ZodStringFormatDef<"emoji"> {}
487
- export interface $ZodEmojiInternals extends $ZodStringFormatInternals<"emoji"> {}
488
-
489
- export interface $ZodEmoji extends $ZodType {
490
- _zod: $ZodEmojiInternals;
491
- }
492
-
493
- export const $ZodEmoji: core.$constructor<$ZodEmoji> = /*@__PURE__*/ core.$constructor(
494
- "$ZodEmoji",
495
- (inst, def): void => {
496
- def.pattern ??= regexes.emoji();
497
- $ZodStringFormat.init(inst, def);
498
- }
499
- );
500
-
501
- ////////////////////////////// ZodNanoID //////////////////////////////
502
-
503
- export interface $ZodNanoIDDef extends $ZodStringFormatDef<"nanoid"> {}
504
- export interface $ZodNanoIDInternals extends $ZodStringFormatInternals<"nanoid"> {}
505
-
506
- export interface $ZodNanoID extends $ZodType {
507
- _zod: $ZodNanoIDInternals;
508
- }
509
-
510
- export const $ZodNanoID: core.$constructor<$ZodNanoID> = /*@__PURE__*/ core.$constructor(
511
- "$ZodNanoID",
512
- (inst, def): void => {
513
- def.pattern ??= regexes.nanoid;
514
- $ZodStringFormat.init(inst, def);
515
- }
516
- );
517
-
518
- ////////////////////////////// ZodCUID //////////////////////////////
519
-
520
- export interface $ZodCUIDDef extends $ZodStringFormatDef<"cuid"> {}
521
- export interface $ZodCUIDInternals extends $ZodStringFormatInternals<"cuid"> {}
522
-
523
- export interface $ZodCUID extends $ZodType {
524
- _zod: $ZodCUIDInternals;
525
- }
526
-
527
- export const $ZodCUID: core.$constructor<$ZodCUID> = /*@__PURE__*/ core.$constructor("$ZodCUID", (inst, def): void => {
528
- def.pattern ??= regexes.cuid;
529
- $ZodStringFormat.init(inst, def);
530
- });
531
-
532
- ////////////////////////////// ZodCUID2 //////////////////////////////
533
-
534
- export interface $ZodCUID2Def extends $ZodStringFormatDef<"cuid2"> {}
535
- export interface $ZodCUID2Internals extends $ZodStringFormatInternals<"cuid2"> {}
536
-
537
- export interface $ZodCUID2 extends $ZodType {
538
- _zod: $ZodCUID2Internals;
539
- }
540
-
541
- export const $ZodCUID2: core.$constructor<$ZodCUID2> = /*@__PURE__*/ core.$constructor(
542
- "$ZodCUID2",
543
- (inst, def): void => {
544
- def.pattern ??= regexes.cuid2;
545
- $ZodStringFormat.init(inst, def);
546
- }
547
- );
548
-
549
- ////////////////////////////// ZodULID //////////////////////////////
550
-
551
- export interface $ZodULIDDef extends $ZodStringFormatDef<"ulid"> {}
552
- export interface $ZodULIDInternals extends $ZodStringFormatInternals<"ulid"> {}
553
-
554
- export interface $ZodULID extends $ZodType {
555
- _zod: $ZodULIDInternals;
556
- }
557
-
558
- export const $ZodULID: core.$constructor<$ZodULID> = /*@__PURE__*/ core.$constructor("$ZodULID", (inst, def): void => {
559
- def.pattern ??= regexes.ulid;
560
- $ZodStringFormat.init(inst, def);
561
- });
562
-
563
- ////////////////////////////// ZodXID //////////////////////////////
564
-
565
- export interface $ZodXIDDef extends $ZodStringFormatDef<"xid"> {}
566
- export interface $ZodXIDInternals extends $ZodStringFormatInternals<"xid"> {}
567
-
568
- export interface $ZodXID extends $ZodType {
569
- _zod: $ZodXIDInternals;
570
- }
571
-
572
- export const $ZodXID: core.$constructor<$ZodXID> = /*@__PURE__*/ core.$constructor("$ZodXID", (inst, def): void => {
573
- def.pattern ??= regexes.xid;
574
- $ZodStringFormat.init(inst, def);
575
- });
576
-
577
- ////////////////////////////// ZodKSUID //////////////////////////////
578
-
579
- export interface $ZodKSUIDDef extends $ZodStringFormatDef<"ksuid"> {}
580
- export interface $ZodKSUIDInternals extends $ZodStringFormatInternals<"ksuid"> {}
581
-
582
- export interface $ZodKSUID extends $ZodType {
583
- _zod: $ZodKSUIDInternals;
584
- }
585
-
586
- export const $ZodKSUID: core.$constructor<$ZodKSUID> = /*@__PURE__*/ core.$constructor(
587
- "$ZodKSUID",
588
- (inst, def): void => {
589
- def.pattern ??= regexes.ksuid;
590
- $ZodStringFormat.init(inst, def);
591
- }
592
- );
593
-
594
- ////////////////////////////// ZodISODateTime //////////////////////////////
595
-
596
- export interface $ZodISODateTimeDef extends $ZodStringFormatDef<"datetime"> {
597
- precision: number | null;
598
- offset: boolean;
599
- local: boolean;
600
- }
601
-
602
- export interface $ZodISODateTimeInternals extends $ZodStringFormatInternals {
603
- def: $ZodISODateTimeDef;
604
- }
605
-
606
- export interface $ZodISODateTime extends $ZodType {
607
- _zod: $ZodISODateTimeInternals;
608
- }
609
-
610
- export const $ZodISODateTime: core.$constructor<$ZodISODateTime> = /*@__PURE__*/ core.$constructor(
611
- "$ZodISODateTime",
612
- (inst, def): void => {
613
- def.pattern ??= regexes.datetime(def);
614
- $ZodStringFormat.init(inst, def);
615
- }
616
- );
617
-
618
- ////////////////////////////// ZodISODate //////////////////////////////
619
-
620
- export interface $ZodISODateDef extends $ZodStringFormatDef<"date"> {}
621
- export interface $ZodISODateInternals extends $ZodStringFormatInternals<"date"> {}
622
-
623
- export interface $ZodISODate extends $ZodType {
624
- _zod: $ZodISODateInternals;
625
- }
626
-
627
- export const $ZodISODate: core.$constructor<$ZodISODate> = /*@__PURE__*/ core.$constructor(
628
- "$ZodISODate",
629
- (inst, def): void => {
630
- def.pattern ??= regexes.date;
631
- $ZodStringFormat.init(inst, def);
632
- }
633
- );
634
-
635
- ////////////////////////////// ZodISOTime //////////////////////////////
636
-
637
- export interface $ZodISOTimeDef extends $ZodStringFormatDef<"time"> {
638
- precision?: number | null;
639
- }
640
-
641
- export interface $ZodISOTimeInternals extends $ZodStringFormatInternals<"time"> {
642
- def: $ZodISOTimeDef;
643
- }
644
-
645
- export interface $ZodISOTime extends $ZodType {
646
- _zod: $ZodISOTimeInternals;
647
- }
648
-
649
- export const $ZodISOTime: core.$constructor<$ZodISOTime> = /*@__PURE__*/ core.$constructor(
650
- "$ZodISOTime",
651
- (inst, def): void => {
652
- def.pattern ??= regexes.time(def);
653
- $ZodStringFormat.init(inst, def);
654
- }
655
- );
656
-
657
- ////////////////////////////// ZodISODuration //////////////////////////////
658
-
659
- export interface $ZodISODurationDef extends $ZodStringFormatDef<"duration"> {}
660
- export interface $ZodISODurationInternals extends $ZodStringFormatInternals<"duration"> {}
661
-
662
- export interface $ZodISODuration extends $ZodType {
663
- _zod: $ZodISODurationInternals;
664
- }
665
-
666
- export const $ZodISODuration: core.$constructor<$ZodISODuration> = /*@__PURE__*/ core.$constructor(
667
- "$ZodISODuration",
668
- (inst, def): void => {
669
- def.pattern ??= regexes.duration;
670
- $ZodStringFormat.init(inst, def);
671
- }
672
- );
673
-
674
- ////////////////////////////// ZodIPv4 //////////////////////////////
675
-
676
- export interface $ZodIPv4Def extends $ZodStringFormatDef<"ipv4"> {
677
- version?: "v4";
678
- }
679
-
680
- export interface $ZodIPv4Internals extends $ZodStringFormatInternals<"ipv4"> {
681
- def: $ZodIPv4Def;
682
- }
683
-
684
- export interface $ZodIPv4 extends $ZodType {
685
- _zod: $ZodIPv4Internals;
686
- }
687
-
688
- export const $ZodIPv4: core.$constructor<$ZodIPv4> = /*@__PURE__*/ core.$constructor("$ZodIPv4", (inst, def): void => {
689
- def.pattern ??= regexes.ipv4;
690
- $ZodStringFormat.init(inst, def);
691
- inst._zod.onattach.push((inst) => {
692
- const bag = inst._zod.bag as $ZodStringInternals<unknown>["bag"];
693
- bag.format = `ipv4`;
694
- });
695
- });
696
-
697
- ////////////////////////////// ZodIPv6 //////////////////////////////
698
-
699
- export interface $ZodIPv6Def extends $ZodStringFormatDef<"ipv6"> {
700
- version?: "v6";
701
- }
702
-
703
- export interface $ZodIPv6Internals extends $ZodStringFormatInternals<"ipv6"> {
704
- def: $ZodIPv6Def;
705
- }
706
-
707
- export interface $ZodIPv6 extends $ZodType {
708
- _zod: $ZodIPv6Internals;
709
- }
710
-
711
- export const $ZodIPv6: core.$constructor<$ZodIPv6> = /*@__PURE__*/ core.$constructor("$ZodIPv6", (inst, def): void => {
712
- def.pattern ??= regexes.ipv6;
713
- $ZodStringFormat.init(inst, def);
714
-
715
- inst._zod.onattach.push((inst) => {
716
- const bag = inst._zod.bag as $ZodStringInternals<unknown>["bag"];
717
- bag.format = `ipv6`;
718
- });
719
-
720
- inst._zod.check = (payload) => {
721
- try {
722
- new URL(`http://[${payload.value}]`);
723
- // return;
724
- } catch {
725
- payload.issues.push({
726
- code: "invalid_format",
727
- format: "ipv6",
728
- input: payload.value,
729
- inst,
730
- continue: !def.abort,
731
- });
732
- }
733
- };
734
- });
735
-
736
- ////////////////////////////// ZodCIDRv4 //////////////////////////////
737
-
738
- export interface $ZodCIDRv4Def extends $ZodStringFormatDef<"cidrv4"> {
739
- version?: "v4";
740
- }
741
-
742
- export interface $ZodCIDRv4Internals extends $ZodStringFormatInternals<"cidrv4"> {
743
- def: $ZodCIDRv4Def;
744
- }
745
-
746
- export interface $ZodCIDRv4 extends $ZodType {
747
- _zod: $ZodCIDRv4Internals;
748
- }
749
-
750
- export const $ZodCIDRv4: core.$constructor<$ZodCIDRv4> = /*@__PURE__*/ core.$constructor(
751
- "$ZodCIDRv4",
752
- (inst, def): void => {
753
- def.pattern ??= regexes.cidrv4;
754
- $ZodStringFormat.init(inst, def);
755
- }
756
- );
757
-
758
- ////////////////////////////// ZodCIDRv6 //////////////////////////////
759
-
760
- export interface $ZodCIDRv6Def extends $ZodStringFormatDef<"cidrv6"> {
761
- version?: "v6";
762
- }
763
-
764
- export interface $ZodCIDRv6Internals extends $ZodStringFormatInternals<"cidrv6"> {
765
- def: $ZodCIDRv6Def;
766
- }
767
-
768
- export interface $ZodCIDRv6 extends $ZodType {
769
- _zod: $ZodCIDRv6Internals;
770
- }
771
-
772
- export const $ZodCIDRv6: core.$constructor<$ZodCIDRv6> = /*@__PURE__*/ core.$constructor(
773
- "$ZodCIDRv6",
774
- (inst, def): void => {
775
- def.pattern ??= regexes.cidrv6; // not used for validation
776
- $ZodStringFormat.init(inst, def);
777
-
778
- inst._zod.check = (payload) => {
779
- const [address, prefix] = payload.value.split("/");
780
- try {
781
- if (!prefix) throw new Error();
782
- const prefixNum = Number(prefix);
783
- if (`${prefixNum}` !== prefix) throw new Error();
784
- if (prefixNum < 0 || prefixNum > 128) throw new Error();
785
- new URL(`http://[${address}]`);
786
- } catch {
787
- payload.issues.push({
788
- code: "invalid_format",
789
- format: "cidrv6",
790
- input: payload.value,
791
- inst,
792
- continue: !def.abort,
793
- });
794
- }
795
- };
796
- }
797
- );
798
-
799
- ////////////////////////////// ZodBase64 //////////////////////////////
800
- export function isValidBase64(data: string): boolean {
801
- if (data === "") return true;
802
- if (data.length % 4 !== 0) return false;
803
- try {
804
- atob(data);
805
- return true;
806
- } catch {
807
- return false;
808
- }
809
- }
810
-
811
- export interface $ZodBase64Def extends $ZodStringFormatDef<"base64"> {}
812
- export interface $ZodBase64Internals extends $ZodStringFormatInternals<"base64"> {}
813
-
814
- export interface $ZodBase64 extends $ZodType {
815
- _zod: $ZodBase64Internals;
816
- }
817
-
818
- export const $ZodBase64: core.$constructor<$ZodBase64> = /*@__PURE__*/ core.$constructor(
819
- "$ZodBase64",
820
- (inst, def): void => {
821
- def.pattern ??= regexes.base64;
822
- $ZodStringFormat.init(inst, def);
823
-
824
- inst._zod.onattach.push((inst) => {
825
- inst._zod.bag.contentEncoding = "base64";
826
- });
827
-
828
- inst._zod.check = (payload) => {
829
- if (isValidBase64(payload.value)) return;
830
-
831
- payload.issues.push({
832
- code: "invalid_format",
833
- format: "base64",
834
- input: payload.value,
835
- inst,
836
- continue: !def.abort,
837
- });
838
- };
839
- }
840
- );
841
-
842
- ////////////////////////////// ZodBase64 //////////////////////////////
843
- export function isValidBase64URL(data: string): boolean {
844
- if (!regexes.base64url.test(data)) return false;
845
- const base64 = data.replace(/[-_]/g, (c) => (c === "-" ? "+" : "/"));
846
- const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, "=");
847
- return isValidBase64(padded);
848
- }
849
-
850
- export interface $ZodBase64URLDef extends $ZodStringFormatDef<"base64url"> {}
851
- export interface $ZodBase64URLInternals extends $ZodStringFormatInternals<"base64url"> {}
852
-
853
- export interface $ZodBase64URL extends $ZodType {
854
- _zod: $ZodBase64URLInternals;
855
- }
856
-
857
- export const $ZodBase64URL: core.$constructor<$ZodBase64URL> = /*@__PURE__*/ core.$constructor(
858
- "$ZodBase64URL",
859
- (inst, def): void => {
860
- def.pattern ??= regexes.base64url;
861
- $ZodStringFormat.init(inst, def);
862
-
863
- inst._zod.onattach.push((inst) => {
864
- inst._zod.bag.contentEncoding = "base64url";
865
- });
866
-
867
- inst._zod.check = (payload) => {
868
- if (isValidBase64URL(payload.value)) return;
869
-
870
- payload.issues.push({
871
- code: "invalid_format",
872
- format: "base64url",
873
- input: payload.value,
874
- inst,
875
- continue: !def.abort,
876
- });
877
- };
878
- }
879
- );
880
-
881
- ////////////////////////////// ZodE164 //////////////////////////////
882
-
883
- export interface $ZodE164Def extends $ZodStringFormatDef<"e164"> {}
884
- export interface $ZodE164Internals extends $ZodStringFormatInternals<"e164"> {}
885
-
886
- export interface $ZodE164 extends $ZodType {
887
- _zod: $ZodE164Internals;
888
- }
889
-
890
- export const $ZodE164: core.$constructor<$ZodE164> = /*@__PURE__*/ core.$constructor("$ZodE164", (inst, def): void => {
891
- def.pattern ??= regexes.e164;
892
- $ZodStringFormat.init(inst, def);
893
- });
894
-
895
- ////////////////////////////// ZodJWT //////////////////////////////
896
-
897
- export function isValidJWT(token: string, algorithm: util.JWTAlgorithm | null = null): boolean {
898
- try {
899
- const tokensParts = token.split(".");
900
- if (tokensParts.length !== 3) return false;
901
- const [header] = tokensParts;
902
- if (!header) return false;
903
- const parsedHeader = JSON.parse(atob(header));
904
- if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
905
- if (!parsedHeader.alg) return false;
906
- if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) return false;
907
- return true;
908
- } catch {
909
- return false;
910
- }
911
- }
912
-
913
- export interface $ZodJWTDef extends $ZodStringFormatDef<"jwt"> {
914
- alg?: util.JWTAlgorithm | undefined;
915
- }
916
-
917
- export interface $ZodJWTInternals extends $ZodStringFormatInternals<"jwt"> {
918
- def: $ZodJWTDef;
919
- }
920
-
921
- export interface $ZodJWT extends $ZodType {
922
- _zod: $ZodJWTInternals;
923
- }
924
-
925
- export const $ZodJWT: core.$constructor<$ZodJWT> = /*@__PURE__*/ core.$constructor("$ZodJWT", (inst, def): void => {
926
- $ZodStringFormat.init(inst, def);
927
- inst._zod.check = (payload) => {
928
- if (isValidJWT(payload.value, def.alg)) return;
929
-
930
- payload.issues.push({
931
- code: "invalid_format",
932
- format: "jwt",
933
- input: payload.value,
934
- inst,
935
- continue: !def.abort,
936
- });
937
- };
938
- });
939
-
940
- ////////////////////////////// ZodCustomStringFormat //////////////////////////////
941
-
942
- export interface $ZodCustomStringFormatDef<Format extends string = string> extends $ZodStringFormatDef<Format> {
943
- fn: (val: string) => unknown;
944
- }
945
-
946
- export interface $ZodCustomStringFormatInternals<Format extends string = string>
947
- extends $ZodStringFormatInternals<Format> {
948
- def: $ZodCustomStringFormatDef<Format>;
949
- }
950
-
951
- export interface $ZodCustomStringFormat<Format extends string = string> extends $ZodStringFormat<Format> {
952
- _zod: $ZodCustomStringFormatInternals<Format>;
953
- }
954
-
955
- export const $ZodCustomStringFormat: core.$constructor<$ZodCustomStringFormat> = /*@__PURE__*/ core.$constructor(
956
- "$ZodCustomStringFormat",
957
- (inst, def): void => {
958
- $ZodStringFormat.init(inst, def);
959
- inst._zod.check = (payload) => {
960
- if (def.fn(payload.value)) return;
961
-
962
- payload.issues.push({
963
- code: "invalid_format",
964
- format: def.format,
965
- input: payload.value,
966
- inst,
967
- continue: !def.abort,
968
- });
969
- };
970
- }
971
- );
972
-
973
- /////////////////////////////////////////
974
- /////////////////////////////////////////
975
- ////////// //////////
976
- ////////// ZodNumber //////////
977
- ////////// //////////
978
- /////////////////////////////////////////
979
- /////////////////////////////////////////
980
-
981
- export interface $ZodNumberDef extends $ZodTypeDef {
982
- type: "number";
983
- coerce?: boolean;
984
- // checks: checks.$ZodCheck<number>[];
985
- }
986
-
987
- export interface $ZodNumberInternals<Input = unknown> extends $ZodTypeInternals<number, Input> {
988
- def: $ZodNumberDef;
989
- /** @deprecated Internal API, use with caution (not deprecated) */
990
- pattern: RegExp;
991
- /** @deprecated Internal API, use with caution (not deprecated) */
992
- isst: errors.$ZodIssueInvalidType;
993
- bag: util.LoosePartial<{
994
- minimum: number;
995
- maximum: number;
996
- exclusiveMinimum: number;
997
- exclusiveMaximum: number;
998
- format: string;
999
- pattern: RegExp;
1000
- }>;
1001
- }
1002
-
1003
- export interface $ZodNumber<Input = unknown> extends $ZodType {
1004
- _zod: $ZodNumberInternals<Input>;
1005
- }
1006
-
1007
- export const $ZodNumber: core.$constructor<$ZodNumber> = /*@__PURE__*/ core.$constructor("$ZodNumber", (inst, def) => {
1008
- $ZodType.init(inst, def);
1009
- inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;
1010
-
1011
- inst._zod.parse = (payload, _ctx) => {
1012
- if (def.coerce)
1013
- try {
1014
- payload.value = Number(payload.value);
1015
- } catch (_) {}
1016
- const input = payload.value;
1017
- if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
1018
- return payload;
1019
- }
1020
-
1021
- const received =
1022
- typeof input === "number"
1023
- ? Number.isNaN(input)
1024
- ? "NaN"
1025
- : !Number.isFinite(input)
1026
- ? "Infinity"
1027
- : undefined
1028
- : undefined;
1029
-
1030
- payload.issues.push({
1031
- expected: "number",
1032
- code: "invalid_type",
1033
- input,
1034
- inst,
1035
- ...(received ? { received } : {}),
1036
- });
1037
- return payload;
1038
- };
1039
- });
1040
-
1041
- ///////////////////////////////////////////////
1042
- ////////// ZodNumberFormat //////////
1043
- ///////////////////////////////////////////////
1044
- export interface $ZodNumberFormatDef extends $ZodNumberDef, checks.$ZodCheckNumberFormatDef {}
1045
-
1046
- export interface $ZodNumberFormatInternals extends $ZodNumberInternals<number>, checks.$ZodCheckNumberFormatInternals {
1047
- def: $ZodNumberFormatDef;
1048
- isst: errors.$ZodIssueInvalidType;
1049
- }
1050
-
1051
- export interface $ZodNumberFormat extends $ZodType {
1052
- _zod: $ZodNumberFormatInternals;
1053
- }
1054
-
1055
- export const $ZodNumberFormat: core.$constructor<$ZodNumberFormat> = /*@__PURE__*/ core.$constructor(
1056
- "$ZodNumber",
1057
- (inst, def) => {
1058
- checks.$ZodCheckNumberFormat.init(inst, def);
1059
- $ZodNumber.init(inst, def); // no format checksp
1060
- }
1061
- );
1062
-
1063
- ///////////////////////////////////////////
1064
- ///////////////////////////////////////////
1065
- ////////// ///////////
1066
- ////////// $ZodBoolean //////////
1067
- ////////// ///////////
1068
- ///////////////////////////////////////////
1069
- ///////////////////////////////////////////
1070
-
1071
- export interface $ZodBooleanDef extends $ZodTypeDef {
1072
- type: "boolean";
1073
- coerce?: boolean;
1074
- checks?: checks.$ZodCheck<boolean>[];
1075
- }
1076
-
1077
- export interface $ZodBooleanInternals<T = unknown> extends $ZodTypeInternals<boolean, T> {
1078
- pattern: RegExp;
1079
- def: $ZodBooleanDef;
1080
- isst: errors.$ZodIssueInvalidType;
1081
- }
1082
-
1083
- export interface $ZodBoolean<T = unknown> extends $ZodType {
1084
- _zod: $ZodBooleanInternals<T>;
1085
- }
1086
-
1087
- export const $ZodBoolean: core.$constructor<$ZodBoolean> = /*@__PURE__*/ core.$constructor(
1088
- "$ZodBoolean",
1089
- (inst, def) => {
1090
- $ZodType.init(inst, def);
1091
- inst._zod.pattern = regexes.boolean;
1092
-
1093
- inst._zod.parse = (payload, _ctx) => {
1094
- if (def.coerce)
1095
- try {
1096
- payload.value = Boolean(payload.value);
1097
- } catch (_) {}
1098
- const input = payload.value;
1099
- if (typeof input === "boolean") return payload;
1100
- payload.issues.push({
1101
- expected: "boolean",
1102
- code: "invalid_type",
1103
- input,
1104
- inst,
1105
- });
1106
- return payload;
1107
- };
1108
- }
1109
- );
1110
-
1111
- //////////////////////////////////////////
1112
- //////////////////////////////////////////
1113
- ////////// //////////
1114
- ////////// $ZodBigInt //////////
1115
- ////////// //////////
1116
- //////////////////////////////////////////
1117
- //////////////////////////////////////////
1118
-
1119
- export interface $ZodBigIntDef extends $ZodTypeDef {
1120
- type: "bigint";
1121
- coerce?: boolean;
1122
- // checks: checks.$ZodCheck<bigint>[];
1123
- }
1124
-
1125
- export interface $ZodBigIntInternals<T = unknown> extends $ZodTypeInternals<bigint, T> {
1126
- pattern: RegExp;
1127
- /** @internal Internal API, use with caution */
1128
- def: $ZodBigIntDef;
1129
- isst: errors.$ZodIssueInvalidType;
1130
- bag: util.LoosePartial<{
1131
- minimum: bigint;
1132
- maximum: bigint;
1133
- format: string;
1134
- }>;
1135
- }
1136
-
1137
- export interface $ZodBigInt<T = unknown> extends $ZodType {
1138
- _zod: $ZodBigIntInternals<T>;
1139
- }
1140
-
1141
- export const $ZodBigInt: core.$constructor<$ZodBigInt> = /*@__PURE__*/ core.$constructor("$ZodBigInt", (inst, def) => {
1142
- $ZodType.init(inst, def);
1143
- inst._zod.pattern = regexes.bigint;
1144
-
1145
- inst._zod.parse = (payload, _ctx) => {
1146
- if (def.coerce)
1147
- try {
1148
- payload.value = BigInt(payload.value);
1149
- } catch (_) {}
1150
-
1151
- if (typeof payload.value === "bigint") return payload;
1152
- payload.issues.push({
1153
- expected: "bigint",
1154
- code: "invalid_type",
1155
- input: payload.value,
1156
- inst,
1157
- });
1158
- return payload;
1159
- };
1160
- });
1161
-
1162
- ///////////////////////////////////////////////
1163
- ////////// ZodBigIntFormat //////////
1164
- ///////////////////////////////////////////////
1165
- export interface $ZodBigIntFormatDef extends $ZodBigIntDef, checks.$ZodCheckBigIntFormatDef {
1166
- check: "bigint_format";
1167
- }
1168
-
1169
- export interface $ZodBigIntFormatInternals extends $ZodBigIntInternals<bigint>, checks.$ZodCheckBigIntFormatInternals {
1170
- def: $ZodBigIntFormatDef;
1171
- }
1172
-
1173
- export interface $ZodBigIntFormat extends $ZodType {
1174
- _zod: $ZodBigIntFormatInternals;
1175
- }
1176
-
1177
- export const $ZodBigIntFormat: core.$constructor<$ZodBigIntFormat> = /*@__PURE__*/ core.$constructor(
1178
- "$ZodBigInt",
1179
- (inst, def) => {
1180
- checks.$ZodCheckBigIntFormat.init(inst, def);
1181
- $ZodBigInt.init(inst, def); // no format checks
1182
- }
1183
- );
1184
-
1185
- ////////////////////////////////////////////
1186
- ////////////////////////////////////////////
1187
- ////////// //////////
1188
- ////////// $ZodSymbol //////////
1189
- ////////// //////////
1190
- ////////////////////////////////////////////
1191
- ////////////////////////////////////////////
1192
- export interface $ZodSymbolDef extends $ZodTypeDef {
1193
- type: "symbol";
1194
- }
1195
-
1196
- export interface $ZodSymbolInternals extends $ZodTypeInternals<symbol, symbol> {
1197
- def: $ZodSymbolDef;
1198
- isst: errors.$ZodIssueInvalidType;
1199
- }
1200
-
1201
- export interface $ZodSymbol extends $ZodType {
1202
- _zod: $ZodSymbolInternals;
1203
- }
1204
-
1205
- export const $ZodSymbol: core.$constructor<$ZodSymbol> = /*@__PURE__*/ core.$constructor("$ZodSymbol", (inst, def) => {
1206
- $ZodType.init(inst, def);
1207
-
1208
- inst._zod.parse = (payload, _ctx) => {
1209
- const input = payload.value;
1210
- if (typeof input === "symbol") return payload;
1211
- payload.issues.push({
1212
- expected: "symbol",
1213
- code: "invalid_type",
1214
- input,
1215
- inst,
1216
- });
1217
- return payload;
1218
- };
1219
- });
1220
-
1221
- ////////////////////////////////////////////
1222
- ////////////////////////////////////////////
1223
- ////////// //////////
1224
- ////////// $ZodUndefined //////////
1225
- ////////// //////////
1226
- ////////////////////////////////////////////
1227
- ////////////////////////////////////////////
1228
- export interface $ZodUndefinedDef extends $ZodTypeDef {
1229
- type: "undefined";
1230
- }
1231
-
1232
- export interface $ZodUndefinedInternals extends $ZodTypeInternals<undefined, undefined> {
1233
- pattern: RegExp;
1234
- def: $ZodUndefinedDef;
1235
- values: util.PrimitiveSet;
1236
- isst: errors.$ZodIssueInvalidType;
1237
- }
1238
-
1239
- export interface $ZodUndefined extends $ZodType {
1240
- _zod: $ZodUndefinedInternals;
1241
- }
1242
-
1243
- export const $ZodUndefined: core.$constructor<$ZodUndefined> = /*@__PURE__*/ core.$constructor(
1244
- "$ZodUndefined",
1245
- (inst, def) => {
1246
- $ZodType.init(inst, def);
1247
- inst._zod.pattern = regexes.undefined;
1248
- inst._zod.values = new Set([undefined]);
1249
- inst._zod.optin = "optional";
1250
- inst._zod.optout = "optional";
1251
-
1252
- inst._zod.parse = (payload, _ctx) => {
1253
- const input = payload.value;
1254
- if (typeof input === "undefined") return payload;
1255
- payload.issues.push({
1256
- expected: "undefined",
1257
- code: "invalid_type",
1258
- input,
1259
- inst,
1260
- });
1261
- return payload;
1262
- };
1263
- }
1264
- );
1265
-
1266
- ///////////////////////////////////////
1267
- ///////////////////////////////////////
1268
- ////////// //////////
1269
- ////////// $ZodNull /////////
1270
- ////////// //////////
1271
- ///////////////////////////////////////
1272
- ///////////////////////////////////////
1273
-
1274
- export interface $ZodNullDef extends $ZodTypeDef {
1275
- type: "null";
1276
- }
1277
-
1278
- export interface $ZodNullInternals extends $ZodTypeInternals<null, null> {
1279
- pattern: RegExp;
1280
- def: $ZodNullDef;
1281
- values: util.PrimitiveSet;
1282
- isst: errors.$ZodIssueInvalidType;
1283
- }
1284
-
1285
- export interface $ZodNull extends $ZodType {
1286
- _zod: $ZodNullInternals;
1287
- }
1288
-
1289
- export const $ZodNull: core.$constructor<$ZodNull> = /*@__PURE__*/ core.$constructor("$ZodNull", (inst, def) => {
1290
- $ZodType.init(inst, def);
1291
- inst._zod.pattern = regexes.null;
1292
- inst._zod.values = new Set([null]);
1293
-
1294
- inst._zod.parse = (payload, _ctx) => {
1295
- const input = payload.value;
1296
- if (input === null) return payload;
1297
- payload.issues.push({
1298
- expected: "null",
1299
- code: "invalid_type",
1300
- input,
1301
- inst,
1302
- });
1303
- return payload;
1304
- };
1305
- });
1306
-
1307
- //////////////////////////////////////
1308
- //////////////////////////////////////
1309
- ////////// //////////
1310
- ////////// $ZodAny //////////
1311
- ////////// //////////
1312
- //////////////////////////////////////
1313
- //////////////////////////////////////
1314
-
1315
- export interface $ZodAnyDef extends $ZodTypeDef {
1316
- type: "any";
1317
- }
1318
-
1319
- export interface $ZodAnyInternals extends $ZodTypeInternals<any, any> {
1320
- def: $ZodAnyDef;
1321
- isst: never;
1322
- }
1323
-
1324
- export interface $ZodAny extends $ZodType {
1325
- _zod: $ZodAnyInternals;
1326
- }
1327
-
1328
- export const $ZodAny: core.$constructor<$ZodAny> = /*@__PURE__*/ core.$constructor("$ZodAny", (inst, def) => {
1329
- $ZodType.init(inst, def);
1330
-
1331
- inst._zod.parse = (payload) => payload;
1332
- });
1333
-
1334
- //////////////////////////////////////////
1335
- //////////////////////////////////////////
1336
- ////////// //////////
1337
- ////////// $ZodUnknown //////////
1338
- ////////// //////////
1339
- //////////////////////////////////////////
1340
- //////////////////////////////////////////
1341
-
1342
- export interface $ZodUnknownDef extends $ZodTypeDef {
1343
- type: "unknown";
1344
- }
1345
-
1346
- export interface $ZodUnknownInternals extends $ZodTypeInternals<unknown, unknown> {
1347
- def: $ZodUnknownDef;
1348
- isst: never;
1349
- }
1350
-
1351
- export interface $ZodUnknown extends $ZodType {
1352
- _zod: $ZodUnknownInternals;
1353
- }
1354
-
1355
- export const $ZodUnknown: core.$constructor<$ZodUnknown> = /*@__PURE__*/ core.$constructor(
1356
- "$ZodUnknown",
1357
- (inst, def) => {
1358
- $ZodType.init(inst, def);
1359
-
1360
- inst._zod.parse = (payload) => payload;
1361
- }
1362
- );
1363
-
1364
- /////////////////////////////////////////
1365
- /////////////////////////////////////////
1366
- ////////// //////////
1367
- ////////// $ZodNever //////////
1368
- ////////// //////////
1369
- /////////////////////////////////////////
1370
- /////////////////////////////////////////
1371
-
1372
- export interface $ZodNeverDef extends $ZodTypeDef {
1373
- type: "never";
1374
- }
1375
-
1376
- export interface $ZodNeverInternals extends $ZodTypeInternals<never, never> {
1377
- def: $ZodNeverDef;
1378
- isst: errors.$ZodIssueInvalidType;
1379
- }
1380
-
1381
- export interface $ZodNever extends $ZodType {
1382
- _zod: $ZodNeverInternals;
1383
- }
1384
-
1385
- export const $ZodNever: core.$constructor<$ZodNever> = /*@__PURE__*/ core.$constructor("$ZodNever", (inst, def) => {
1386
- $ZodType.init(inst, def);
1387
- inst._zod.parse = (payload, _ctx) => {
1388
- payload.issues.push({
1389
- expected: "never",
1390
- code: "invalid_type",
1391
- input: payload.value,
1392
- inst,
1393
- });
1394
- return payload;
1395
- };
1396
- });
1397
-
1398
- ////////////////////////////////////////
1399
- ////////////////////////////////////////
1400
- ////////// //////////
1401
- ////////// $ZodVoid //////////
1402
- ////////// //////////
1403
- ////////////////////////////////////////
1404
- ////////////////////////////////////////
1405
-
1406
- export interface $ZodVoidDef extends $ZodTypeDef {
1407
- type: "void";
1408
- }
1409
-
1410
- export interface $ZodVoidInternals extends $ZodTypeInternals<void, void> {
1411
- def: $ZodVoidDef;
1412
- isst: errors.$ZodIssueInvalidType;
1413
- }
1414
-
1415
- export interface $ZodVoid extends $ZodType {
1416
- _zod: $ZodVoidInternals;
1417
- }
1418
-
1419
- export const $ZodVoid: core.$constructor<$ZodVoid> = /*@__PURE__*/ core.$constructor("$ZodVoid", (inst, def) => {
1420
- $ZodType.init(inst, def);
1421
-
1422
- inst._zod.parse = (payload, _ctx) => {
1423
- const input = payload.value;
1424
- if (typeof input === "undefined") return payload;
1425
- payload.issues.push({
1426
- expected: "void",
1427
- code: "invalid_type",
1428
- input,
1429
- inst,
1430
- });
1431
- return payload;
1432
- };
1433
- });
1434
-
1435
- ///////////////////////////////////////
1436
- ///////////////////////////////////////
1437
- ////////// ////////
1438
- ////////// $ZodDate ////////
1439
- ////////// ////////
1440
- ///////////////////////////////////////
1441
- ///////////////////////////////////////
1442
- export interface $ZodDateDef extends $ZodTypeDef {
1443
- type: "date";
1444
- coerce?: boolean;
1445
- }
1446
-
1447
- export interface $ZodDateInternals<T = unknown> extends $ZodTypeInternals<Date, T> {
1448
- def: $ZodDateDef;
1449
- isst: errors.$ZodIssueInvalidType; // | errors.$ZodIssueInvalidDate;
1450
- bag: util.LoosePartial<{
1451
- minimum: Date;
1452
- maximum: Date;
1453
- format: string;
1454
- }>;
1455
- }
1456
-
1457
- export interface $ZodDate<T = unknown> extends $ZodType {
1458
- _zod: $ZodDateInternals<T>;
1459
- }
1460
-
1461
- export const $ZodDate: core.$constructor<$ZodDate> = /*@__PURE__*/ core.$constructor("$ZodDate", (inst, def) => {
1462
- $ZodType.init(inst, def);
1463
-
1464
- inst._zod.parse = (payload, _ctx) => {
1465
- if (def.coerce) {
1466
- try {
1467
- payload.value = new Date(payload.value as string | number | Date);
1468
- } catch (_err: any) {}
1469
- }
1470
- const input = payload.value;
1471
-
1472
- const isDate = input instanceof Date;
1473
- const isValidDate = isDate && !Number.isNaN(input.getTime());
1474
- if (isValidDate) return payload;
1475
- payload.issues.push({
1476
- expected: "date",
1477
- code: "invalid_type",
1478
- input,
1479
- ...(isDate ? { received: "Invalid Date" } : {}),
1480
- inst,
1481
- });
1482
-
1483
- return payload;
1484
- };
1485
- });
1486
-
1487
- /////////////////////////////////////////
1488
- /////////////////////////////////////////
1489
- ////////// //////////
1490
- ////////// $ZodArray //////////
1491
- ////////// //////////
1492
- /////////////////////////////////////////
1493
- /////////////////////////////////////////
1494
-
1495
- export interface $ZodArrayDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
1496
- type: "array";
1497
- element: T;
1498
- }
1499
-
1500
- export interface $ZodArrayInternals<T extends SomeType = $ZodType> extends _$ZodTypeInternals {
1501
- //$ZodTypeInternals<core.output<T>[], core.input<T>[]> {
1502
- def: $ZodArrayDef<T>;
1503
- isst: errors.$ZodIssueInvalidType;
1504
- output: core.output<T>[];
1505
- input: core.input<T>[];
1506
- }
1507
-
1508
- export interface $ZodArray<T extends SomeType = $ZodType> extends $ZodType<any, any, $ZodArrayInternals<T>> {}
1509
-
1510
- function handleArrayResult(result: ParsePayload<any>, final: ParsePayload<any[]>, index: number) {
1511
- if (result.issues.length) {
1512
- final.issues.push(...util.prefixIssues(index, result.issues));
1513
- }
1514
- final.value[index] = result.value;
1515
- }
1516
-
1517
- export const $ZodArray: core.$constructor<$ZodArray> = /*@__PURE__*/ core.$constructor("$ZodArray", (inst, def) => {
1518
- $ZodType.init(inst, def);
1519
-
1520
- inst._zod.parse = (payload, ctx) => {
1521
- const input = payload.value;
1522
-
1523
- if (!Array.isArray(input)) {
1524
- payload.issues.push({
1525
- expected: "array",
1526
- code: "invalid_type",
1527
- input,
1528
- inst,
1529
- });
1530
- return payload;
1531
- }
1532
-
1533
- payload.value = Array(input.length);
1534
- const proms: Promise<any>[] = [];
1535
- for (let i = 0; i < input.length; i++) {
1536
- const item = input[i];
1537
- const result = def.element._zod.run(
1538
- {
1539
- value: item,
1540
- issues: [],
1541
- },
1542
- ctx
1543
- );
1544
-
1545
- if (result instanceof Promise) {
1546
- proms.push(result.then((result) => handleArrayResult(result, payload, i)));
1547
- } else {
1548
- handleArrayResult(result, payload, i);
1549
- }
1550
- }
1551
-
1552
- if (proms.length) {
1553
- return Promise.all(proms).then(() => payload);
1554
- }
1555
-
1556
- return payload; //handleArrayResultsAsync(parseResults, final);
1557
- };
1558
- });
1559
-
1560
- //////////////////////////////////////////
1561
- //////////////////////////////////////////
1562
- ////////// //////////
1563
- ////////// $ZodObject //////////
1564
- ////////// //////////
1565
- //////////////////////////////////////////
1566
- //////////////////////////////////////////
1567
-
1568
- type OptionalOutSchema = { _zod: { optout: "optional" } };
1569
- type OptionalInSchema = { _zod: { optin: "optional" } };
1570
-
1571
- export type $InferObjectOutput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T
1572
- ? util.IsAny<T[keyof T]> extends true
1573
- ? Record<string, unknown>
1574
- : Record<string, core.output<T[keyof T]>>
1575
- : keyof (T & Extra) extends never
1576
- ? Record<string, never>
1577
- : util.Prettify<
1578
- {
1579
- -readonly [k in keyof T as T[k] extends OptionalOutSchema ? never : k]: T[k]["_zod"]["output"];
1580
- } & {
1581
- -readonly [k in keyof T as T[k] extends OptionalOutSchema ? k : never]?: T[k]["_zod"]["output"];
1582
- } & Extra
1583
- >;
1584
-
1585
- export type $InferObjectInput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T
1586
- ? util.IsAny<T[keyof T]> extends true
1587
- ? Record<string, unknown>
1588
- : Record<string, core.input<T[keyof T]>>
1589
- : keyof (T & Extra) extends never
1590
- ? Record<string, never>
1591
- : util.Prettify<
1592
- {
1593
- -readonly [k in keyof T as T[k] extends OptionalInSchema ? never : k]: T[k]["_zod"]["input"];
1594
- } & {
1595
- -readonly [k in keyof T as T[k] extends OptionalInSchema ? k : never]?: T[k]["_zod"]["input"];
1596
- } & Extra
1597
- >;
1598
-
1599
- function handleObjectResult(result: ParsePayload, final: ParsePayload, key: PropertyKey) {
1600
- // if(isOptional)
1601
- if (result.issues.length) {
1602
- final.issues.push(...util.prefixIssues(key, result.issues));
1603
- }
1604
-
1605
- (final.value as any)[key] = result.value;
1606
- }
1607
-
1608
- function handleOptionalObjectResult(result: ParsePayload, final: ParsePayload, key: PropertyKey, input: any) {
1609
- if (result.issues.length) {
1610
- // validation failed against value schema
1611
- if (input[key] === undefined) {
1612
- // if input was undefined, ignore the error
1613
- if (key in input) {
1614
- (final.value as any)[key] = undefined;
1615
- } else {
1616
- (final.value as any)[key] = result.value;
1617
- }
1618
- } else {
1619
- final.issues.push(...util.prefixIssues(key, result.issues));
1620
- }
1621
- } else if (result.value === undefined) {
1622
- // validation returned `undefined`
1623
- if (key in input) (final.value as any)[key] = undefined;
1624
- } else {
1625
- // non-undefined value
1626
- (final.value as any)[key] = result.value;
1627
- }
1628
- }
1629
-
1630
- export type $ZodObjectConfig = { out: Record<string, unknown>; in: Record<string, unknown> };
1631
-
1632
- export type $loose = {
1633
- out: Record<string, unknown>;
1634
- in: Record<string, unknown>;
1635
- };
1636
- export type $strict = {
1637
- out: {};
1638
- in: {};
1639
- };
1640
- export type $strip = {
1641
- out: {};
1642
- in: {};
1643
- };
1644
-
1645
- export type $catchall<T extends SomeType> = {
1646
- out: { [k: string]: core.output<T> };
1647
- in: { [k: string]: core.input<T> };
1648
- };
1649
-
1650
- export type $ZodShape = Readonly<{ [k: string]: $ZodType }>;
1651
-
1652
- export interface $ZodObjectDef<Shape extends $ZodShape = $ZodShape> extends $ZodTypeDef {
1653
- type: "object";
1654
- shape: Shape;
1655
- catchall?: $ZodType | undefined;
1656
- }
1657
-
1658
- export interface $ZodObjectInternals<
1659
- /** @ts-ignore Cast variance */
1660
- out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>,
1661
- out Config extends $ZodObjectConfig = $ZodObjectConfig,
1662
- > extends _$ZodTypeInternals {
1663
- def: $ZodObjectDef<Shape>;
1664
- config: Config;
1665
- isst: errors.$ZodIssueInvalidType | errors.$ZodIssueUnrecognizedKeys;
1666
- propValues: util.PropValues;
1667
- output: $InferObjectOutput<Shape, Config["out"]>;
1668
- input: $InferObjectInput<Shape, Config["in"]>;
1669
- }
1670
- export type $ZodLooseShape = Record<string, any>;
1671
-
1672
- export interface $ZodObject<
1673
- /** @ts-ignore Cast variance */
1674
- out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>,
1675
- out Params extends $ZodObjectConfig = $ZodObjectConfig,
1676
- > extends $ZodType<any, any, $ZodObjectInternals<Shape, Params>> {
1677
- "~standard": $ZodStandardSchema<this>;
1678
- }
1679
-
1680
- export const $ZodObject: core.$constructor<$ZodObject> = /*@__PURE__*/ core.$constructor("$ZodObject", (inst, def) => {
1681
- // requires cast because technically $ZodObject doesn't extend
1682
- $ZodType.init(inst, def);
1683
-
1684
- const _normalized = util.cached(() => {
1685
- const keys = Object.keys(def.shape);
1686
- for (const k of keys) {
1687
- if (!(def.shape[k] instanceof $ZodType)) {
1688
- throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
1689
- }
1690
- }
1691
- const okeys = util.optionalKeys(def.shape);
1692
-
1693
- return {
1694
- shape: def.shape,
1695
- keys,
1696
- keySet: new Set(keys),
1697
- numKeys: keys.length,
1698
- optionalKeys: new Set(okeys),
1699
- };
1700
- });
1701
-
1702
- util.defineLazy(inst._zod, "propValues", () => {
1703
- const shape = def.shape;
1704
- const propValues: util.PropValues = {};
1705
- for (const key in shape) {
1706
- const field = shape[key]!._zod;
1707
- if (field.values) {
1708
- propValues[key] ??= new Set();
1709
- for (const v of field.values) propValues[key].add(v);
1710
- }
1711
- }
1712
- return propValues;
1713
- });
1714
-
1715
- const generateFastpass = (shape: any) => {
1716
- const doc = new Doc(["shape", "payload", "ctx"]);
1717
- const normalized = _normalized.value;
1718
-
1719
- const parseStr = (key: string) => {
1720
- const k = util.esc(key);
1721
- return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
1722
- };
1723
-
1724
- doc.write(`const input = payload.value;`);
1725
-
1726
- const ids: any = Object.create(null);
1727
- let counter = 0;
1728
- for (const key of normalized.keys) {
1729
- ids[key] = `key_${counter++}`;
1730
- }
1731
-
1732
- // A: preserve key order {
1733
- doc.write(`const newResult = {}`);
1734
- for (const key of normalized.keys) {
1735
- if (normalized.optionalKeys.has(key)) {
1736
- const id = ids[key];
1737
- doc.write(`const ${id} = ${parseStr(key)};`);
1738
- const k = util.esc(key);
1739
- doc.write(`
1740
- if (${id}.issues.length) {
1741
- if (input[${k}] === undefined) {
1742
- if (${k} in input) {
1743
- newResult[${k}] = undefined;
1744
- }
1745
- } else {
1746
- payload.issues = payload.issues.concat(
1747
- ${id}.issues.map((iss) => ({
1748
- ...iss,
1749
- path: iss.path ? [${k}, ...iss.path] : [${k}],
1750
- }))
1751
- );
1752
- }
1753
- } else if (${id}.value === undefined) {
1754
- if (${k} in input) newResult[${k}] = undefined;
1755
- } else {
1756
- newResult[${k}] = ${id}.value;
1757
- }
1758
- `);
1759
- } else {
1760
- const id = ids[key];
1761
- // const id = ids[key];
1762
- doc.write(`const ${id} = ${parseStr(key)};`);
1763
- doc.write(`
1764
- if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
1765
- ...iss,
1766
- path: iss.path ? [${util.esc(key)}, ...iss.path] : [${util.esc(key)}]
1767
- })));`);
1768
- doc.write(`newResult[${util.esc(key)}] = ${id}.value`);
1769
- }
1770
- }
1771
-
1772
- doc.write(`payload.value = newResult;`);
1773
- doc.write(`return payload;`);
1774
- const fn = doc.compile();
1775
- return (payload: any, ctx: any) => fn(shape, payload, ctx);
1776
- };
1777
-
1778
- let fastpass!: ReturnType<typeof generateFastpass>;
1779
-
1780
- const isObject = util.isObject;
1781
- const jit = !core.globalConfig.jitless;
1782
- const allowsEval = util.allowsEval;
1783
-
1784
- const fastEnabled = jit && allowsEval.value; // && !def.catchall;
1785
- const catchall = def.catchall;
1786
-
1787
- let value!: typeof _normalized.value;
1788
-
1789
- inst._zod.parse = (payload, ctx) => {
1790
- value ??= _normalized.value;
1791
- const input = payload.value;
1792
- if (!isObject(input)) {
1793
- payload.issues.push({
1794
- expected: "object",
1795
- code: "invalid_type",
1796
- input,
1797
- inst,
1798
- });
1799
- return payload;
1800
- }
1801
-
1802
- const proms: Promise<any>[] = [];
1803
-
1804
- if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
1805
- // always synchronous
1806
- if (!fastpass) fastpass = generateFastpass(def.shape);
1807
- payload = fastpass(payload, ctx);
1808
- } else {
1809
- payload.value = {};
1810
-
1811
- const shape = value.shape;
1812
- for (const key of value.keys) {
1813
- const el = shape[key]!;
1814
-
1815
- // do not add omitted optional keys
1816
- // if (!(key in input)) {
1817
- // if (optionalKeys.has(key)) continue;
1818
- // payload.issues.push({
1819
- // code: "invalid_type",
1820
- // path: [key],
1821
- // expected: "nonoptional",
1822
- // note: `Missing required key: "${key}"`,
1823
- // input,
1824
- // inst,
1825
- // });
1826
- // }
1827
-
1828
- const r = el._zod.run({ value: input[key], issues: [] }, ctx);
1829
- const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
1830
-
1831
- if (r instanceof Promise) {
1832
- proms.push(
1833
- r.then((r) =>
1834
- isOptional ? handleOptionalObjectResult(r, payload, key, input) : handleObjectResult(r, payload, key)
1835
- )
1836
- );
1837
- } else if (isOptional) {
1838
- handleOptionalObjectResult(r, payload, key, input);
1839
- } else {
1840
- handleObjectResult(r, payload, key);
1841
- }
1842
- }
1843
- }
1844
-
1845
- if (!catchall) {
1846
- // return payload;
1847
- return proms.length ? Promise.all(proms).then(() => payload) : payload;
1848
- }
1849
- const unrecognized: string[] = [];
1850
- // iterate over input keys
1851
- const keySet = value.keySet;
1852
- const _catchall = catchall._zod;
1853
- const t = _catchall.def.type;
1854
- for (const key of Object.keys(input)) {
1855
- if (keySet.has(key)) continue;
1856
- if (t === "never") {
1857
- unrecognized.push(key);
1858
- continue;
1859
- }
1860
- const r = _catchall.run({ value: input[key], issues: [] }, ctx);
1861
-
1862
- if (r instanceof Promise) {
1863
- proms.push(r.then((r) => handleObjectResult(r, payload, key)));
1864
- } else {
1865
- handleObjectResult(r, payload, key);
1866
- }
1867
- }
1868
-
1869
- if (unrecognized.length) {
1870
- payload.issues.push({
1871
- code: "unrecognized_keys",
1872
- keys: unrecognized,
1873
- input,
1874
- inst,
1875
- });
1876
- }
1877
-
1878
- if (!proms.length) return payload;
1879
- return Promise.all(proms).then(() => {
1880
- return payload;
1881
- });
1882
- };
1883
- });
1884
-
1885
- /////////////////////////////////////////
1886
- /////////////////////////////////////////
1887
- ////////// ///////////
1888
- ////////// $ZodUnion //////////
1889
- ////////// ///////////
1890
- /////////////////////////////////////////
1891
- /////////////////////////////////////////
1892
- // use generic to distribute union types
1893
- export type $InferUnionOutput<T extends SomeType> = T extends any ? core.output<T> : never;
1894
- export type $InferUnionInput<T extends SomeType> = T extends any ? core.input<T> : never;
1895
- export interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeDef {
1896
- type: "union";
1897
- options: Options;
1898
- }
1899
-
1900
- type IsOptionalIn<T extends SomeType> = T extends OptionalInSchema ? true : false;
1901
- type IsOptionalOut<T extends SomeType> = T extends OptionalOutSchema ? true : false;
1902
-
1903
- export interface $ZodUnionInternals<T extends readonly SomeType[] = readonly $ZodType[]> extends _$ZodTypeInternals {
1904
- def: $ZodUnionDef<T>;
1905
- isst: errors.$ZodIssueInvalidUnion;
1906
- pattern: T[number]["_zod"]["pattern"];
1907
- values: T[number]["_zod"]["values"]; //GetValues<T[number]>;
1908
- output: $InferUnionOutput<T[number]>;
1909
- input: $InferUnionInput<T[number]>;
1910
- // if any element in the union is optional, then the union is optional
1911
- optin: IsOptionalIn<T[number]> extends false ? "optional" | undefined : "optional";
1912
- optout: IsOptionalOut<T[number]> extends false ? "optional" | undefined : "optional";
1913
- }
1914
-
1915
- export interface $ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]>
1916
- extends $ZodType<any, any, $ZodUnionInternals<T>> {
1917
- _zod: $ZodUnionInternals<T>;
1918
- }
1919
-
1920
- function handleUnionResults(results: ParsePayload[], final: ParsePayload, inst: $ZodUnion, ctx?: ParseContext) {
1921
- for (const result of results) {
1922
- if (result.issues.length === 0) {
1923
- final.value = result.value;
1924
- return final;
1925
- }
1926
- }
1927
-
1928
- final.issues.push({
1929
- code: "invalid_union",
1930
- input: final.value,
1931
- inst,
1932
- errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
1933
- });
1934
-
1935
- return final;
1936
- }
1937
-
1938
- export const $ZodUnion: core.$constructor<$ZodUnion> = /*@__PURE__*/ core.$constructor("$ZodUnion", (inst, def) => {
1939
- $ZodType.init(inst, def);
1940
-
1941
- util.defineLazy(inst._zod, "optin", () =>
1942
- def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined
1943
- );
1944
-
1945
- util.defineLazy(inst._zod, "optout", () =>
1946
- def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined
1947
- );
1948
-
1949
- util.defineLazy(inst._zod, "values", () => {
1950
- if (def.options.every((o) => o._zod.values)) {
1951
- return new Set<util.Primitive>(def.options.flatMap((option) => Array.from(option._zod.values!)));
1952
- }
1953
- return undefined;
1954
- });
1955
-
1956
- util.defineLazy(inst._zod, "pattern", () => {
1957
- if (def.options.every((o) => o._zod.pattern)) {
1958
- const patterns = def.options.map((o) => o._zod.pattern);
1959
- return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p!.source)).join("|")})$`);
1960
- }
1961
- return undefined;
1962
- });
1963
-
1964
- inst._zod.parse = (payload, ctx) => {
1965
- let async = false;
1966
-
1967
- const results: util.MaybeAsync<ParsePayload>[] = [];
1968
- for (const option of def.options) {
1969
- const result = option._zod.run(
1970
- {
1971
- value: payload.value,
1972
- issues: [],
1973
- },
1974
- ctx
1975
- );
1976
- if (result instanceof Promise) {
1977
- results.push(result);
1978
- async = true;
1979
- } else {
1980
- if (result.issues.length === 0) return result;
1981
- results.push(result);
1982
- }
1983
- }
1984
-
1985
- if (!async) return handleUnionResults(results as ParsePayload[], payload, inst, ctx);
1986
- return Promise.all(results).then((results) => {
1987
- return handleUnionResults(results as ParsePayload[], payload, inst, ctx);
1988
- });
1989
- };
1990
- });
1991
-
1992
- //////////////////////////////////////////////////////
1993
- //////////////////////////////////////////////////////
1994
- ////////// //////////
1995
- ////////// $ZodDiscriminatedUnion //////////
1996
- ////////// //////////
1997
- //////////////////////////////////////////////////////
1998
- //////////////////////////////////////////////////////
1999
-
2000
- export interface $ZodDiscriminatedUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]>
2001
- extends $ZodUnionDef<Options> {
2002
- discriminator: string;
2003
- unionFallback?: boolean;
2004
- }
2005
-
2006
- export interface $ZodDiscriminatedUnionInternals<Options extends readonly SomeType[] = readonly $ZodType[]>
2007
- extends $ZodUnionInternals<Options> {
2008
- def: $ZodDiscriminatedUnionDef<Options>;
2009
- propValues: util.PropValues;
2010
- }
2011
-
2012
- export interface $ZodDiscriminatedUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType {
2013
- _zod: $ZodDiscriminatedUnionInternals<T>;
2014
- }
2015
-
2016
- export const $ZodDiscriminatedUnion: core.$constructor<$ZodDiscriminatedUnion> =
2017
- /*@__PURE__*/
2018
- core.$constructor("$ZodDiscriminatedUnion", (inst, def) => {
2019
- $ZodUnion.init(inst, def);
2020
-
2021
- const _super = inst._zod.parse;
2022
- util.defineLazy(inst._zod, "propValues", () => {
2023
- const propValues: util.PropValues = {};
2024
- for (const option of def.options) {
2025
- const pv = option._zod.propValues;
2026
- if (!pv || Object.keys(pv).length === 0)
2027
- throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
2028
- for (const [k, v] of Object.entries(pv!)) {
2029
- if (!propValues[k]) propValues[k] = new Set();
2030
- for (const val of v) {
2031
- propValues[k].add(val);
2032
- }
2033
- }
2034
- }
2035
- return propValues;
2036
- });
2037
-
2038
- const disc = util.cached(() => {
2039
- const opts = def.options as $ZodTypeDiscriminable[];
2040
- const map: Map<util.Primitive, $ZodType> = new Map();
2041
- for (const o of opts) {
2042
- const values = o._zod.propValues[def.discriminator];
2043
- if (!values || values.size === 0)
2044
- throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
2045
- for (const v of values) {
2046
- if (map.has(v)) {
2047
- throw new Error(`Duplicate discriminator value "${String(v)}"`);
2048
- }
2049
- map.set(v, o);
2050
- }
2051
- }
2052
- return map;
2053
- });
2054
-
2055
- inst._zod.parse = (payload, ctx) => {
2056
- const input = payload.value;
2057
- if (!util.isObject(input)) {
2058
- payload.issues.push({
2059
- code: "invalid_type",
2060
- expected: "object",
2061
- input,
2062
- inst,
2063
- });
2064
- return payload;
2065
- }
2066
-
2067
- const opt = disc.value.get(input?.[def.discriminator] as any);
2068
- if (opt) {
2069
- return opt._zod.run(payload, ctx) as any;
2070
- }
2071
-
2072
- if (def.unionFallback) {
2073
- return _super(payload, ctx);
2074
- }
2075
-
2076
- // no matching discriminator
2077
- payload.issues.push({
2078
- code: "invalid_union",
2079
- errors: [],
2080
- note: "No matching discriminator",
2081
- input,
2082
- path: [def.discriminator],
2083
- inst,
2084
- });
2085
-
2086
- return payload;
2087
- };
2088
- });
2089
-
2090
- ////////////////////////////////////////////////
2091
- ////////////////////////////////////////////////
2092
- ////////// //////////
2093
- ////////// $ZodIntersection //////////
2094
- ////////// //////////
2095
- ////////////////////////////////////////////////
2096
- ////////////////////////////////////////////////
2097
-
2098
- export interface $ZodIntersectionDef<Left extends SomeType = $ZodType, Right extends SomeType = $ZodType>
2099
- extends $ZodTypeDef {
2100
- type: "intersection";
2101
- left: Left;
2102
- right: Right;
2103
- }
2104
-
2105
- export interface $ZodIntersectionInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType>
2106
- extends $ZodTypeInternals<core.output<A> & core.output<B>, core.input<A> & core.input<B>> {
2107
- def: $ZodIntersectionDef<A, B>;
2108
- isst: never;
2109
- optin: A["_zod"]["optin"] | B["_zod"]["optin"];
2110
- optout: A["_zod"]["optout"] | B["_zod"]["optout"];
2111
- }
2112
-
2113
- export interface $ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
2114
- _zod: $ZodIntersectionInternals<A, B>;
2115
- }
2116
-
2117
- export const $ZodIntersection: core.$constructor<$ZodIntersection> = /*@__PURE__*/ core.$constructor(
2118
- "$ZodIntersection",
2119
- (inst, def) => {
2120
- $ZodType.init(inst, def);
2121
-
2122
- inst._zod.parse = (payload, ctx) => {
2123
- const input = payload.value;
2124
- const left = def.left._zod.run({ value: input, issues: [] }, ctx);
2125
- const right = def.right._zod.run({ value: input, issues: [] }, ctx);
2126
- const async = left instanceof Promise || right instanceof Promise;
2127
-
2128
- if (async) {
2129
- return Promise.all([left, right]).then(([left, right]) => {
2130
- return handleIntersectionResults(payload, left, right);
2131
- });
2132
- }
2133
-
2134
- return handleIntersectionResults(payload, left, right);
2135
- };
2136
- }
2137
- );
2138
-
2139
- function mergeValues(
2140
- a: any,
2141
- b: any
2142
- ): { valid: true; data: any } | { valid: false; mergeErrorPath: (string | number)[] } {
2143
- // const aType = parse.t(a);
2144
- // const bType = parse.t(b);
2145
-
2146
- if (a === b) {
2147
- return { valid: true, data: a };
2148
- }
2149
- if (a instanceof Date && b instanceof Date && +a === +b) {
2150
- return { valid: true, data: a };
2151
- }
2152
- if (util.isPlainObject(a) && util.isPlainObject(b)) {
2153
- const bKeys = Object.keys(b);
2154
- const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
2155
-
2156
- const newObj: any = { ...a, ...b };
2157
- for (const key of sharedKeys) {
2158
- const sharedValue = mergeValues(a[key], b[key]);
2159
- if (!sharedValue.valid) {
2160
- return {
2161
- valid: false,
2162
- mergeErrorPath: [key, ...sharedValue.mergeErrorPath],
2163
- };
2164
- }
2165
- newObj[key] = sharedValue.data;
2166
- }
2167
-
2168
- return { valid: true, data: newObj };
2169
- }
2170
- if (Array.isArray(a) && Array.isArray(b)) {
2171
- if (a.length !== b.length) {
2172
- return { valid: false, mergeErrorPath: [] };
2173
- }
2174
-
2175
- const newArray: unknown[] = [];
2176
- for (let index = 0; index < a.length; index++) {
2177
- const itemA = a[index];
2178
- const itemB = b[index];
2179
- const sharedValue = mergeValues(itemA, itemB);
2180
-
2181
- if (!sharedValue.valid) {
2182
- return {
2183
- valid: false,
2184
- mergeErrorPath: [index, ...sharedValue.mergeErrorPath],
2185
- };
2186
- }
2187
-
2188
- newArray.push(sharedValue.data);
2189
- }
2190
-
2191
- return { valid: true, data: newArray };
2192
- }
2193
-
2194
- return { valid: false, mergeErrorPath: [] };
2195
- }
2196
-
2197
- function handleIntersectionResults(result: ParsePayload, left: ParsePayload, right: ParsePayload): ParsePayload {
2198
- if (left.issues.length) {
2199
- result.issues.push(...left.issues);
2200
- }
2201
- if (right.issues.length) {
2202
- result.issues.push(...right.issues);
2203
- }
2204
- if (util.aborted(result)) return result;
2205
-
2206
- const merged = mergeValues(left.value, right.value);
2207
-
2208
- if (!merged.valid) {
2209
- throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);
2210
- }
2211
-
2212
- result.value = merged.data;
2213
- return result;
2214
- }
2215
-
2216
- /////////////////////////////////////////
2217
- /////////////////////////////////////////
2218
- ////////// //////////
2219
- ////////// $ZodTuple //////////
2220
- ////////// //////////
2221
- /////////////////////////////////////////
2222
- /////////////////////////////////////////
2223
-
2224
- export interface $ZodTupleDef<
2225
- T extends util.TupleItems = readonly $ZodType[],
2226
- Rest extends SomeType | null = $ZodType | null,
2227
- > extends $ZodTypeDef {
2228
- type: "tuple";
2229
- items: T;
2230
- rest: Rest;
2231
- }
2232
-
2233
- export type $InferTupleInputType<T extends util.TupleItems, Rest extends SomeType | null> = [
2234
- ...TupleInputTypeWithOptionals<T>,
2235
- ...(Rest extends SomeType ? core.input<Rest>[] : []),
2236
- ];
2237
- type TupleInputTypeNoOptionals<T extends util.TupleItems> = {
2238
- [k in keyof T]: core.input<T[k]>;
2239
- };
2240
- type TupleInputTypeWithOptionals<T extends util.TupleItems> = T extends readonly [
2241
- ...infer Prefix extends SomeType[],
2242
- infer Tail extends SomeType,
2243
- ]
2244
- ? Tail["_zod"]["optin"] extends "optional"
2245
- ? [...TupleInputTypeWithOptionals<Prefix>, core.input<Tail>?]
2246
- : TupleInputTypeNoOptionals<T>
2247
- : [];
2248
-
2249
- export type $InferTupleOutputType<T extends util.TupleItems, Rest extends SomeType | null> = [
2250
- ...TupleOutputTypeWithOptionals<T>,
2251
- ...(Rest extends SomeType ? core.output<Rest>[] : []),
2252
- ];
2253
- type TupleOutputTypeNoOptionals<T extends util.TupleItems> = {
2254
- [k in keyof T]: core.output<T[k]>;
2255
- };
2256
- type TupleOutputTypeWithOptionals<T extends util.TupleItems> = T extends readonly [
2257
- ...infer Prefix extends SomeType[],
2258
- infer Tail extends SomeType,
2259
- ]
2260
- ? Tail["_zod"]["optout"] extends "optional"
2261
- ? [...TupleOutputTypeWithOptionals<Prefix>, core.output<Tail>?]
2262
- : TupleOutputTypeNoOptionals<T>
2263
- : [];
2264
-
2265
- export interface $ZodTupleInternals<
2266
- T extends util.TupleItems = readonly $ZodType[],
2267
- Rest extends SomeType | null = $ZodType | null,
2268
- > extends $ZodTypeInternals<$InferTupleOutputType<T, Rest>, $InferTupleInputType<T, Rest>> {
2269
- def: $ZodTupleDef<T, Rest>;
2270
- isst: errors.$ZodIssueInvalidType | errors.$ZodIssueTooBig<unknown[]> | errors.$ZodIssueTooSmall<unknown[]>;
2271
- }
2272
-
2273
- export interface $ZodTuple<
2274
- T extends util.TupleItems = readonly $ZodType[],
2275
- Rest extends SomeType | null = $ZodType | null,
2276
- > extends $ZodType {
2277
- _zod: $ZodTupleInternals<T, Rest>;
2278
- }
2279
-
2280
- export const $ZodTuple: core.$constructor<$ZodTuple> = /*@__PURE__*/ core.$constructor("$ZodTuple", (inst, def) => {
2281
- $ZodType.init(inst, def);
2282
- const items = def.items;
2283
- const optStart = items.length - [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
2284
-
2285
- inst._zod.parse = (payload, ctx) => {
2286
- const input = payload.value;
2287
- if (!Array.isArray(input)) {
2288
- payload.issues.push({
2289
- input,
2290
- inst,
2291
- expected: "tuple",
2292
- code: "invalid_type",
2293
- });
2294
- return payload;
2295
- }
2296
-
2297
- payload.value = [];
2298
- const proms: Promise<any>[] = [];
2299
-
2300
- if (!def.rest) {
2301
- const tooBig = input.length > items.length;
2302
- const tooSmall = input.length < optStart - 1;
2303
- if (tooBig || tooSmall) {
2304
- payload.issues.push({
2305
- input,
2306
- inst,
2307
- origin: "array" as const,
2308
- ...(tooBig ? { code: "too_big", maximum: items.length } : { code: "too_small", minimum: items.length }),
2309
- });
2310
- return payload;
2311
- }
2312
- }
2313
-
2314
- let i = -1;
2315
- for (const item of items) {
2316
- i++;
2317
- if (i >= input.length) if (i >= optStart) continue;
2318
- const result = item._zod.run(
2319
- {
2320
- value: input[i],
2321
- issues: [],
2322
- },
2323
- ctx
2324
- );
2325
-
2326
- if (result instanceof Promise) {
2327
- proms.push(result.then((result) => handleTupleResult(result, payload, i)));
2328
- } else {
2329
- handleTupleResult(result, payload, i);
2330
- }
2331
- }
2332
-
2333
- if (def.rest) {
2334
- const rest = input.slice(items.length);
2335
- for (const el of rest) {
2336
- i++;
2337
- const result = def.rest._zod.run(
2338
- {
2339
- value: el,
2340
- issues: [],
2341
- },
2342
- ctx
2343
- );
2344
-
2345
- if (result instanceof Promise) {
2346
- proms.push(result.then((result) => handleTupleResult(result, payload, i)));
2347
- } else {
2348
- handleTupleResult(result, payload, i);
2349
- }
2350
- }
2351
- }
2352
-
2353
- if (proms.length) return Promise.all(proms).then(() => payload);
2354
- return payload;
2355
- };
2356
- });
2357
-
2358
- function handleTupleResult(result: ParsePayload, final: ParsePayload<any[]>, index: number) {
2359
- if (result.issues.length) {
2360
- final.issues.push(...util.prefixIssues(index, result.issues));
2361
- }
2362
- final.value[index] = result.value;
2363
- }
2364
-
2365
- //////////////////////////////////////////
2366
- //////////////////////////////////////////
2367
- ////////// //////////
2368
- ////////// $ZodRecord //////////
2369
- ////////// //////////
2370
- //////////////////////////////////////////
2371
- //////////////////////////////////////////
2372
-
2373
- export type $ZodRecordKey = $ZodType<string | number | symbol, string | number | symbol>; // $HasValues | $HasPattern;
2374
- export interface $ZodRecordDef<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType>
2375
- extends $ZodTypeDef {
2376
- type: "record";
2377
- keyType: Key;
2378
- valueType: Value;
2379
- }
2380
-
2381
- // export type $InferZodRecordOutput<
2382
- // Key extends $ZodRecordKey = $ZodRecordKey,
2383
- // Value extends SomeType = $ZodType,
2384
- // > = undefined extends Key["_zod"]["values"]
2385
- // ? string extends core.output<Key>
2386
- // ? Record<core.output<Key>, core.output<Value>>
2387
- // : number extends core.output<Key>
2388
- // ? Record<core.output<Key>, core.output<Value>>
2389
- // : symbol extends core.output<Key>
2390
- // ? Record<core.output<Key>, core.output<Value>>
2391
- // : Record<core.output<Key>, core.output<Value>>
2392
- // : Record<core.output<Key>, core.output<Value>>;
2393
- export type $InferZodRecordOutput<
2394
- Key extends $ZodRecordKey = $ZodRecordKey,
2395
- Value extends SomeType = $ZodType,
2396
- > = Key extends $partial
2397
- ? Partial<Record<core.output<Key>, core.output<Value>>>
2398
- : Record<core.output<Key>, core.output<Value>>;
2399
-
2400
- // export type $InferZodRecordInput<
2401
- // Key extends $ZodRecordKey = $ZodRecordKey,
2402
- // Value extends SomeType = $ZodType,
2403
- // > = undefined extends Key["_zod"]["values"]
2404
- // ? string extends core.input<Key>
2405
- // ? Record<core.input<Key>, core.input<Value>>
2406
- // : number extends core.input<Key>
2407
- // ? Record<core.input<Key>, core.input<Value>>
2408
- // : symbol extends core.input<Key>
2409
- // ? Record<core.input<Key>, core.input<Value>>
2410
- // : Record<core.input<Key>, core.input<Value>>
2411
- // : Record<core.input<Key>, core.input<Value>>;
2412
- export type $InferZodRecordInput<
2413
- Key extends $ZodRecordKey = $ZodRecordKey,
2414
- Value extends SomeType = $ZodType,
2415
- > = Key extends $partial
2416
- ? Partial<Record<core.input<Key>, core.input<Value>>>
2417
- : Record<core.input<Key>, core.input<Value>>;
2418
-
2419
- export interface $ZodRecordInternals<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType>
2420
- extends $ZodTypeInternals<$InferZodRecordOutput<Key, Value>, $InferZodRecordInput<Key, Value>> {
2421
- def: $ZodRecordDef<Key, Value>;
2422
- isst: errors.$ZodIssueInvalidType | errors.$ZodIssueInvalidKey<Record<PropertyKey, unknown>>;
2423
- optin?: "optional" | undefined;
2424
- optout?: "optional" | undefined;
2425
- }
2426
-
2427
- export type $partial = { "~~partial": true };
2428
- export interface $ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType>
2429
- extends $ZodType {
2430
- _zod: $ZodRecordInternals<Key, Value>;
2431
- }
2432
-
2433
- export const $ZodRecord: core.$constructor<$ZodRecord> = /*@__PURE__*/ core.$constructor("$ZodRecord", (inst, def) => {
2434
- $ZodType.init(inst, def);
2435
-
2436
- inst._zod.parse = (payload, ctx) => {
2437
- const input = payload.value;
2438
-
2439
- if (!util.isPlainObject(input)) {
2440
- payload.issues.push({
2441
- expected: "record",
2442
- code: "invalid_type",
2443
- input,
2444
- inst,
2445
- });
2446
- return payload;
2447
- }
2448
-
2449
- const proms: Promise<any>[] = [];
2450
-
2451
- if (def.keyType._zod.values) {
2452
- const values = def.keyType._zod.values!;
2453
- payload.value = {};
2454
- for (const key of values) {
2455
- if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
2456
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
2457
-
2458
- if (result instanceof Promise) {
2459
- proms.push(
2460
- result.then((result) => {
2461
- if (result.issues.length) {
2462
- payload.issues.push(...util.prefixIssues(key, result.issues));
2463
- }
2464
- payload.value[key] = result.value;
2465
- })
2466
- );
2467
- } else {
2468
- if (result.issues.length) {
2469
- payload.issues.push(...util.prefixIssues(key, result.issues));
2470
- }
2471
- payload.value[key] = result.value;
2472
- }
2473
- }
2474
- }
2475
-
2476
- let unrecognized!: string[];
2477
- for (const key in input) {
2478
- if (!values.has(key)) {
2479
- unrecognized = unrecognized ?? [];
2480
- unrecognized.push(key);
2481
- }
2482
- }
2483
- if (unrecognized && unrecognized.length > 0) {
2484
- payload.issues.push({
2485
- code: "unrecognized_keys",
2486
- input,
2487
- inst,
2488
- keys: unrecognized,
2489
- });
2490
- }
2491
- } else {
2492
- payload.value = {};
2493
- for (const key of Reflect.ownKeys(input)) {
2494
- if (key === "__proto__") continue;
2495
- const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
2496
-
2497
- if (keyResult instanceof Promise) {
2498
- throw new Error("Async schemas not supported in object keys currently");
2499
- }
2500
-
2501
- if (keyResult.issues.length) {
2502
- payload.issues.push({
2503
- origin: "record",
2504
- code: "invalid_key",
2505
- issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
2506
- input: key,
2507
- path: [key],
2508
- inst,
2509
- });
2510
- payload.value[keyResult.value as PropertyKey] = keyResult.value;
2511
- continue;
2512
- }
2513
-
2514
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
2515
-
2516
- if (result instanceof Promise) {
2517
- proms.push(
2518
- result.then((result) => {
2519
- if (result.issues.length) {
2520
- payload.issues.push(...util.prefixIssues(key, result.issues));
2521
- }
2522
- payload.value[keyResult.value as PropertyKey] = result.value;
2523
- })
2524
- );
2525
- } else {
2526
- if (result.issues.length) {
2527
- payload.issues.push(...util.prefixIssues(key, result.issues));
2528
- }
2529
- payload.value[keyResult.value as PropertyKey] = result.value;
2530
- }
2531
- }
2532
- }
2533
-
2534
- if (proms.length) {
2535
- return Promise.all(proms).then(() => payload);
2536
- }
2537
- return payload;
2538
- };
2539
- });
2540
-
2541
- ///////////////////////////////////////
2542
- ///////////////////////////////////////
2543
- ////////// //////////
2544
- ////////// $ZodMap //////////
2545
- ////////// //////////
2546
- ///////////////////////////////////////
2547
- ///////////////////////////////////////
2548
- export interface $ZodMapDef<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeDef {
2549
- type: "map";
2550
- keyType: Key;
2551
- valueType: Value;
2552
- }
2553
-
2554
- export interface $ZodMapInternals<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType>
2555
- extends $ZodTypeInternals<Map<core.output<Key>, core.output<Value>>, Map<core.input<Key>, core.input<Value>>> {
2556
- def: $ZodMapDef<Key, Value>;
2557
- isst: errors.$ZodIssueInvalidType | errors.$ZodIssueInvalidKey | errors.$ZodIssueInvalidElement<unknown>;
2558
- optin?: "optional" | undefined;
2559
- optout?: "optional" | undefined;
2560
- }
2561
-
2562
- export interface $ZodMap<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodType {
2563
- _zod: $ZodMapInternals<Key, Value>;
2564
- }
2565
-
2566
- export const $ZodMap: core.$constructor<$ZodMap> = /*@__PURE__*/ core.$constructor("$ZodMap", (inst, def) => {
2567
- $ZodType.init(inst, def);
2568
-
2569
- inst._zod.parse = (payload, ctx) => {
2570
- const input = payload.value;
2571
- if (!(input instanceof Map)) {
2572
- payload.issues.push({
2573
- expected: "map",
2574
- code: "invalid_type",
2575
- input,
2576
- inst,
2577
- });
2578
- return payload;
2579
- }
2580
-
2581
- const proms: Promise<any>[] = [];
2582
- payload.value = new Map();
2583
-
2584
- for (const [key, value] of input) {
2585
- const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
2586
- const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);
2587
-
2588
- if (keyResult instanceof Promise || valueResult instanceof Promise) {
2589
- proms.push(
2590
- Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {
2591
- handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
2592
- })
2593
- );
2594
- } else {
2595
- handleMapResult(keyResult as ParsePayload, valueResult as ParsePayload, payload, key, input, inst, ctx);
2596
- }
2597
- }
2598
-
2599
- if (proms.length) return Promise.all(proms).then(() => payload);
2600
- return payload;
2601
- };
2602
- });
2603
-
2604
- function handleMapResult(
2605
- keyResult: ParsePayload,
2606
- valueResult: ParsePayload,
2607
- final: ParsePayload<Map<unknown, unknown>>,
2608
- key: unknown,
2609
- input: Map<any, any>,
2610
- inst: $ZodMap,
2611
- ctx?: ParseContext | undefined
2612
- ): void {
2613
- if (keyResult.issues.length) {
2614
- if (util.propertyKeyTypes.has(typeof key)) {
2615
- final.issues.push(...util.prefixIssues(key as PropertyKey, keyResult.issues));
2616
- } else {
2617
- final.issues.push({
2618
- origin: "map",
2619
- code: "invalid_key",
2620
- input,
2621
- inst,
2622
- issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
2623
- });
2624
- }
2625
- }
2626
- if (valueResult.issues.length) {
2627
- if (util.propertyKeyTypes.has(typeof key)) {
2628
- final.issues.push(...util.prefixIssues(key as PropertyKey, valueResult.issues));
2629
- } else {
2630
- final.issues.push({
2631
- origin: "map",
2632
- code: "invalid_element",
2633
- input,
2634
- inst,
2635
- key: key,
2636
- issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
2637
- });
2638
- }
2639
- }
2640
- final.value.set(keyResult.value, valueResult.value);
2641
- }
2642
-
2643
- ///////////////////////////////////////
2644
- ///////////////////////////////////////
2645
- ////////// //////////
2646
- ////////// $ZodSet //////////
2647
- ////////// //////////
2648
- ///////////////////////////////////////
2649
- ///////////////////////////////////////
2650
- export interface $ZodSetDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
2651
- type: "set";
2652
- valueType: T;
2653
- }
2654
-
2655
- export interface $ZodSetInternals<T extends SomeType = $ZodType>
2656
- extends $ZodTypeInternals<Set<core.output<T>>, Set<core.input<T>>> {
2657
- def: $ZodSetDef<T>;
2658
- isst: errors.$ZodIssueInvalidType;
2659
- optin?: "optional" | undefined;
2660
- optout?: "optional" | undefined;
2661
- }
2662
-
2663
- export interface $ZodSet<T extends SomeType = $ZodType> extends $ZodType {
2664
- _zod: $ZodSetInternals<T>;
2665
- }
2666
-
2667
- export const $ZodSet: core.$constructor<$ZodSet> = /*@__PURE__*/ core.$constructor("$ZodSet", (inst, def) => {
2668
- $ZodType.init(inst, def);
2669
-
2670
- inst._zod.parse = (payload, ctx) => {
2671
- const input = payload.value;
2672
- if (!(input instanceof Set)) {
2673
- payload.issues.push({
2674
- input,
2675
- inst,
2676
- expected: "set",
2677
- code: "invalid_type",
2678
- });
2679
- return payload;
2680
- }
2681
-
2682
- const proms: Promise<any>[] = [];
2683
- payload.value = new Set();
2684
- for (const item of input) {
2685
- const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
2686
- if (result instanceof Promise) {
2687
- proms.push(result.then((result) => handleSetResult(result, payload)));
2688
- } else handleSetResult(result, payload);
2689
- }
2690
-
2691
- if (proms.length) return Promise.all(proms).then(() => payload);
2692
- return payload;
2693
- };
2694
- });
2695
-
2696
- function handleSetResult(result: ParsePayload, final: ParsePayload<Set<any>>) {
2697
- if (result.issues.length) {
2698
- final.issues.push(...result.issues);
2699
- }
2700
- final.value.add(result.value);
2701
- }
2702
-
2703
- ////////////////////////////////////////
2704
- ////////////////////////////////////////
2705
- ////////// //////////
2706
- ////////// $ZodEnum //////////
2707
- ////////// //////////
2708
- ////////////////////////////////////////
2709
- ////////////////////////////////////////
2710
- export type $InferEnumOutput<T extends util.EnumLike> = T[keyof T] & {};
2711
- export type $InferEnumInput<T extends util.EnumLike> = T[keyof T] & {};
2712
-
2713
- export interface $ZodEnumDef<T extends util.EnumLike = util.EnumLike> extends $ZodTypeDef {
2714
- type: "enum";
2715
- entries: T;
2716
- }
2717
-
2718
- export interface $ZodEnumInternals<
2719
- /** @ts-ignore Cast variance */
2720
- out T extends util.EnumLike = util.EnumLike,
2721
- > extends $ZodTypeInternals<$InferEnumOutput<T>, $InferEnumInput<T>> {
2722
- // enum: T;
2723
-
2724
- def: $ZodEnumDef<T>;
2725
- /** @deprecated Internal API, use with caution (not deprecated) */
2726
- values: util.PrimitiveSet;
2727
- /** @deprecated Internal API, use with caution (not deprecated) */
2728
- pattern: RegExp;
2729
- isst: errors.$ZodIssueInvalidValue;
2730
- }
2731
-
2732
- export interface $ZodEnum<T extends util.EnumLike = util.EnumLike> extends $ZodType {
2733
- _zod: $ZodEnumInternals<T>;
2734
- }
2735
-
2736
- export const $ZodEnum: core.$constructor<$ZodEnum> = /*@__PURE__*/ core.$constructor("$ZodEnum", (inst, def) => {
2737
- $ZodType.init(inst, def);
2738
-
2739
- const values = util.getEnumValues(def.entries);
2740
-
2741
- inst._zod.values = new Set<util.Primitive>(values);
2742
-
2743
- inst._zod.pattern = new RegExp(
2744
- `^(${values
2745
- .filter((k) => util.propertyKeyTypes.has(typeof k))
2746
- .map((o) => (typeof o === "string" ? util.escapeRegex(o) : o.toString()))
2747
- .join("|")})$`
2748
- );
2749
-
2750
- inst._zod.parse = (payload, _ctx) => {
2751
- const input = payload.value;
2752
- if (inst._zod.values.has(input)) {
2753
- return payload;
2754
- }
2755
- payload.issues.push({
2756
- code: "invalid_value",
2757
- values,
2758
- input,
2759
- inst,
2760
- });
2761
- return payload;
2762
- };
2763
- });
2764
-
2765
- ////////////////////////////////////////
2766
- ////////////////////////////////////////
2767
- ////////// //////////
2768
- ////////// $ZodLiteral //////////
2769
- ////////// //////////
2770
- ////////////////////////////////////////
2771
- ////////////////////////////////////////
2772
-
2773
- export interface $ZodLiteralDef<T extends util.Literal> extends $ZodTypeDef {
2774
- type: "literal";
2775
- values: T[];
2776
- }
2777
-
2778
- export interface $ZodLiteralInternals<T extends util.Literal = util.Literal> extends $ZodTypeInternals<T, T> {
2779
- def: $ZodLiteralDef<T>;
2780
- values: Set<T>;
2781
- pattern: RegExp;
2782
- isst: errors.$ZodIssueInvalidValue;
2783
- }
2784
-
2785
- export interface $ZodLiteral<T extends util.Literal = util.Literal> extends $ZodType {
2786
- _zod: $ZodLiteralInternals<T>;
2787
- }
2788
-
2789
- export const $ZodLiteral: core.$constructor<$ZodLiteral> = /*@__PURE__*/ core.$constructor(
2790
- "$ZodLiteral",
2791
- (inst, def) => {
2792
- $ZodType.init(inst, def);
2793
-
2794
- inst._zod.values = new Set<util.Literal>(def.values);
2795
- inst._zod.pattern = new RegExp(
2796
- `^(${def.values
2797
-
2798
- .map((o) => (typeof o === "string" ? util.escapeRegex(o) : o ? o.toString() : String(o)))
2799
- .join("|")})$`
2800
- );
2801
-
2802
- inst._zod.parse = (payload, _ctx) => {
2803
- const input = payload.value;
2804
- if (inst._zod.values.has(input)) {
2805
- return payload;
2806
- }
2807
- payload.issues.push({
2808
- code: "invalid_value",
2809
- values: def.values,
2810
- input,
2811
- inst,
2812
- });
2813
- return payload;
2814
- };
2815
- }
2816
- );
2817
-
2818
- ////////////////////////////////////////
2819
- ////////////////////////////////////////
2820
- ////////// //////////
2821
- ////////// $ZodConst //////////
2822
- ////////// //////////
2823
- ////////////////////////////////////////
2824
- ////////////////////////////////////////
2825
-
2826
- // export interface $ZodConstDef extends $ZodTypeDef {
2827
- // type: "const";
2828
- // value: unknown;
2829
- // }
2830
-
2831
- // export _interface $ZodConstInternals<T extends util.Literal = util.Literal> extends $ZodTypeInternals<T, T> {
2832
- // _def: $ZodConstDef;
2833
- // _values: util.PrimitiveSet;
2834
- // _pattern: RegExp;
2835
- // _isst: errors.$ZodIssueInvalidValue;
2836
- // }
2837
-
2838
- // export const $ZodConst: core.$constructor<{_zod: $ZodConstInternals}> = /*@__PURE__*/ core.$constructor("$ZodConst", (inst, def) => {
2839
- // $ZodType.init(inst, def);
2840
-
2841
- // if (util.primitiveTypes.has(typeof def.value) || def.value === null) {
2842
- // inst._zod.values = new Set<util.Primitive>(def.value as any);
2843
- // }
2844
-
2845
- // if (util.propertyKeyTypes.has(typeof def.value)) {
2846
- // inst._zod.pattern = new RegExp(
2847
- // `^(${typeof def.value === "string" ? util.escapeRegex(def.value) : (def.value as any).toString()})$`
2848
- // );
2849
- // } else {
2850
- // throw new Error("Const value cannot be converted to regex");
2851
- // }
2852
-
2853
- // inst._zod.parse = (payload, _ctx) => {
2854
- // payload.value = def.value; // always override
2855
- // return payload;
2856
- // };
2857
- // });
2858
-
2859
- //////////////////////////////////////////
2860
- //////////////////////////////////////////
2861
- ////////// //////////
2862
- ////////// $ZodFile //////////
2863
- ////////// //////////
2864
- //////////////////////////////////////////
2865
- //////////////////////////////////////////
2866
-
2867
- // provide a fallback in case the File interface isn't provided in the environment
2868
- declare global {
2869
- interface File {}
2870
- }
2871
-
2872
- export interface $ZodFileDef extends $ZodTypeDef {
2873
- type: "file";
2874
- }
2875
-
2876
- export interface $ZodFileInternals extends $ZodTypeInternals<File, File> {
2877
- def: $ZodFileDef;
2878
- isst: errors.$ZodIssueInvalidType;
2879
- bag: util.LoosePartial<{
2880
- minimum: number;
2881
- maximum: number;
2882
- mime: util.MimeTypes[];
2883
- }>;
2884
- }
2885
-
2886
- export interface $ZodFile extends $ZodType {
2887
- _zod: $ZodFileInternals;
2888
- }
2889
-
2890
- export const $ZodFile: core.$constructor<$ZodFile> = /*@__PURE__*/ core.$constructor("$ZodFile", (inst, def) => {
2891
- $ZodType.init(inst, def);
2892
-
2893
- inst._zod.parse = (payload, _ctx) => {
2894
- const input = payload.value;
2895
- if (input instanceof File) return payload;
2896
- payload.issues.push({
2897
- expected: "file",
2898
- code: "invalid_type",
2899
- input,
2900
- inst,
2901
- });
2902
- return payload;
2903
- };
2904
- });
2905
-
2906
- //////////////////////////////////////////////
2907
- //////////////////////////////////////////////
2908
- ////////// //////////
2909
- ////////// $ZodTransform //////////
2910
- ////////// //////////
2911
- //////////////////////////////////////////////
2912
- //////////////////////////////////////////////
2913
- export interface $ZodTransformDef extends $ZodTypeDef {
2914
- type: "transform";
2915
- transform: (input: unknown, payload: ParsePayload<unknown>) => util.MaybeAsync<unknown>;
2916
- }
2917
- export interface $ZodTransformInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I> {
2918
- def: $ZodTransformDef;
2919
- isst: never;
2920
- }
2921
-
2922
- export interface $ZodTransform<O = unknown, I = unknown> extends $ZodType {
2923
- _zod: $ZodTransformInternals<O, I>;
2924
- }
2925
-
2926
- export const $ZodTransform: core.$constructor<$ZodTransform> = /*@__PURE__*/ core.$constructor(
2927
- "$ZodTransform",
2928
- (inst, def) => {
2929
- $ZodType.init(inst, def);
2930
- inst._zod.parse = (payload, _ctx) => {
2931
- const _out = def.transform(payload.value, payload);
2932
- if (_ctx.async) {
2933
- const output = _out instanceof Promise ? _out : Promise.resolve(_out);
2934
- return output.then((output) => {
2935
- payload.value = output;
2936
- return payload;
2937
- });
2938
- }
2939
-
2940
- if (_out instanceof Promise) {
2941
- throw new core.$ZodAsyncError();
2942
- }
2943
-
2944
- payload.value = _out;
2945
- return payload;
2946
- };
2947
- }
2948
- );
2949
-
2950
- ////////////////////////////////////////////
2951
- ////////////////////////////////////////////
2952
- ////////// //////////
2953
- ////////// $ZodOptional //////////
2954
- ////////// //////////
2955
- ////////////////////////////////////////////
2956
- ////////////////////////////////////////////
2957
- export interface $ZodOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
2958
- type: "optional";
2959
- innerType: T;
2960
- }
2961
-
2962
- export interface $ZodOptionalInternals<T extends SomeType = $ZodType>
2963
- extends $ZodTypeInternals<core.output<T> | undefined, core.input<T> | undefined> {
2964
- def: $ZodOptionalDef<T>;
2965
- optin: "optional";
2966
- optout: "optional";
2967
- isst: never;
2968
- values: T["_zod"]["values"];
2969
- pattern: T["_zod"]["pattern"];
2970
- }
2971
-
2972
- export interface $ZodOptional<T extends SomeType = $ZodType> extends $ZodType {
2973
- _zod: $ZodOptionalInternals<T>;
2974
- }
2975
-
2976
- export const $ZodOptional: core.$constructor<$ZodOptional> = /*@__PURE__*/ core.$constructor(
2977
- "$ZodOptional",
2978
- (inst, def) => {
2979
- $ZodType.init(inst, def);
2980
- inst._zod.optin = "optional";
2981
- inst._zod.optout = "optional";
2982
-
2983
- util.defineLazy(inst._zod, "values", () => {
2984
- return def.innerType._zod.values ? new Set([...def.innerType._zod.values, undefined]) : undefined;
2985
- });
2986
- util.defineLazy(inst._zod, "pattern", () => {
2987
- const pattern = def.innerType._zod.pattern;
2988
- return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;
2989
- });
2990
-
2991
- inst._zod.parse = (payload, ctx) => {
2992
- if (def.innerType._zod.optin === "optional") {
2993
- return def.innerType._zod.run(payload, ctx);
2994
- }
2995
- if (payload.value === undefined) {
2996
- return payload;
2997
- }
2998
- return def.innerType._zod.run(payload, ctx);
2999
- };
3000
- }
3001
- );
3002
-
3003
- ////////////////////////////////////////////
3004
- ////////////////////////////////////////////
3005
- ////////// //////////
3006
- ////////// $ZodNullable //////////
3007
- ////////// //////////
3008
- ////////////////////////////////////////////
3009
- ////////////////////////////////////////////
3010
- export interface $ZodNullableDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
3011
- type: "nullable";
3012
- innerType: T;
3013
- }
3014
-
3015
- export interface $ZodNullableInternals<T extends SomeType = $ZodType>
3016
- extends $ZodTypeInternals<core.output<T> | null, core.input<T> | null> {
3017
- def: $ZodNullableDef<T>;
3018
- optin: T["_zod"]["optin"];
3019
- optout: T["_zod"]["optout"];
3020
- isst: never;
3021
- values: T["_zod"]["values"];
3022
- pattern: T["_zod"]["pattern"];
3023
- }
3024
-
3025
- export interface $ZodNullable<T extends SomeType = $ZodType> extends $ZodType {
3026
- _zod: $ZodNullableInternals<T>;
3027
- }
3028
-
3029
- export const $ZodNullable: core.$constructor<$ZodNullable> = /*@__PURE__*/ core.$constructor(
3030
- "$ZodNullable",
3031
- (inst, def) => {
3032
- $ZodType.init(inst, def);
3033
- util.defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3034
- util.defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3035
-
3036
- util.defineLazy(inst._zod, "pattern", () => {
3037
- const pattern = def.innerType._zod.pattern;
3038
- return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;
3039
- });
3040
-
3041
- util.defineLazy(inst._zod, "values", () => {
3042
- return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : undefined;
3043
- });
3044
-
3045
- inst._zod.parse = (payload, ctx) => {
3046
- if (payload.value === null) return payload;
3047
- return def.innerType._zod.run(payload, ctx);
3048
- };
3049
- }
3050
- );
3051
- // );
3052
-
3053
- ////////////////////////////////////////////
3054
- ////////////////////////////////////////////
3055
- ////////// //////////
3056
- ////////// $ZodDefault //////////
3057
- ////////// //////////
3058
- ////////////////////////////////////////////
3059
- ////////////////////////////////////////////
3060
- export interface $ZodDefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
3061
- type: "default";
3062
- innerType: T;
3063
- /** The default value. May be a getter. */
3064
- defaultValue: util.NoUndefined<core.output<T>>;
3065
- }
3066
-
3067
- export interface $ZodDefaultInternals<T extends SomeType = $ZodType>
3068
- extends $ZodTypeInternals<util.NoUndefined<core.output<T>>, core.input<T> | undefined> {
3069
- def: $ZodDefaultDef<T>;
3070
- optin: "optional";
3071
- optout?: "optional" | undefined; // required
3072
- isst: never;
3073
- values: T["_zod"]["values"];
3074
- }
3075
-
3076
- export interface $ZodDefault<T extends SomeType = $ZodType> extends $ZodType {
3077
- _zod: $ZodDefaultInternals<T>;
3078
- }
3079
-
3080
- export const $ZodDefault: core.$constructor<$ZodDefault> = /*@__PURE__*/ core.$constructor(
3081
- "$ZodDefault",
3082
- (inst, def) => {
3083
- $ZodType.init(inst, def);
3084
-
3085
- // inst._zod.qin = "true";
3086
- inst._zod.optin = "optional";
3087
- util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3088
-
3089
- inst._zod.parse = (payload, ctx) => {
3090
- if (payload.value === undefined) {
3091
- payload.value = def.defaultValue;
3092
- /**
3093
- * $ZodDefault always returns the default value immediately.
3094
- * It doesn't pass the default value into the validator ("prefault"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a "prefault" for the pipe. */
3095
- return payload;
3096
- }
3097
- const result = def.innerType._zod.run(payload, ctx);
3098
- if (result instanceof Promise) {
3099
- return result.then((result) => handleDefaultResult(result, def));
3100
- }
3101
- return handleDefaultResult(result, def);
3102
- };
3103
- }
3104
- );
3105
-
3106
- function handleDefaultResult(payload: ParsePayload, def: $ZodDefaultDef) {
3107
- if (payload.value === undefined) {
3108
- payload.value = def.defaultValue;
3109
- }
3110
- return payload;
3111
- }
3112
-
3113
- ////////////////////////////////////////////
3114
- ////////////////////////////////////////////
3115
- ////////// //////////
3116
- ////////// $ZodPrefault //////////
3117
- ////////// //////////
3118
- ////////////////////////////////////////////
3119
- ////////////////////////////////////////////
3120
-
3121
- export interface $ZodPrefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
3122
- type: "prefault";
3123
- innerType: T;
3124
- /** The default value. May be a getter. */
3125
- defaultValue: core.input<T>;
3126
- }
3127
-
3128
- export interface $ZodPrefaultInternals<T extends SomeType = $ZodType>
3129
- extends $ZodTypeInternals<util.NoUndefined<core.output<T>>, core.input<T> | undefined> {
3130
- def: $ZodPrefaultDef<T>;
3131
- optin: "optional";
3132
- optout?: "optional" | undefined;
3133
- isst: never;
3134
- values: T["_zod"]["values"];
3135
- }
3136
-
3137
- export interface $ZodPrefault<T extends SomeType = $ZodType> extends $ZodType {
3138
- _zod: $ZodPrefaultInternals<T>;
3139
- }
3140
-
3141
- export const $ZodPrefault: core.$constructor<$ZodPrefault> = /*@__PURE__*/ core.$constructor(
3142
- "$ZodPrefault",
3143
- (inst, def) => {
3144
- $ZodType.init(inst, def);
3145
-
3146
- inst._zod.optin = "optional";
3147
- util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3148
-
3149
- inst._zod.parse = (payload, ctx) => {
3150
- if (payload.value === undefined) {
3151
- payload.value = def.defaultValue;
3152
- }
3153
- return def.innerType._zod.run(payload, ctx);
3154
- };
3155
- }
3156
- );
3157
-
3158
- ///////////////////////////////////////////////
3159
- ///////////////////////////////////////////////
3160
- ////////// //////////
3161
- ////////// $ZodNonOptional //////////
3162
- ////////// //////////
3163
- ///////////////////////////////////////////////
3164
- ///////////////////////////////////////////////
3165
- export interface $ZodNonOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
3166
- type: "nonoptional";
3167
- innerType: T;
3168
- }
3169
-
3170
- export interface $ZodNonOptionalInternals<T extends SomeType = $ZodType>
3171
- extends $ZodTypeInternals<util.NoUndefined<core.output<T>>, util.NoUndefined<core.input<T>>> {
3172
- def: $ZodNonOptionalDef<T>;
3173
- isst: errors.$ZodIssueInvalidType;
3174
- values: T["_zod"]["values"];
3175
- optin: "optional" | undefined;
3176
- optout: "optional" | undefined;
3177
- }
3178
-
3179
- export interface $ZodNonOptional<T extends SomeType = $ZodType> extends $ZodType {
3180
- _zod: $ZodNonOptionalInternals<T>;
3181
- }
3182
-
3183
- export const $ZodNonOptional: core.$constructor<$ZodNonOptional> = /*@__PURE__*/ core.$constructor(
3184
- "$ZodNonOptional",
3185
- (inst, def) => {
3186
- $ZodType.init(inst, def);
3187
-
3188
- util.defineLazy(inst._zod, "values", () => {
3189
- const v = def.innerType._zod.values;
3190
- return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;
3191
- });
3192
-
3193
- inst._zod.parse = (payload, ctx) => {
3194
- const result = def.innerType._zod.run(payload, ctx);
3195
- if (result instanceof Promise) {
3196
- return result.then((result) => handleNonOptionalResult(result, inst));
3197
- }
3198
- return handleNonOptionalResult(result, inst);
3199
- };
3200
- }
3201
- );
3202
-
3203
- function handleNonOptionalResult(payload: ParsePayload, inst: $ZodNonOptional) {
3204
- if (!payload.issues.length && payload.value === undefined) {
3205
- payload.issues.push({
3206
- code: "invalid_type",
3207
- expected: "nonoptional",
3208
- input: payload.value,
3209
- inst,
3210
- });
3211
- }
3212
- return payload;
3213
- }
3214
-
3215
- ////////////////////////////////////////////
3216
- ////////////////////////////////////////////
3217
- ////////// //////////
3218
- ////////// $ZodCoalesce //////////
3219
- ////////// //////////
3220
- ////////////////////////////////////////////
3221
- ////////////////////////////////////////////
3222
- // export interface $ZodCoalesceDef<T extends $ZodType = $ZodType> extends $ZodTypeDef {
3223
- // type: "coalesce";
3224
- // innerType: T;
3225
- // defaultValue: () => NonNullable<T['_zod']["output"]>;
3226
- // }
3227
-
3228
- // export _interface $ZodCoalesceInternals<T extends $ZodType = $ZodType>
3229
- // extends $ZodTypeInternals<NonNullable<T['_zod']["output"]>, T['_zod']["input"] | undefined | null> {
3230
- // _def: $ZodCoalesceDef<T>;
3231
- // _isst: errors.$ZodIssueInvalidType;
3232
- // _qin: "true";
3233
- // }
3234
-
3235
- // function handleCoalesceResult(payload: ParsePayload, def: $ZodCoalesceDef) {
3236
- // payload.value ??= def.defaultValue();
3237
- // return payload;
3238
- // }
3239
-
3240
- // export const $ZodCoalesce: core.$constructor<{_zod: $ZodCoalesceInternals}> = /*@__PURE__*/ core.$constructor(
3241
- // "$ZodCoalesce",
3242
- // (inst, def) => {
3243
- // $ZodType.init(inst, def);
3244
- // inst._zod.qin = "true";
3245
- // inst._zod.parse = (payload, ctx) => {
3246
- // const result = def.innerType._zod.run(payload, ctx);
3247
- // if (result instanceof Promise) {
3248
- // return result.then((result) => handleCoalesceResult(result, def));
3249
- // }
3250
- // return handleCoalesceResult(result, def);
3251
- // };
3252
- // }
3253
- // );
3254
-
3255
- /////////////////////////////////////////////
3256
- /////////////////////////////////////////////
3257
- ////////// //////////
3258
- ////////// $ZodSuccess //////////
3259
- ////////// //////////
3260
- /////////////////////////////////////////////
3261
- /////////////////////////////////////////////
3262
- export interface $ZodSuccessDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
3263
- type: "success";
3264
- innerType: T;
3265
- }
3266
-
3267
- export interface $ZodSuccessInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<boolean, core.input<T>> {
3268
- def: $ZodSuccessDef<T>;
3269
- isst: never;
3270
- optin: T["_zod"]["optin"];
3271
- optout: "optional" | undefined;
3272
- }
3273
-
3274
- export interface $ZodSuccess<T extends SomeType = $ZodType> extends $ZodType {
3275
- _zod: $ZodSuccessInternals<T>;
3276
- }
3277
-
3278
- export const $ZodSuccess: core.$constructor<$ZodSuccess> = /*@__PURE__*/ core.$constructor(
3279
- "$ZodSuccess",
3280
- (inst, def) => {
3281
- $ZodType.init(inst, def);
3282
-
3283
- inst._zod.parse = (payload, ctx) => {
3284
- const result = def.innerType._zod.run(payload, ctx);
3285
- if (result instanceof Promise) {
3286
- return result.then((result) => {
3287
- payload.value = result.issues.length === 0;
3288
- return payload;
3289
- });
3290
- }
3291
- payload.value = result.issues.length === 0;
3292
- return payload;
3293
- };
3294
- }
3295
- );
3296
-
3297
- ////////////////////////////////////////////
3298
- ////////////////////////////////////////////
3299
- ////////// //////////
3300
- ////////// $ZodCatch //////////
3301
- ////////// //////////
3302
- ////////////////////////////////////////////
3303
- ////////////////////////////////////////////
3304
- export interface $ZodCatchCtx extends ParsePayload {
3305
- /** @deprecated Use `ctx.issues` */
3306
- error: { issues: errors.$ZodIssue[] };
3307
- /** @deprecated Use `ctx.value` */
3308
- input: unknown;
3309
- }
3310
- export interface $ZodCatchDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
3311
- type: "catch";
3312
- innerType: T;
3313
- catchValue: (ctx: $ZodCatchCtx) => unknown;
3314
- }
3315
-
3316
- export interface $ZodCatchInternals<T extends SomeType = $ZodType>
3317
- extends $ZodTypeInternals<core.output<T>, core.input<T> | util.Whatever> {
3318
- def: $ZodCatchDef<T>;
3319
- // qin: T["_zod"]["qin"];
3320
- // qout: T["_zod"]["qout"];
3321
-
3322
- optin: T["_zod"]["optin"];
3323
- optout: T["_zod"]["optout"];
3324
- isst: never;
3325
- values: T["_zod"]["values"];
3326
- }
3327
-
3328
- export interface $ZodCatch<T extends SomeType = $ZodType> extends $ZodType {
3329
- _zod: $ZodCatchInternals<T>;
3330
- }
3331
-
3332
- export const $ZodCatch: core.$constructor<$ZodCatch> = /*@__PURE__*/ core.$constructor("$ZodCatch", (inst, def) => {
3333
- $ZodType.init(inst, def);
3334
- inst._zod.optin = "optional";
3335
- util.defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3336
- util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3337
-
3338
- inst._zod.parse = (payload, ctx) => {
3339
- const result = def.innerType._zod.run(payload, ctx);
3340
- if (result instanceof Promise) {
3341
- return result.then((result) => {
3342
- payload.value = result.value;
3343
- if (result.issues.length) {
3344
- payload.value = def.catchValue({
3345
- ...payload,
3346
- error: {
3347
- issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
3348
- },
3349
- input: payload.value,
3350
- });
3351
- payload.issues = [];
3352
- }
3353
-
3354
- return payload;
3355
- });
3356
- }
3357
-
3358
- payload.value = result.value;
3359
- if (result.issues.length) {
3360
- payload.value = def.catchValue({
3361
- ...payload,
3362
- error: {
3363
- issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
3364
- },
3365
- input: payload.value,
3366
- });
3367
- payload.issues = [];
3368
- }
3369
-
3370
- return payload;
3371
- };
3372
- });
3373
-
3374
- ////////////////////////////////////////////
3375
- ////////////////////////////////////////////
3376
- ////////// //////////
3377
- ////////// $ZodNaN //////////
3378
- ////////// //////////
3379
- ////////////////////////////////////////////
3380
- ////////////////////////////////////////////
3381
- export interface $ZodNaNDef extends $ZodTypeDef {
3382
- type: "nan";
3383
- }
3384
-
3385
- export interface $ZodNaNInternals extends $ZodTypeInternals<number, number> {
3386
- def: $ZodNaNDef;
3387
- isst: errors.$ZodIssueInvalidType;
3388
- }
3389
-
3390
- export interface $ZodNaN extends $ZodType {
3391
- _zod: $ZodNaNInternals;
3392
- }
3393
-
3394
- export const $ZodNaN: core.$constructor<$ZodNaN> = /*@__PURE__*/ core.$constructor("$ZodNaN", (inst, def) => {
3395
- $ZodType.init(inst, def);
3396
-
3397
- inst._zod.parse = (payload, _ctx) => {
3398
- if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) {
3399
- payload.issues.push({
3400
- input: payload.value,
3401
- inst,
3402
- expected: "nan",
3403
- code: "invalid_type",
3404
- });
3405
- return payload;
3406
- }
3407
- return payload;
3408
- };
3409
- });
3410
-
3411
- ////////////////////////////////////////////
3412
- ////////////////////////////////////////////
3413
- ////////// //////////
3414
- ////////// $ZodPipe //////////
3415
- ////////// //////////
3416
- ////////////////////////////////////////////
3417
- ////////////////////////////////////////////
3418
- export interface $ZodPipeDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeDef {
3419
- type: "pipe";
3420
- in: A;
3421
- out: B;
3422
- }
3423
-
3424
- export interface $ZodPipeInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType>
3425
- extends $ZodTypeInternals<core.output<B>, core.input<A>> {
3426
- def: $ZodPipeDef<A, B>;
3427
- isst: never;
3428
- values: A["_zod"]["values"];
3429
- optin: A["_zod"]["optin"];
3430
- optout: B["_zod"]["optout"];
3431
- }
3432
-
3433
- export interface $ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
3434
- _zod: $ZodPipeInternals<A, B>;
3435
- }
3436
-
3437
- export const $ZodPipe: core.$constructor<$ZodPipe> = /*@__PURE__*/ core.$constructor("$ZodPipe", (inst, def) => {
3438
- $ZodType.init(inst, def);
3439
- util.defineLazy(inst._zod, "values", () => def.in._zod.values);
3440
- util.defineLazy(inst._zod, "optin", () => def.in._zod.optin);
3441
- util.defineLazy(inst._zod, "optout", () => def.out._zod.optout);
3442
-
3443
- inst._zod.parse = (payload, ctx) => {
3444
- const left = def.in._zod.run(payload, ctx);
3445
- if (left instanceof Promise) {
3446
- return left.then((left) => handlePipeResult(left, def, ctx));
3447
- }
3448
- return handlePipeResult(left, def, ctx);
3449
- };
3450
- });
3451
-
3452
- function handlePipeResult(left: ParsePayload, def: $ZodPipeDef, ctx: ParseContext) {
3453
- if (util.aborted(left)) {
3454
- return left;
3455
- }
3456
- return def.out._zod.run({ value: left.value, issues: left.issues }, ctx);
3457
- }
3458
-
3459
- ////////////////////////////////////////////
3460
- ////////////////////////////////////////////
3461
- ////////// //////////
3462
- ////////// $ZodReadonly //////////
3463
- ////////// //////////
3464
- ////////////////////////////////////////////
3465
- ////////////////////////////////////////////
3466
-
3467
- export interface $ZodReadonlyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
3468
- type: "readonly";
3469
- innerType: T;
3470
- }
3471
-
3472
- export interface $ZodReadonlyInternals<T extends SomeType = $ZodType>
3473
- extends $ZodTypeInternals<util.MakeReadonly<core.output<T>>, util.MakeReadonly<core.input<T>>> {
3474
- def: $ZodReadonlyDef<T>;
3475
- optin: T["_zod"]["optin"];
3476
- optout: T["_zod"]["optout"];
3477
- isst: never;
3478
- propValues: T["_zod"]["propValues"];
3479
- values: T["_zod"]["values"];
3480
- }
3481
-
3482
- export interface $ZodReadonly<T extends SomeType = $ZodType> extends $ZodType {
3483
- _zod: $ZodReadonlyInternals<T>;
3484
- }
3485
-
3486
- export const $ZodReadonly: core.$constructor<$ZodReadonly> = /*@__PURE__*/ core.$constructor(
3487
- "$ZodReadonly",
3488
- (inst, def) => {
3489
- $ZodType.init(inst, def);
3490
- util.defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
3491
- util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3492
- util.defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3493
- util.defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3494
-
3495
- inst._zod.parse = (payload, ctx) => {
3496
- const result = def.innerType._zod.run(payload, ctx);
3497
- if (result instanceof Promise) {
3498
- return result.then(handleReadonlyResult);
3499
- }
3500
- return handleReadonlyResult(result);
3501
- };
3502
- }
3503
- );
3504
-
3505
- function handleReadonlyResult(payload: ParsePayload): ParsePayload {
3506
- payload.value = Object.freeze(payload.value);
3507
- return payload;
3508
- }
3509
-
3510
- /////////////////////////////////////////////
3511
- /////////////////////////////////////////////
3512
- ////////// //////////
3513
- ////////// $ZodTemplateLiteral //////////
3514
- ////////// //////////
3515
- /////////////////////////////////////////////
3516
- /////////////////////////////////////////////
3517
-
3518
- export interface $ZodTemplateLiteralDef extends $ZodTypeDef {
3519
- type: "template_literal";
3520
- parts: $ZodTemplateLiteralPart[];
3521
- }
3522
- export interface $ZodTemplateLiteralInternals<Template extends string = string>
3523
- extends $ZodTypeInternals<Template, Template> {
3524
- pattern: RegExp;
3525
- def: $ZodTemplateLiteralDef;
3526
- isst: errors.$ZodIssueInvalidType;
3527
- }
3528
-
3529
- export interface $ZodTemplateLiteral<Template extends string = string> extends $ZodType {
3530
- _zod: $ZodTemplateLiteralInternals<Template>;
3531
- }
3532
-
3533
- type LiteralPart = Exclude<util.Literal, symbol>; //string | number | boolean | null | undefined;
3534
- interface SchemaPartInternals extends $ZodTypeInternals<LiteralPart, LiteralPart> {
3535
- pattern: RegExp;
3536
- }
3537
- interface SchemaPart extends $ZodType {
3538
- _zod: SchemaPartInternals;
3539
- }
3540
- export type $ZodTemplateLiteralPart = LiteralPart | SchemaPart;
3541
-
3542
- type UndefinedToEmptyString<T> = T extends undefined ? "" : T;
3543
- type AppendToTemplateLiteral<
3544
- Template extends string,
3545
- Suffix extends LiteralPart | $ZodType,
3546
- > = Suffix extends LiteralPart
3547
- ? `${Template}${UndefinedToEmptyString<Suffix>}`
3548
- : Suffix extends $ZodType
3549
- ? `${Template}${core.output<Suffix> extends infer T extends LiteralPart ? UndefinedToEmptyString<T> : never}`
3550
- : never;
3551
-
3552
- export type ConcatenateTupleOfStrings<T extends string[]> = T extends [
3553
- infer First extends string,
3554
- ...infer Rest extends string[],
3555
- ]
3556
- ? Rest extends string[]
3557
- ? First extends ""
3558
- ? ConcatenateTupleOfStrings<Rest>
3559
- : `${First}${ConcatenateTupleOfStrings<Rest>}`
3560
- : never
3561
- : "";
3562
- export type ConvertPartsToStringTuple<Parts extends $ZodTemplateLiteralPart[]> = {
3563
- [K in keyof Parts]: Parts[K] extends LiteralPart
3564
- ? `${UndefinedToEmptyString<Parts[K]>}`
3565
- : Parts[K] extends $ZodType
3566
- ? `${core.output<Parts[K]> extends infer T extends LiteralPart ? UndefinedToEmptyString<T> : never}`
3567
- : never;
3568
- };
3569
-
3570
- export type ToTemplateLiteral<Parts extends $ZodTemplateLiteralPart[]> = ConcatenateTupleOfStrings<
3571
- ConvertPartsToStringTuple<Parts>
3572
- >;
3573
- // type lkjasd = ConcatenateTupleOfStrings<["Hello", " ", "World", "!"]>; // "Hello World!"
3574
- export type $PartsToTemplateLiteral<Parts extends $ZodTemplateLiteralPart[]> = [] extends Parts
3575
- ? ``
3576
- : Parts extends [...infer Rest, infer Last extends $ZodTemplateLiteralPart]
3577
- ? Rest extends $ZodTemplateLiteralPart[]
3578
- ? AppendToTemplateLiteral<$PartsToTemplateLiteral<Rest>, Last>
3579
- : never
3580
- : never;
3581
-
3582
- export const $ZodTemplateLiteral: core.$constructor<$ZodTemplateLiteral> = /*@__PURE__*/ core.$constructor(
3583
- "$ZodTemplateLiteral",
3584
- (inst, def) => {
3585
- $ZodType.init(inst, def);
3586
- const regexParts: string[] = [];
3587
- for (const part of def.parts) {
3588
- if (part instanceof $ZodType) {
3589
- if (!part._zod.pattern) {
3590
- // if (!source)
3591
- throw new Error(`Invalid template literal part, no pattern found: ${[...(part as any)._zod.traits].shift()}`);
3592
- }
3593
-
3594
- const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;
3595
-
3596
- if (!source) throw new Error(`Invalid template literal part: ${part._zod.traits}`);
3597
-
3598
- const start = source.startsWith("^") ? 1 : 0;
3599
- const end = source.endsWith("$") ? source.length - 1 : source.length;
3600
- regexParts.push(source.slice(start, end));
3601
- } else if (part === null || util.primitiveTypes.has(typeof part)) {
3602
- regexParts.push(util.escapeRegex(`${part}`));
3603
- } else {
3604
- throw new Error(`Invalid template literal part: ${part}`);
3605
- }
3606
- }
3607
- inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`);
3608
-
3609
- inst._zod.parse = (payload, _ctx) => {
3610
- if (typeof payload.value !== "string") {
3611
- payload.issues.push({
3612
- input: payload.value,
3613
- inst,
3614
- expected: "template_literal",
3615
- code: "invalid_type",
3616
- });
3617
- return payload;
3618
- }
3619
-
3620
- inst._zod.pattern.lastIndex = 0;
3621
-
3622
- if (!inst._zod.pattern.test(payload.value)) {
3623
- payload.issues.push({
3624
- input: payload.value,
3625
- inst,
3626
- code: "invalid_format",
3627
- format: "template_literal",
3628
- pattern: inst._zod.pattern.source,
3629
- });
3630
- return payload;
3631
- }
3632
-
3633
- return payload;
3634
- };
3635
- }
3636
- );
3637
-
3638
- /////////////////////////////////////////
3639
- /////////////////////////////////////////
3640
- ////////// //////////
3641
- ////////// $ZodPromise //////////
3642
- ////////// //////////
3643
- /////////////////////////////////////////
3644
- /////////////////////////////////////////
3645
- export interface $ZodPromiseDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
3646
- type: "promise";
3647
- innerType: T;
3648
- }
3649
-
3650
- export interface $ZodPromiseInternals<T extends SomeType = $ZodType>
3651
- extends $ZodTypeInternals<core.output<T>, util.MaybeAsync<core.input<T>>> {
3652
- def: $ZodPromiseDef<T>;
3653
- isst: never;
3654
- }
3655
-
3656
- export interface $ZodPromise<T extends SomeType = $ZodType> extends $ZodType {
3657
- _zod: $ZodPromiseInternals<T>;
3658
- }
3659
-
3660
- export const $ZodPromise: core.$constructor<$ZodPromise> = /*@__PURE__*/ core.$constructor(
3661
- "$ZodPromise",
3662
- (inst, def) => {
3663
- $ZodType.init(inst, def);
3664
-
3665
- inst._zod.parse = (payload, ctx) => {
3666
- return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));
3667
- };
3668
- }
3669
- );
3670
-
3671
- //////////////////////////////////////////
3672
- //////////////////////////////////////////
3673
- ////////// //////////
3674
- ////////// $ZodLazy //////////
3675
- ////////// //////////
3676
- //////////////////////////////////////////
3677
- //////////////////////////////////////////
3678
-
3679
- export interface $ZodLazyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
3680
- type: "lazy";
3681
- getter: () => T;
3682
- }
3683
-
3684
- export interface $ZodLazyInternals<T extends SomeType = $ZodType>
3685
- extends $ZodTypeInternals<core.output<T>, core.input<T>> {
3686
- def: $ZodLazyDef<T>;
3687
- isst: never;
3688
- /** Auto-cached way to retrieve the inner schema */
3689
- innerType: T;
3690
- pattern: T["_zod"]["pattern"];
3691
- propValues: T["_zod"]["propValues"];
3692
- optin: T["_zod"]["optin"];
3693
- optout: T["_zod"]["optout"];
3694
- }
3695
-
3696
- export interface $ZodLazy<T extends SomeType = $ZodType> extends $ZodType {
3697
- _zod: $ZodLazyInternals<T>;
3698
- }
3699
-
3700
- export const $ZodLazy: core.$constructor<$ZodLazy> = /*@__PURE__*/ core.$constructor("$ZodLazy", (inst, def) => {
3701
- $ZodType.init(inst, def);
3702
-
3703
- util.defineLazy(inst._zod, "innerType", () => def.getter() as $ZodType);
3704
- util.defineLazy(inst._zod, "pattern", () => inst._zod.innerType._zod.pattern);
3705
- util.defineLazy(inst._zod, "propValues", () => inst._zod.innerType._zod.propValues);
3706
- util.defineLazy(inst._zod, "optin", () => inst._zod.innerType._zod.optin);
3707
- util.defineLazy(inst._zod, "optout", () => inst._zod.innerType._zod.optout);
3708
- inst._zod.parse = (payload, ctx) => {
3709
- const inner = inst._zod.innerType;
3710
- return inner._zod.run(payload, ctx);
3711
- };
3712
- });
3713
-
3714
- ////////////////////////////////////////
3715
- ////////////////////////////////////////
3716
- ////////// //////////
3717
- ////////// $ZodCustom //////////
3718
- ////////// //////////
3719
- ////////////////////////////////////////
3720
- ////////////////////////////////////////
3721
- export interface $ZodCustomDef<O = unknown> extends $ZodTypeDef, checks.$ZodCheckDef {
3722
- type: "custom";
3723
- check: "custom";
3724
- path?: PropertyKey[] | undefined;
3725
- error?: errors.$ZodErrorMap | undefined;
3726
- params?: Record<string, any> | undefined;
3727
- fn: (arg: O) => unknown;
3728
- }
3729
-
3730
- export interface $ZodCustomInternals<O = unknown, I = unknown>
3731
- extends $ZodTypeInternals<O, I>,
3732
- checks.$ZodCheckInternals<O> {
3733
- def: $ZodCustomDef;
3734
- issc: errors.$ZodIssue;
3735
- isst: never;
3736
- bag: util.LoosePartial<{
3737
- Class: typeof util.Class;
3738
- }>;
3739
- }
3740
-
3741
- export interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
3742
- _zod: $ZodCustomInternals<O, I>;
3743
- }
3744
-
3745
- export const $ZodCustom: core.$constructor<$ZodCustom> = /*@__PURE__*/ core.$constructor("$ZodCustom", (inst, def) => {
3746
- checks.$ZodCheck.init(inst, def);
3747
- $ZodType.init(inst, def);
3748
-
3749
- inst._zod.parse = (payload, _) => {
3750
- return payload;
3751
- };
3752
-
3753
- inst._zod.check = (payload) => {
3754
- const input = payload.value;
3755
- const r = def.fn(input as any);
3756
- if (r instanceof Promise) {
3757
- return r.then((r) => handleRefineResult(r, payload, input, inst));
3758
- }
3759
- handleRefineResult(r, payload, input, inst);
3760
- return;
3761
- };
3762
- });
3763
-
3764
- function handleRefineResult(result: unknown, payload: ParsePayload, input: unknown, inst: $ZodCustom): void {
3765
- if (!result) {
3766
- const _iss: any = {
3767
- code: "custom",
3768
- input,
3769
- inst, // incorporates params.error into issue reporting
3770
- path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting
3771
- continue: !inst._zod.def.abort,
3772
- // params: inst._zod.def.params,
3773
- };
3774
- if (inst._zod.def.params) _iss.params = inst._zod.def.params;
3775
- payload.issues.push(util.issue(_iss));
3776
- }
3777
- }
3778
-
3779
- export type $ZodTypes =
3780
- | $ZodString
3781
- | $ZodNumber
3782
- | $ZodBigInt
3783
- | $ZodBoolean
3784
- | $ZodDate
3785
- | $ZodSymbol
3786
- | $ZodUndefined
3787
- | $ZodNullable
3788
- | $ZodNull
3789
- | $ZodAny
3790
- | $ZodUnknown
3791
- | $ZodNever
3792
- | $ZodVoid
3793
- | $ZodArray
3794
- | $ZodObject
3795
- | $ZodUnion
3796
- | $ZodIntersection
3797
- | $ZodTuple
3798
- | $ZodRecord
3799
- | $ZodMap
3800
- | $ZodSet
3801
- | $ZodLiteral
3802
- | $ZodEnum
3803
- | $ZodPromise
3804
- | $ZodLazy
3805
- | $ZodOptional
3806
- | $ZodDefault
3807
- | $ZodPrefault
3808
- | $ZodTemplateLiteral
3809
- | $ZodCustom
3810
- | $ZodTransform
3811
- | $ZodNonOptional
3812
- | $ZodReadonly
3813
- | $ZodNaN
3814
- | $ZodPipe
3815
- | $ZodSuccess
3816
- | $ZodCatch
3817
- | $ZodFile;
3818
-
3819
- export type $ZodStringFormatTypes =
3820
- | $ZodGUID
3821
- | $ZodUUID
3822
- | $ZodEmail
3823
- | $ZodURL
3824
- | $ZodEmoji
3825
- | $ZodNanoID
3826
- | $ZodCUID
3827
- | $ZodCUID2
3828
- | $ZodULID
3829
- | $ZodXID
3830
- | $ZodKSUID
3831
- | $ZodISODateTime
3832
- | $ZodISODate
3833
- | $ZodISOTime
3834
- | $ZodISODuration
3835
- | $ZodIPv4
3836
- | $ZodIPv6
3837
- | $ZodCIDRv4
3838
- | $ZodCIDRv6
3839
- | $ZodBase64
3840
- | $ZodBase64URL
3841
- | $ZodE164
3842
- | $ZodJWT;