zudoku 0.0.0-fix-firebase-export.f8270825 → 0.0.0-fix-warnings.z053d4e27

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 (424) hide show
  1. package/dist/app/main.d.ts +6 -6
  2. package/dist/cli/common/version-check.js +12 -3
  3. package/dist/cli/common/version-check.js.map +1 -1
  4. package/dist/config/loader.js +3 -1
  5. package/dist/config/loader.js.map +1 -1
  6. package/dist/config/validators/InputNavigationSchema.d.ts +121 -119
  7. package/dist/config/validators/InputNavigationSchema.js +1 -0
  8. package/dist/config/validators/InputNavigationSchema.js.map +1 -1
  9. package/dist/config/validators/NavigationSchema.js +6 -1
  10. package/dist/config/validators/NavigationSchema.js.map +1 -1
  11. package/dist/config/validators/ProtectedRoutesSchema.d.ts +1 -1
  12. package/dist/config/validators/validate.d.ts +60 -13
  13. package/dist/config/validators/validate.js +7 -4
  14. package/dist/config/validators/validate.js.map +1 -1
  15. package/dist/flat-config.d.ts +28 -26
  16. package/dist/index.d.ts +2 -1
  17. package/dist/index.js +2 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/lib/auth/issuer.js +1 -1
  20. package/dist/lib/auth/issuer.js.map +1 -1
  21. package/dist/lib/authentication/authentication.d.ts +3 -2
  22. package/dist/lib/authentication/components/CallbackHandler.js +1 -1
  23. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  24. package/dist/lib/authentication/components/SignIn.js +4 -2
  25. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  26. package/dist/lib/authentication/components/SignUp.js +4 -2
  27. package/dist/lib/authentication/components/SignUp.js.map +1 -1
  28. package/dist/lib/authentication/hook.d.ts +2 -0
  29. package/dist/lib/authentication/hook.js +10 -0
  30. package/dist/lib/authentication/hook.js.map +1 -1
  31. package/dist/lib/authentication/providers/auth0.js +11 -7
  32. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  33. package/dist/lib/authentication/providers/clerk.js +0 -22
  34. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  35. package/dist/lib/authentication/providers/firebase.js +67 -9
  36. package/dist/lib/authentication/providers/firebase.js.map +1 -1
  37. package/dist/lib/authentication/providers/supabase.js +6 -15
  38. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  39. package/dist/lib/authentication/ui/EmailVerificationUi.d.ts +4 -0
  40. package/dist/lib/authentication/ui/EmailVerificationUi.js +34 -0
  41. package/dist/lib/authentication/ui/EmailVerificationUi.js.map +1 -0
  42. package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +7 -2
  43. package/dist/lib/authentication/ui/ZudokuAuthUi.js +43 -11
  44. package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -1
  45. package/dist/lib/authentication/utils/relativeRedirectUrl.d.ts +1 -0
  46. package/dist/lib/authentication/utils/relativeRedirectUrl.js +8 -0
  47. package/dist/lib/authentication/utils/relativeRedirectUrl.js.map +1 -0
  48. package/dist/lib/components/Heading.d.ts +1 -1
  49. package/dist/lib/components/Pagination.js +2 -2
  50. package/dist/lib/components/Pagination.js.map +1 -1
  51. package/dist/lib/components/index.d.ts +18 -69
  52. package/dist/lib/components/index.js +19 -32
  53. package/dist/lib/components/index.js.map +1 -1
  54. package/dist/lib/components/navigation/NavigationItem.js +2 -2
  55. package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
  56. package/dist/lib/core/RouteGuard.js +12 -7
  57. package/dist/lib/core/RouteGuard.js.map +1 -1
  58. package/dist/lib/core/plugins.d.ts +11 -1
  59. package/dist/lib/core/plugins.js +1 -0
  60. package/dist/lib/core/plugins.js.map +1 -1
  61. package/dist/lib/core/react-query.d.ts +1 -0
  62. package/dist/lib/core/react-query.js +2 -0
  63. package/dist/lib/core/react-query.js.map +1 -0
  64. package/dist/lib/core/transform-config.d.ts +2 -0
  65. package/dist/lib/core/transform-config.js +22 -0
  66. package/dist/lib/core/transform-config.js.map +1 -0
  67. package/dist/lib/errors/ErrorMessage.d.ts +3 -0
  68. package/dist/lib/errors/ErrorMessage.js +16 -0
  69. package/dist/lib/errors/ErrorMessage.js.map +1 -0
  70. package/dist/lib/hooks/index.d.ts +7 -28
  71. package/dist/lib/hooks/index.js +7 -15
  72. package/dist/lib/hooks/index.js.map +1 -1
  73. package/dist/lib/oas/graphql/circular.d.ts +2 -0
  74. package/dist/lib/oas/graphql/circular.js +32 -10
  75. package/dist/lib/oas/graphql/circular.js.map +1 -1
  76. package/dist/lib/oas/graphql/circular.test.d.ts +1 -0
  77. package/dist/lib/oas/graphql/circular.test.js +152 -0
  78. package/dist/lib/oas/graphql/circular.test.js.map +1 -0
  79. package/dist/lib/oas/graphql/index.js +7 -3
  80. package/dist/lib/oas/graphql/index.js.map +1 -1
  81. package/dist/lib/oas/parser/index.js +14 -5
  82. package/dist/lib/oas/parser/index.js.map +1 -1
  83. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +9 -172
  84. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  85. package/dist/lib/plugins/api-keys/index.d.ts +11 -4
  86. package/dist/lib/plugins/api-keys/index.js +36 -22
  87. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  88. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.d.ts +12 -0
  89. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js +133 -0
  90. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js.map +1 -0
  91. package/dist/lib/plugins/api-keys/settings/ApiKeyList.d.ts +4 -0
  92. package/dist/lib/plugins/api-keys/settings/ApiKeyList.js +33 -0
  93. package/dist/lib/plugins/api-keys/settings/ApiKeyList.js.map +1 -0
  94. package/dist/lib/plugins/api-keys/settings/RevealApiKey.d.ts +6 -0
  95. package/dist/lib/plugins/api-keys/settings/RevealApiKey.js +39 -0
  96. package/dist/lib/plugins/api-keys/settings/RevealApiKey.js.map +1 -0
  97. package/dist/lib/plugins/openapi/OasProvider.js +6 -2
  98. package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
  99. package/dist/lib/plugins/openapi/OperationList.js +4 -4
  100. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  101. package/dist/lib/plugins/openapi/ParamInfos.js +1 -0
  102. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
  103. package/dist/lib/plugins/openapi/Sidecar.js +3 -2
  104. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  105. package/dist/lib/plugins/openapi/interfaces.d.ts +3 -0
  106. package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
  107. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  108. package/dist/lib/plugins/openapi/schema/utils.js +11 -3
  109. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  110. package/dist/lib/plugins/openapi/util/createHttpSnippet.js +24 -1
  111. package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -1
  112. package/dist/lib/plugins/openapi/util/getRoutes.d.ts +3 -0
  113. package/dist/lib/plugins/openapi/util/getRoutes.js +2 -1
  114. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  115. package/dist/lib/ui/Button.js +1 -1
  116. package/dist/lib/ui/Button.js.map +1 -1
  117. package/dist/lib/ui/Command.d.ts +3 -3
  118. package/dist/lib/util/flattenAllOf.d.ts +0 -2
  119. package/dist/lib/util/flattenAllOf.js +0 -46
  120. package/dist/lib/util/flattenAllOf.js.map +1 -1
  121. package/dist/lib/util/flattenAllOf.test.js +2 -1
  122. package/dist/lib/util/flattenAllOf.test.js.map +1 -1
  123. package/dist/lib/util/flattenAllOfProcessor.d.ts +2 -0
  124. package/dist/lib/util/flattenAllOfProcessor.js +48 -0
  125. package/dist/lib/util/flattenAllOfProcessor.js.map +1 -0
  126. package/dist/lib/util/invariant.d.ts +1 -1
  127. package/dist/lib/util/invariant.js +2 -2
  128. package/dist/lib/util/invariant.js.map +1 -1
  129. package/dist/lib/util/readFrontmatter.js +2 -1
  130. package/dist/lib/util/readFrontmatter.js.map +1 -1
  131. package/dist/vite/api/SchemaManager.d.ts +12 -1
  132. package/dist/vite/api/SchemaManager.js +32 -15
  133. package/dist/vite/api/SchemaManager.js.map +1 -1
  134. package/dist/vite/api/SchemaManager.test.js +45 -1
  135. package/dist/vite/api/SchemaManager.test.js.map +1 -1
  136. package/dist/vite/build.js +91 -73
  137. package/dist/vite/build.js.map +1 -1
  138. package/dist/vite/config.js +10 -4
  139. package/dist/vite/config.js.map +1 -1
  140. package/dist/vite/error-handler.js +1 -5
  141. package/dist/vite/error-handler.js.map +1 -1
  142. package/dist/vite/mdx/remark-inject-filepath.js +5 -1
  143. package/dist/vite/mdx/remark-inject-filepath.js.map +1 -1
  144. package/dist/vite/mdx/remark-link-rewrite.js +4 -3
  145. package/dist/vite/mdx/remark-link-rewrite.js.map +1 -1
  146. package/dist/vite/plugin-api-keys.js +5 -1
  147. package/dist/vite/plugin-api-keys.js.map +1 -1
  148. package/dist/vite/plugin-api.js +5 -3
  149. package/dist/vite/plugin-api.js.map +1 -1
  150. package/dist/vite/plugin-docs.js +9 -7
  151. package/dist/vite/plugin-docs.js.map +1 -1
  152. package/dist/vite/plugin-markdown-export.js +5 -3
  153. package/dist/vite/plugin-markdown-export.js.map +1 -1
  154. package/dist/vite/prerender/utils.js +9 -3
  155. package/dist/vite/prerender/utils.js.map +1 -1
  156. package/dist/vite/prerender/worker.js +3 -0
  157. package/dist/vite/prerender/worker.js.map +1 -1
  158. package/dist/vite/zuplo.d.ts +13 -0
  159. package/dist/vite/zuplo.js +15 -0
  160. package/dist/vite/zuplo.js.map +1 -0
  161. package/lib/{ActionButton-DUgvSylL.js → ActionButton-B0CXL1Lq.js} +3 -3
  162. package/lib/{ActionButton-DUgvSylL.js.map → ActionButton-B0CXL1Lq.js.map} +1 -1
  163. package/lib/{Button-CynVW1JV.js → Button-GUVe7pmt.js} +8 -7
  164. package/lib/{Button-CynVW1JV.js.map → Button-GUVe7pmt.js.map} +1 -1
  165. package/lib/{Card-KFniaZn5.js → Card-DCdq37aA.js} +2 -2
  166. package/lib/{Card-KFniaZn5.js.map → Card-DCdq37aA.js.map} +1 -1
  167. package/lib/{ClaudeLogo-B4Xxt-x_.js → ClaudeLogo-C6q-Xn_l.js} +21 -17
  168. package/lib/ClaudeLogo-C6q-Xn_l.js.map +1 -0
  169. package/lib/{Command-BpT1iBE6.js → Command-N6VujV30.js} +3 -3
  170. package/lib/{Command-BpT1iBE6.js.map → Command-N6VujV30.js.map} +1 -1
  171. package/lib/{Dialog-BQciPiHN.js → Dialog-hlvmmQ_c.js} +2 -2
  172. package/lib/{Dialog-BQciPiHN.js.map → Dialog-hlvmmQ_c.js.map} +1 -1
  173. package/lib/{Drawer-Ci7XwhqT.js → Drawer-Ch7927PF.js} +7 -7
  174. package/lib/{Drawer-Ci7XwhqT.js.map → Drawer-Ch7927PF.js.map} +1 -1
  175. package/lib/{DropdownMenu-C8SX_-S_.js → DropdownMenu-DN0jNrjj.js} +2 -2
  176. package/lib/{DropdownMenu-C8SX_-S_.js.map → DropdownMenu-DN0jNrjj.js.map} +1 -1
  177. package/lib/Frame-DKlOmSkU.js +205 -0
  178. package/lib/Frame-DKlOmSkU.js.map +1 -0
  179. package/lib/HydrationBoundary-CNF2ZV3E.js +601 -0
  180. package/lib/HydrationBoundary-CNF2ZV3E.js.map +1 -0
  181. package/lib/{IndexingDialog-B5zCiUKr.js → IndexingDialog-D0YdGfbn.js} +3 -3
  182. package/lib/{IndexingDialog-B5zCiUKr.js.map → IndexingDialog-D0YdGfbn.js.map} +1 -1
  183. package/lib/Input-Cx-GeKoF.js +22 -0
  184. package/lib/Input-Cx-GeKoF.js.map +1 -0
  185. package/lib/{MdxPage-BagO2c-n.js → MdxPage-B1G4W1TK.js} +11 -11
  186. package/lib/{MdxPage-BagO2c-n.js.map → MdxPage-B1G4W1TK.js.map} +1 -1
  187. package/lib/{Mermaid-D_VSX7_Q.js → Mermaid-B1xNo-pf.js} +5 -4
  188. package/lib/{Mermaid-D_VSX7_Q.js.map → Mermaid-B1xNo-pf.js.map} +1 -1
  189. package/lib/{OAuthErrorPage-Fq54RLgt.js → OAuthErrorPage-01Ke086W.js} +25 -23
  190. package/lib/OAuthErrorPage-01Ke086W.js.map +1 -0
  191. package/lib/OasProvider-BG-FWDIq.js +48 -0
  192. package/lib/OasProvider-BG-FWDIq.js.map +1 -0
  193. package/lib/{OperationList-C0jiEaG5.js → OperationList-GGkJ1vac.js} +1983 -1965
  194. package/lib/OperationList-GGkJ1vac.js.map +1 -0
  195. package/lib/RouteGuard-B1lCR0C_.js +77 -0
  196. package/lib/RouteGuard-B1lCR0C_.js.map +1 -0
  197. package/lib/{SchemaList-BU0zCHn9.js → SchemaList-CNVdC9f-.js} +9 -9
  198. package/lib/{SchemaList-BU0zCHn9.js.map → SchemaList-CNVdC9f-.js.map} +1 -1
  199. package/lib/SchemaView-CrV0yIwR.js +438 -0
  200. package/lib/SchemaView-CrV0yIwR.js.map +1 -0
  201. package/lib/{Select-CkxXP5I7.js → Secret-BDBqq4p3.js} +122 -122
  202. package/lib/Secret-BDBqq4p3.js.map +1 -0
  203. package/lib/{Separator-CTPSeW1S.js → Separator-BXt1LYnm.js} +2 -2
  204. package/lib/{Separator-CTPSeW1S.js.map → Separator-BXt1LYnm.js.map} +1 -1
  205. package/lib/SignUp-8kDBaLbO.js +55 -0
  206. package/lib/SignUp-8kDBaLbO.js.map +1 -0
  207. package/lib/{SyntaxHighlight-Kdyskw3C.js → SyntaxHighlight-hZOFnYl0.js} +1749 -1723
  208. package/lib/SyntaxHighlight-hZOFnYl0.js.map +1 -0
  209. package/lib/{Toc-DJxFPfcS.js → Toc-qEIii_-W.js} +3 -3
  210. package/lib/{Toc-DJxFPfcS.js.map → Toc-qEIii_-W.js.map} +1 -1
  211. package/lib/{ErrorAlert-DrOR8w3f.js → Zudoku-DUsdmPME.js} +5449 -4427
  212. package/lib/Zudoku-DUsdmPME.js.map +1 -0
  213. package/lib/ZudokuContext-BBI06sOx.js +387 -0
  214. package/lib/ZudokuContext-BBI06sOx.js.map +1 -0
  215. package/lib/chunk-EPOLDU6W-C6C8jAwd.js +8558 -0
  216. package/lib/chunk-EPOLDU6W-C6C8jAwd.js.map +1 -0
  217. package/lib/{circular-CzWF1hj5.js → circular-bbWO95zs.js} +771 -749
  218. package/lib/{circular-CzWF1hj5.js.map → circular-bbWO95zs.js.map} +1 -1
  219. package/lib/{cn-dYga0KKN.js → cn-5-Gd1Dss.js} +531 -498
  220. package/lib/cn-5-Gd1Dss.js.map +1 -0
  221. package/lib/createServer-B7POuwZp.js +13036 -0
  222. package/lib/createServer-B7POuwZp.js.map +1 -0
  223. package/lib/createVariantComponent-Dc0vtOvr.js +18 -0
  224. package/lib/createVariantComponent-Dc0vtOvr.js.map +1 -0
  225. package/lib/{errors-Bs4duWDy.js → errors-7hgPDs1h.js} +3 -3
  226. package/lib/{errors-Bs4duWDy.js.map → errors-7hgPDs1h.js.map} +1 -1
  227. package/lib/{firebase-qUdSEL1p.js → firebase-Dwn-2ju-.js} +1590 -1342
  228. package/lib/firebase-Dwn-2ju-.js.map +1 -0
  229. package/lib/hook-ZEd1Es7D.js +52 -0
  230. package/lib/hook-ZEd1Es7D.js.map +1 -0
  231. package/lib/{index-0oT9beQN.js → index-CTCT4jlW.js} +499 -493
  232. package/lib/{index-0oT9beQN.js.map → index-CTCT4jlW.js.map} +1 -1
  233. package/lib/index-CrcNWbel.js.map +1 -1
  234. package/lib/index-DAWHN3cH.js +86 -0
  235. package/lib/index-DAWHN3cH.js.map +1 -0
  236. package/lib/{index-Bh-MffiL.js → index-Dxdhrp-I.js} +2 -2
  237. package/lib/{index-Bh-MffiL.js.map → index-Dxdhrp-I.js.map} +1 -1
  238. package/lib/index.esm-BYObtETB.js.map +1 -1
  239. package/lib/{index.esm-DtzT_KoE.js → index.esm-Ca5zvoff.js} +20 -20
  240. package/lib/{index.esm-DtzT_KoE.js.map → index.esm-Ca5zvoff.js.map} +1 -1
  241. package/lib/{index.esm-kW-Utcsi.js → index.esm-DG4KaDKR.js} +16 -14
  242. package/lib/index.esm-DG4KaDKR.js.map +1 -0
  243. package/lib/{invariant-CGOLuIIz.js → invariant-B_t_F2s_.js} +6 -6
  244. package/lib/invariant-B_t_F2s_.js.map +1 -0
  245. package/lib/jsx-runtime-BzflLqGi.js.map +1 -1
  246. package/lib/{mutation-BoVlx8yA.js → mutation-BISOc7OM.js} +70 -44
  247. package/lib/mutation-BISOc7OM.js.map +1 -0
  248. package/lib/ui/Accordion.js +1 -1
  249. package/lib/ui/ActionButton.js +2 -2
  250. package/lib/ui/Alert.js +1 -1
  251. package/lib/ui/AlertDialog.js +1 -1
  252. package/lib/ui/Badge.js +1 -1
  253. package/lib/ui/Breadcrumb.js +1 -1
  254. package/lib/ui/Button.js +7 -6
  255. package/lib/ui/Button.js.map +1 -1
  256. package/lib/ui/ButtonGroup.js +1 -1
  257. package/lib/ui/Callout.js +1 -1
  258. package/lib/ui/Card.js +1 -1
  259. package/lib/ui/Carousel.js +1 -1
  260. package/lib/ui/Carousel.js.map +1 -1
  261. package/lib/ui/Checkbox.js +1 -1
  262. package/lib/ui/CodeBlock.js +1 -1
  263. package/lib/ui/Command.js +2 -2
  264. package/lib/ui/Dialog.js +1 -1
  265. package/lib/ui/Drawer.js +3 -3
  266. package/lib/ui/DropdownMenu.js +1 -1
  267. package/lib/ui/EmbeddedCodeBlock.js +1 -1
  268. package/lib/ui/Form.js +1 -1
  269. package/lib/ui/Frame.js +1 -1
  270. package/lib/ui/HoverCard.js +1 -1
  271. package/lib/ui/Input.js +1 -1
  272. package/lib/ui/Item.js +1 -1
  273. package/lib/ui/Label.js +1 -1
  274. package/lib/ui/NativeSelect.js +1 -1
  275. package/lib/ui/Pagination.js +1 -1
  276. package/lib/ui/Popover.js +1 -1
  277. package/lib/ui/Progress.js +1 -1
  278. package/lib/ui/RadioGroup.js +1 -1
  279. package/lib/ui/ScrollArea.js +1 -1
  280. package/lib/ui/Secret.js +1 -1
  281. package/lib/ui/Separator.js +1 -1
  282. package/lib/ui/Skeleton.js +1 -1
  283. package/lib/ui/Slider.js +1 -1
  284. package/lib/ui/Switch.js +1 -1
  285. package/lib/ui/SyntaxHighlight.js +3 -3
  286. package/lib/ui/Tabs.js +1 -1
  287. package/lib/ui/Textarea.js +1 -1
  288. package/lib/ui/Toggle.js +1 -1
  289. package/lib/ui/ToggleGroup.js +1 -1
  290. package/lib/ui/Value.js +1 -1
  291. package/lib/ui/util.js +1 -1
  292. package/lib/useExposedProps-CzTDfXfq.js +30 -0
  293. package/lib/useExposedProps-CzTDfXfq.js.map +1 -0
  294. package/lib/{useMutation-C6RqWmTS.js → useMutation-CFMGlAMW.js} +39 -17
  295. package/lib/useMutation-CFMGlAMW.js.map +1 -0
  296. package/lib/useSuspenseQuery-CSB_rVek.js +1226 -0
  297. package/lib/useSuspenseQuery-CSB_rVek.js.map +1 -0
  298. package/lib/zudoku.__internal.js +827 -1325
  299. package/lib/zudoku.__internal.js.map +1 -1
  300. package/lib/zudoku.auth-auth0.js +16 -16
  301. package/lib/zudoku.auth-auth0.js.map +1 -1
  302. package/lib/zudoku.auth-azureb2c.js +4 -4
  303. package/lib/zudoku.auth-clerk.js +52 -75
  304. package/lib/zudoku.auth-clerk.js.map +1 -1
  305. package/lib/zudoku.auth-firebase.js +6 -5
  306. package/lib/zudoku.auth-firebase.js.map +1 -1
  307. package/lib/zudoku.auth-openid.js +5 -5
  308. package/lib/zudoku.auth-supabase.js +31 -40
  309. package/lib/zudoku.auth-supabase.js.map +1 -1
  310. package/lib/zudoku.components.js +29 -25
  311. package/lib/zudoku.components.js.map +1 -1
  312. package/lib/zudoku.hooks.js +24 -11
  313. package/lib/zudoku.hooks.js.map +1 -1
  314. package/lib/zudoku.mermaid.js +5 -4
  315. package/lib/zudoku.mermaid.js.map +1 -1
  316. package/lib/zudoku.plugin-api-catalog.js +35 -31
  317. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  318. package/lib/zudoku.plugin-api-keys.js +607 -551
  319. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  320. package/lib/zudoku.plugin-custom-pages.js +1 -1
  321. package/lib/zudoku.plugin-markdown.js +1 -1
  322. package/lib/zudoku.plugin-openapi.js +3 -3
  323. package/lib/zudoku.plugin-redirect.js +1 -1
  324. package/lib/zudoku.plugin-search-pagefind.js +30 -29
  325. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  326. package/lib/zudoku.plugins.js +9 -8
  327. package/lib/zudoku.plugins.js.map +1 -1
  328. package/lib/zudoku.react-query.js +440 -0
  329. package/lib/zudoku.react-query.js.map +1 -0
  330. package/lib/zudoku.router.js +1130 -1404
  331. package/lib/zudoku.router.js.map +1 -1
  332. package/package.json +30 -22
  333. package/src/lib/auth/issuer.ts +1 -1
  334. package/src/lib/authentication/authentication.ts +8 -2
  335. package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
  336. package/src/lib/authentication/components/SignIn.tsx +5 -2
  337. package/src/lib/authentication/components/SignUp.tsx +5 -2
  338. package/src/lib/authentication/hook.ts +16 -0
  339. package/src/lib/authentication/providers/auth0.tsx +15 -9
  340. package/src/lib/authentication/providers/clerk.tsx +0 -26
  341. package/src/lib/authentication/providers/firebase.tsx +98 -6
  342. package/src/lib/authentication/providers/supabase.tsx +6 -15
  343. package/src/lib/authentication/ui/EmailVerificationUi.tsx +129 -0
  344. package/src/lib/authentication/ui/ZudokuAuthUi.tsx +170 -38
  345. package/src/lib/authentication/utils/relativeRedirectUrl.ts +12 -0
  346. package/src/lib/components/Pagination.tsx +4 -5
  347. package/src/lib/components/index.ts +19 -35
  348. package/src/lib/components/navigation/NavigationItem.tsx +9 -3
  349. package/src/lib/core/RouteGuard.tsx +30 -24
  350. package/src/lib/core/plugins.ts +21 -1
  351. package/src/lib/core/react-query.ts +1 -0
  352. package/src/lib/core/transform-config.ts +29 -0
  353. package/src/lib/errors/ErrorMessage.tsx +38 -0
  354. package/src/lib/hooks/index.ts +7 -16
  355. package/src/lib/oas/graphql/circular.test.ts +186 -0
  356. package/src/lib/oas/graphql/circular.ts +49 -10
  357. package/src/lib/oas/graphql/index.ts +7 -3
  358. package/src/lib/oas/parser/index.ts +17 -6
  359. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +36 -476
  360. package/src/lib/plugins/api-keys/index.tsx +76 -32
  361. package/src/lib/plugins/api-keys/settings/ApiKeyItem.tsx +342 -0
  362. package/src/lib/plugins/api-keys/settings/ApiKeyList.tsx +67 -0
  363. package/src/lib/plugins/api-keys/settings/RevealApiKey.tsx +124 -0
  364. package/src/lib/plugins/openapi/OasProvider.tsx +10 -2
  365. package/src/lib/plugins/openapi/OperationList.tsx +4 -4
  366. package/src/lib/plugins/openapi/ParamInfos.tsx +1 -0
  367. package/src/lib/plugins/openapi/Sidecar.tsx +3 -2
  368. package/src/lib/plugins/openapi/interfaces.ts +6 -1
  369. package/src/lib/plugins/openapi/schema/SchemaView.tsx +6 -4
  370. package/src/lib/plugins/openapi/schema/utils.ts +15 -4
  371. package/src/lib/plugins/openapi/util/createHttpSnippet.ts +29 -1
  372. package/src/lib/plugins/openapi/util/getRoutes.tsx +4 -1
  373. package/src/lib/ui/Button.tsx +1 -0
  374. package/src/lib/util/flattenAllOf.test.ts +2 -1
  375. package/src/lib/util/flattenAllOf.ts +0 -57
  376. package/src/lib/util/flattenAllOfProcessor.ts +58 -0
  377. package/src/lib/util/invariant.ts +2 -1
  378. package/src/lib/util/readFrontmatter.ts +2 -1
  379. package/src/shiki/langs/c3.js +1 -0
  380. package/src/shiki/langs/gn.js +1 -0
  381. package/src/shiki/langs/moonbit.js +1 -0
  382. package/src/zuplo/enrich-with-zuplo-mcp.ts +168 -0
  383. package/src/zuplo/enrich-with-zuplo.ts +254 -0
  384. package/src/zuplo/policy-types.ts +46 -0
  385. package/src/zuplo/with-zuplo-processors.ts +35 -0
  386. package/src/zuplo/with-zuplo.ts +14 -0
  387. package/lib/ClaudeLogo-B4Xxt-x_.js.map +0 -1
  388. package/lib/ErrorAlert-DrOR8w3f.js.map +0 -1
  389. package/lib/OAuthErrorPage-Fq54RLgt.js.map +0 -1
  390. package/lib/OasProvider-DPH8mwDa.js +0 -40
  391. package/lib/OasProvider-DPH8mwDa.js.map +0 -1
  392. package/lib/OperationList-C0jiEaG5.js.map +0 -1
  393. package/lib/RouteGuard-9wjejsKm.js +0 -77
  394. package/lib/RouteGuard-9wjejsKm.js.map +0 -1
  395. package/lib/RouterError-DSLXagd5.js +0 -42
  396. package/lib/RouterError-DSLXagd5.js.map +0 -1
  397. package/lib/SchemaView-DVae4RO2.js +0 -597
  398. package/lib/SchemaView-DVae4RO2.js.map +0 -1
  399. package/lib/Select-CkxXP5I7.js.map +0 -1
  400. package/lib/SignUp-BjS4ozA7.js +0 -50
  401. package/lib/SignUp-BjS4ozA7.js.map +0 -1
  402. package/lib/SyntaxHighlight-Kdyskw3C.js.map +0 -1
  403. package/lib/ZudokuContext-BXldanA8.js +0 -1508
  404. package/lib/ZudokuContext-BXldanA8.js.map +0 -1
  405. package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js +0 -9
  406. package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js.map +0 -1
  407. package/lib/chunk-PVWAREVJ-dLIqswPy.js +0 -7965
  408. package/lib/chunk-PVWAREVJ-dLIqswPy.js.map +0 -1
  409. package/lib/cn-dYga0KKN.js.map +0 -1
  410. package/lib/createServer-BIr2_tGn.js +0 -16693
  411. package/lib/createServer-BIr2_tGn.js.map +0 -1
  412. package/lib/createVariantComponent-B9_dVBvu.js +0 -35
  413. package/lib/createVariantComponent-B9_dVBvu.js.map +0 -1
  414. package/lib/firebase-qUdSEL1p.js.map +0 -1
  415. package/lib/hook-BNxidGQq.js +0 -40
  416. package/lib/hook-BNxidGQq.js.map +0 -1
  417. package/lib/index-CCmMJp02.js +0 -1059
  418. package/lib/index-CCmMJp02.js.map +0 -1
  419. package/lib/index-Css56y3F.js +0 -133
  420. package/lib/index-Css56y3F.js.map +0 -1
  421. package/lib/index.esm-kW-Utcsi.js.map +0 -1
  422. package/lib/invariant-CGOLuIIz.js.map +0 -1
  423. package/lib/mutation-BoVlx8yA.js.map +0 -1
  424. package/lib/useMutation-C6RqWmTS.js.map +0 -1
@@ -3,6 +3,7 @@ import type { ReactNode } from "react";
3
3
  import type { Location, RouteObject } from "react-router";
4
4
  import type { Navigation } from "../../config/validators/NavigationSchema.js";
5
5
  import type { ProtectedRoutesInput } from "../../config/validators/ProtectedRoutesSchema.js";
6
+ import type { ZudokuConfig } from "../../config/validators/validate.js";
6
7
  import type { AuthenticationPlugin } from "../authentication/authentication.js";
7
8
  import type { MdxComponentsType } from "../util/MdxComponents.js";
8
9
  import type {
@@ -18,7 +19,8 @@ export type ZudokuPlugin =
18
19
  | ApiIdentityPlugin
19
20
  | SearchProviderPlugin
20
21
  | EventConsumerPlugin
21
- | AuthenticationPlugin;
22
+ | AuthenticationPlugin
23
+ | TransformConfigPlugin;
22
24
 
23
25
  export type { AuthenticationPlugin, RouteObject };
24
26
 
@@ -60,6 +62,19 @@ export type ProfileNavigationItem = {
60
62
  icon?: LucideIcon;
61
63
  };
62
64
 
65
+ export interface ConfigHookContext {
66
+ mode: typeof process.env.ZUDOKU_ENV;
67
+ rootDir: string;
68
+ configPath: string;
69
+ }
70
+
71
+ export interface TransformConfigPlugin {
72
+ transformConfig?: (
73
+ config: ZudokuConfig,
74
+ ctx: ConfigHookContext,
75
+ ) => Partial<ZudokuConfig> | void | Promise<Partial<ZudokuConfig> | void>;
76
+ }
77
+
63
78
  export interface CommonPlugin {
64
79
  initialize?: (
65
80
  context: ZudokuContext,
@@ -110,3 +125,8 @@ export const isApiIdentityPlugin = (
110
125
  obj: ZudokuPlugin,
111
126
  ): obj is ApiIdentityPlugin =>
112
127
  "getIdentities" in obj && typeof obj.getIdentities === "function";
128
+
129
+ export const isTransformConfigPlugin = (
130
+ obj: ZudokuPlugin,
131
+ ): obj is TransformConfigPlugin =>
132
+ "transformConfig" in obj && typeof obj.transformConfig === "function";
@@ -0,0 +1 @@
1
+ export * from "@tanstack/react-query";
@@ -0,0 +1,29 @@
1
+ import createDeepmerge from "@fastify/deepmerge";
2
+ import type { ConfigWithMeta } from "../../config/loader.js";
3
+ import { type ConfigHookContext, isTransformConfigPlugin } from "./plugins.js";
4
+
5
+ const mergeConfig = createDeepmerge({
6
+ mergeArray: (opt) => (_, source) => opt.clone(source),
7
+ });
8
+
9
+ export const runTransformConfigHooks = async (
10
+ config: ConfigWithMeta,
11
+ ): Promise<ConfigWithMeta> => {
12
+ const ctx = {
13
+ mode: config.__meta.mode,
14
+ rootDir: config.__meta.rootDir,
15
+ configPath: config.__meta.configPath,
16
+ } satisfies ConfigHookContext;
17
+ const plugins = config.plugins ?? [];
18
+
19
+ let result = config;
20
+
21
+ for (const plugin of plugins.filter(isTransformConfigPlugin)) {
22
+ const partial = await plugin.transformConfig?.(result, ctx);
23
+ if (!partial) continue;
24
+
25
+ result = mergeConfig(result, partial) as ConfigWithMeta;
26
+ }
27
+
28
+ return result;
29
+ };
@@ -0,0 +1,38 @@
1
+ import { Alert, AlertDescription, AlertTitle } from "zudoku/ui/Alert.js";
2
+ import { SyntaxHighlight } from "zudoku/ui/SyntaxHighlight.js";
3
+ import { DeveloperHint } from "../components/DeveloperHint.js";
4
+ import { ZudokuError } from "../util/invariant.js";
5
+
6
+ export function ErrorMessage({ error }: { error: unknown }) {
7
+ const message =
8
+ error instanceof Error ? error.message : "Something went wrong";
9
+
10
+ const showDeveloperHints = process.env.NODE_ENV === "development";
11
+
12
+ const hint = error instanceof ZudokuError ? error.developerHint : undefined;
13
+ const title =
14
+ error instanceof ZudokuError ? error.title : "Something went wrong";
15
+ const stack = error instanceof Error ? error.stack : undefined;
16
+ const cause = error instanceof Error ? error.cause : undefined;
17
+
18
+ const stringError = cause instanceof Error ? String(cause.stack) : stack;
19
+
20
+ return (
21
+ <>
22
+ <Alert variant="destructive">
23
+ <AlertTitle>{title}</AlertTitle>
24
+ <AlertDescription>{message}</AlertDescription>
25
+ </Alert>
26
+ {showDeveloperHints && hint && (
27
+ <DeveloperHint className="mb-4">{hint}</DeveloperHint>
28
+ )}
29
+ {showDeveloperHints && stringError && (
30
+ <SyntaxHighlight
31
+ className="max-h-[400px] [&>pre]:p-4"
32
+ language="js"
33
+ code={stringError}
34
+ />
35
+ )}
36
+ </>
37
+ );
38
+ }
@@ -1,16 +1,7 @@
1
- import { useMDXComponents as useMDXComponentsImport } from "@mdx-js/react";
2
- import { useTheme as useThemeImport } from "next-themes";
3
- import { useAuth as useAuthImport } from "../authentication/hook.js";
4
- import { CACHE_KEYS, useCache as useCacheImport } from "../components/cache.js";
5
- import { useZudoku as useZudokuImport } from "../components/context/ZudokuContext.js";
6
- import { useExposedProps as useExposedPropsImport } from "../util/useExposedProps.js";
7
- import { useEvent as useEventImport } from "./useEvent.js";
8
-
9
- export const useEvent = /*@__PURE__*/ useEventImport;
10
- export const useTheme = /*@__PURE__*/ useThemeImport;
11
- export const useExposedProps = /*@__PURE__*/ useExposedPropsImport;
12
- export const useMDXComponents = /*@__PURE__*/ useMDXComponentsImport;
13
- export const useAuth = /*@__PURE__*/ useAuthImport;
14
- export const useZudoku = /*@__PURE__*/ useZudokuImport;
15
- export const useCache = /*@__PURE__*/ useCacheImport;
16
- export { CACHE_KEYS };
1
+ export { useMDXComponents } from "@mdx-js/react";
2
+ export { useTheme } from "next-themes";
3
+ export { useAuth } from "../authentication/hook.js";
4
+ export { CACHE_KEYS, useCache } from "../components/cache.js";
5
+ export { useZudoku } from "../components/context/ZudokuContext.js";
6
+ export { useExposedProps } from "../util/useExposedProps.js";
7
+ export { useEvent } from "./useEvent.js";
@@ -0,0 +1,186 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import {
3
+ CIRCULAR_REF,
4
+ handleCircularRefs,
5
+ SCHEMA_REF_PREFIX,
6
+ } from "./circular.js";
7
+
8
+ describe("handleCircularRefs", () => {
9
+ it("should return primitives unchanged", () => {
10
+ expect(handleCircularRefs(null)).toBe(null);
11
+ expect(handleCircularRefs(undefined)).toBe(undefined);
12
+ expect(handleCircularRefs(42)).toBe(42);
13
+ expect(handleCircularRefs("hello")).toBe("hello");
14
+ expect(handleCircularRefs(true)).toBe(true);
15
+ });
16
+
17
+ it("should handle simple objects without refs", () => {
18
+ const obj = { type: "string", description: "A string" };
19
+ const result = handleCircularRefs(obj);
20
+ expect(result).toEqual(obj);
21
+ });
22
+
23
+ it("should handle arrays", () => {
24
+ const arr = [{ type: "string" }, { type: "number" }];
25
+ const result = handleCircularRefs(arr);
26
+ expect(result).toEqual(arr);
27
+ });
28
+
29
+ it("should detect true circular references via object identity", () => {
30
+ const obj: Record<string, unknown> = { type: "object" };
31
+ obj.self = obj;
32
+
33
+ const result = handleCircularRefs(obj);
34
+ expect(result.type).toBe("object");
35
+ expect(result.self).toContain(CIRCULAR_REF);
36
+ });
37
+
38
+ it("should detect circular refs via __$ref path", () => {
39
+ const inner = { __$ref: "#/components/schemas/Node", type: "object" };
40
+ const obj = {
41
+ __$ref: "#/components/schemas/Node",
42
+ type: "object",
43
+ properties: {
44
+ child: inner,
45
+ },
46
+ };
47
+ (inner as Record<string, unknown>).properties = { parent: obj };
48
+
49
+ const result = handleCircularRefs(obj);
50
+ expect(result.properties.child).toBe(
51
+ `${SCHEMA_REF_PREFIX}#/components/schemas/Node`,
52
+ );
53
+ });
54
+
55
+ // Regression test for #1869
56
+ it("should NOT mark sibling refs to the same schema as circular", () => {
57
+ const timestampSchema1 = {
58
+ __$ref: "#/components/schemas/timestamp",
59
+ type: "string",
60
+ format: "date-time",
61
+ };
62
+ const timestampSchema2 = {
63
+ __$ref: "#/components/schemas/timestamp",
64
+ type: "string",
65
+ format: "date-time",
66
+ };
67
+
68
+ const obj = {
69
+ type: "object",
70
+ properties: {
71
+ created_at: timestampSchema1,
72
+ updated_at: timestampSchema2,
73
+ },
74
+ };
75
+
76
+ const result = handleCircularRefs(obj);
77
+
78
+ expect(result.properties.created_at).toEqual({
79
+ __$ref: "#/components/schemas/timestamp",
80
+ type: "string",
81
+ format: "date-time",
82
+ });
83
+ expect(result.properties.updated_at).toEqual({
84
+ __$ref: "#/components/schemas/timestamp",
85
+ type: "string",
86
+ format: "date-time",
87
+ });
88
+ });
89
+
90
+ it("should allow same ref path in different branches of the tree", () => {
91
+ const obj = {
92
+ type: "object",
93
+ properties: {
94
+ user: {
95
+ type: "object",
96
+ properties: {
97
+ id: { __$ref: "#/components/schemas/identifier", type: "string" },
98
+ name: { type: "string" },
99
+ },
100
+ },
101
+ post: {
102
+ type: "object",
103
+ properties: {
104
+ id: { __$ref: "#/components/schemas/identifier", type: "string" },
105
+ title: { type: "string" },
106
+ },
107
+ },
108
+ },
109
+ };
110
+
111
+ const result = handleCircularRefs(obj);
112
+
113
+ expect(result.properties.user.properties.id.type).toBe("string");
114
+ expect(result.properties.post.properties.id.type).toBe("string");
115
+ expect(result.properties.user.properties.id).not.toBe(
116
+ expect.stringContaining(SCHEMA_REF_PREFIX),
117
+ );
118
+ expect(result.properties.post.properties.id).not.toBe(
119
+ expect.stringContaining(SCHEMA_REF_PREFIX),
120
+ );
121
+ });
122
+
123
+ it("should handle shared object instances (same object, multiple references)", () => {
124
+ const sharedSchema = { type: "string", description: "Shared" };
125
+ const obj = {
126
+ type: "object",
127
+ properties: { field1: sharedSchema, field2: sharedSchema },
128
+ };
129
+
130
+ const result = handleCircularRefs(obj);
131
+
132
+ expect(result.properties.field1).toEqual({
133
+ type: "string",
134
+ description: "Shared",
135
+ });
136
+ expect(result.properties.field2).toEqual({
137
+ type: "string",
138
+ description: "Shared",
139
+ });
140
+ });
141
+
142
+ it("should handle nested arrays with refs", () => {
143
+ const obj = {
144
+ type: "object",
145
+ allOf: [
146
+ { __$ref: "#/components/schemas/Base", type: "object" },
147
+ { type: "object", properties: { extra: { type: "string" } } },
148
+ ],
149
+ };
150
+
151
+ const result = handleCircularRefs(obj);
152
+
153
+ expect(result.allOf[0]).toEqual({
154
+ __$ref: "#/components/schemas/Base",
155
+ type: "object",
156
+ });
157
+ });
158
+
159
+ it("should deduplicate shared object instances with __$ref", () => {
160
+ const shared = { __$ref: "#/components/schemas/Foo", type: "string" };
161
+ const obj = { a: shared, b: shared };
162
+ const result = handleCircularRefs(obj);
163
+
164
+ expect(result.a).toEqual({
165
+ __$ref: "#/components/schemas/Foo",
166
+ type: "string",
167
+ });
168
+ expect(result.b).toBe(`${SCHEMA_REF_PREFIX}#/components/schemas/Foo`);
169
+ });
170
+
171
+ it("should mark circular ref with property name from path", () => {
172
+ const parent: Record<string, unknown> = {
173
+ type: "object",
174
+ properties: {} as Record<string, unknown>,
175
+ };
176
+ const child: Record<string, unknown> = {
177
+ type: "object",
178
+ properties: { back: parent },
179
+ };
180
+ (parent.properties as Record<string, unknown>).child = child;
181
+
182
+ const result = handleCircularRefs(parent);
183
+
184
+ expect(result.properties.child.properties.back).toContain(CIRCULAR_REF);
185
+ });
186
+ });
@@ -3,6 +3,7 @@ import { GraphQLJSON } from "graphql-type-json";
3
3
  import type { RecordAny } from "../../util/traverse.js";
4
4
 
5
5
  export const CIRCULAR_REF = "$[Circular Reference]";
6
+ export const SCHEMA_REF_PREFIX = "$ref:";
6
7
 
7
8
  const OPENAPI_PROPS = new Set([
8
9
  "properties",
@@ -13,19 +14,34 @@ const OPENAPI_PROPS = new Set([
13
14
  "oneOf",
14
15
  ]);
15
16
 
16
- const handleCircularRefs = (
17
+ export const handleCircularRefs = (
17
18
  // biome-ignore lint/suspicious/noExplicitAny: Allow any type
18
19
  obj: any,
19
20
  visited = new WeakSet(),
20
21
  refs = new WeakMap(),
21
22
  path: string[] = [],
23
+ seenRefPaths = new Set<string>(),
22
24
  // biome-ignore lint/suspicious/noExplicitAny: Allow any type
23
25
  ): any => {
24
26
  if (obj === null || typeof obj !== "object") return obj;
25
27
 
28
+ const refPath = obj.__$ref;
29
+
30
+ // Check if this object has a __$ref marker (set during schema code generation)
31
+ // If we've already fully processed this ref path, return a reference marker
32
+ // instead of the full data to avoid JSON.stringify serializing duplicates
33
+ if (typeof refPath === "string" && seenRefPaths.has(refPath)) {
34
+ return SCHEMA_REF_PREFIX + refPath;
35
+ }
36
+
26
37
  if (visited.has(obj)) {
27
38
  const cached = refs.get(obj);
28
- if (cached) return cached;
39
+ if (cached) {
40
+ return typeof refPath === "string"
41
+ ? // If already processed, return ref marker to avoid duplicate serialization
42
+ SCHEMA_REF_PREFIX + refPath
43
+ : cached;
44
+ }
29
45
  const circularProp = path.find((p) => !OPENAPI_PROPS.has(p)) || path[0];
30
46
 
31
47
  return [CIRCULAR_REF, circularProp].filter(Boolean).join(":");
@@ -33,19 +49,42 @@ const handleCircularRefs = (
33
49
 
34
50
  visited.add(obj);
35
51
 
52
+ // Add refPath BEFORE recursing to detect cycles within this branch
53
+ // This will be removed after processing to allow siblings with the same ref
54
+ if (typeof refPath === "string") {
55
+ seenRefPaths.add(refPath);
56
+ }
57
+
58
+ let result: RecordAny | RecordAny[];
36
59
  if (Array.isArray(obj)) {
37
- const result = obj.map((item, index) =>
38
- handleCircularRefs(item, visited, refs, [...path, index.toString()]),
60
+ result = obj.map((item, index) =>
61
+ handleCircularRefs(
62
+ item,
63
+ visited,
64
+ refs,
65
+ [...path, index.toString()],
66
+ seenRefPaths,
67
+ ),
39
68
  );
40
- refs.set(obj, result);
41
- return result;
69
+ } else {
70
+ result = {};
71
+ for (const [key, value] of Object.entries(obj)) {
72
+ result[key] = handleCircularRefs(
73
+ value,
74
+ visited,
75
+ refs,
76
+ [...path, key],
77
+ seenRefPaths,
78
+ );
79
+ }
42
80
  }
81
+ refs.set(obj, result);
43
82
 
44
- const result: RecordAny = {};
45
- for (const [key, value] of Object.entries(obj)) {
46
- result[key] = handleCircularRefs(value, visited, refs, [...path, key]);
83
+ // Remove refPath after processing so sibling refs aren't incorrectly marked
84
+ if (typeof refPath === "string") {
85
+ seenRefPaths.delete(refPath);
47
86
  }
48
- refs.set(obj, result);
87
+
49
88
  return result;
50
89
  };
51
90
 
@@ -473,7 +473,9 @@ const OperationItem = builder
473
473
  name,
474
474
  ...(typeof value === "string" ? { value } : value),
475
475
  }))
476
- : [],
476
+ : content.example !== undefined
477
+ ? [{ name: "", value: content.example }]
478
+ : [],
477
479
  encoding: Object.entries(content.encoding ?? {}).map(
478
480
  ([name, value]) => ({ name, ...value }),
479
481
  ),
@@ -490,7 +492,7 @@ const OperationItem = builder
490
492
  statusCode,
491
493
  description: response.description,
492
494
  content: Object.entries(response.content ?? {}).map(
493
- ([mediaType, { schema, examples }]) => ({
495
+ ([mediaType, { schema, examples, example }]) => ({
494
496
  mediaType,
495
497
  schema,
496
498
  examples: examples
@@ -498,7 +500,9 @@ const OperationItem = builder
498
500
  name,
499
501
  ...(typeof value === "string" ? { value } : value),
500
502
  }))
501
- : [],
503
+ : example !== undefined
504
+ ? [{ name: "", value: example }]
505
+ : [],
502
506
  }),
503
507
  ),
504
508
  headers: response.headers,
@@ -1,6 +1,7 @@
1
1
  import { GraphQLError } from "graphql/error/index.js";
2
2
  import { OpenAPIV3, type OpenAPIV3_1 } from "openapi-types";
3
- import { flattenAllOfProcessor } from "../../util/flattenAllOf.js";
3
+ import { flattenAllOf } from "../../util/flattenAllOf.js";
4
+ import { traverse } from "../../util/traverse.js";
4
5
  import { dereference, type JSONSchema } from "./dereference/index.js";
5
6
  import { upgradeSchema } from "./upgrade/index.js";
6
7
 
@@ -104,11 +105,21 @@ export const validate = async (schemaInput: unknown) => {
104
105
  const dereferenced = await dereference(schema);
105
106
  const upgraded = upgradeSchema(dereferenced);
106
107
 
107
- const flattened = await flattenAllOfProcessor({
108
- schema: upgraded,
109
- file: "schema.json",
110
- dereference: async (schema) => schema,
111
- });
108
+ const flattened = traverse(upgraded, (spec) => {
109
+ if (!spec || typeof spec !== "object" || Array.isArray(spec)) {
110
+ return spec;
111
+ }
112
+ const isSchemaObject =
113
+ "type" in spec ||
114
+ "properties" in spec ||
115
+ "allOf" in spec ||
116
+ "anyOf" in spec ||
117
+ "oneOf" in spec;
118
+
119
+ if (!isSchemaObject) return spec;
120
+
121
+ return flattenAllOf(spec) as typeof spec;
122
+ }) as OpenAPIDocument;
112
123
 
113
124
  return flattened;
114
125
  };