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
@@ -0,0 +1,168 @@
1
+ import fs from "node:fs/promises";
2
+ import path from "node:path";
3
+ import type {
4
+ ExtensionMcpServer,
5
+ ExtensionMcpServerTool,
6
+ } from "@zuplo/mcp/openapi/types";
7
+ import {
8
+ DEFAULT_MCP_SERVER_NAME,
9
+ DEFAULT_MCP_SERVER_VERSION,
10
+ } from "@zuplo/mcp/server";
11
+ import type { OpenAPIV3_1 } from "openapi-types";
12
+ import type { ProcessorArg } from "../config/validators/BuildSchema.js";
13
+ import { traverse, traverseAsync } from "../lib/util/traverse.js";
14
+ import type { RecordAny } from "../lib/util/types.js";
15
+ import { operations } from "./enrich-with-zuplo.js";
16
+
17
+ // extracts x-mcp-server metadata from the operation using x-zuplo-mcp-tool
18
+ // as a first class citizen.
19
+ const extractOperationSchema = (
20
+ operation: OpenAPIV3_1.OperationObject & RecordAny,
21
+ ): ExtensionMcpServerTool | null => {
22
+ if (!operation.operationId) return null;
23
+
24
+ // Check if tool is explicitly disabled
25
+ const mcpToolConfig = operation["x-zuplo-mcp-tool"];
26
+ if (mcpToolConfig?.enabled === false) {
27
+ return null;
28
+ }
29
+
30
+ const tool: ExtensionMcpServerTool = {
31
+ // Use custom name from x-zuplo-mcp-tool or fallback to operationId
32
+ name: mcpToolConfig?.name || operation.operationId,
33
+
34
+ // Use custom description from x-zuplo-mcp-tool or fallback
35
+ // to operation description
36
+ description:
37
+ mcpToolConfig?.description ||
38
+ operation.summary ||
39
+ operation.description ||
40
+ `Operation ${operation.operationId}`,
41
+ };
42
+
43
+ // Grab valid request body JSON schema for the tool
44
+ const requestBody = operation.requestBody as
45
+ | OpenAPIV3_1.RequestBodyObject
46
+ | undefined;
47
+
48
+ const schema = requestBody?.content?.["application/json"]?.schema;
49
+ if (schema && typeof schema === "object") {
50
+ // TODO: @jpmcb - Zuplo also supports in-path parameters and query parameters
51
+ // as MCP "inputSchema" arguments. In order to document full argument params,
52
+ // Zudoku will need to more intelligently parse these elements of an operation.
53
+ tool.inputSchema = { body: schema };
54
+ }
55
+
56
+ return tool;
57
+ };
58
+
59
+ // Builds a lookup map of operationId -> operation for efficient access
60
+ const buildOperationLookup = (
61
+ document: OpenAPIV3_1.Document,
62
+ ): Map<string, OpenAPIV3_1.OperationObject> => {
63
+ const operationMap = new Map<string, OpenAPIV3_1.OperationObject>();
64
+
65
+ traverse(document, (node, path) => {
66
+ // Check if we're at a path item level (paths -> /some/path -> method)
67
+ // and validate it's in allowed operations
68
+ if (
69
+ !path ||
70
+ path.length < 2 ||
71
+ path[0] !== "paths" ||
72
+ !operations.includes(path[path.length - 1] as string)
73
+ ) {
74
+ return node;
75
+ }
76
+
77
+ if (node.operationId) {
78
+ operationMap.set(node.operationId, node);
79
+ }
80
+
81
+ return node;
82
+ });
83
+
84
+ return operationMap;
85
+ };
86
+
87
+ // Takes an OpenAPI document and returns the x-mcp-server tools list defined
88
+ // by an MCP server's options.files[x].operationIds array.
89
+ const findOperationsInDocument = (
90
+ document: OpenAPIV3_1.Document,
91
+ operationIds: string[],
92
+ ): ExtensionMcpServerTool[] => {
93
+ const tools: ExtensionMcpServerTool[] = [];
94
+ const operationLookup = buildOperationLookup(document);
95
+
96
+ operationIds.forEach((operationId) => {
97
+ const operation = operationLookup.get(operationId);
98
+ if (operation) {
99
+ const tool = extractOperationSchema(operation);
100
+ if (tool) {
101
+ tools.push(tool);
102
+ }
103
+ }
104
+ });
105
+
106
+ return tools;
107
+ };
108
+
109
+ // Enriches an OpenAPI schema with x-mcp-server data based on the Zuplo MCP server handler
110
+ export const enrichWithZuploMcpServerData = ({
111
+ rootDir,
112
+ }: {
113
+ rootDir: string;
114
+ }) => {
115
+ return async ({ schema }: ProcessorArg) => {
116
+ if (!schema.paths) return schema;
117
+ const modifiedSchema = { ...schema };
118
+ if (!modifiedSchema?.paths) return modifiedSchema;
119
+
120
+ await traverseAsync(modifiedSchema, async (node, nodePath) => {
121
+ // Check if we're at a "post" operation (paths -> /some/path -> "post").
122
+ // HTTP MCP servers are only allow post operations.
123
+ if (!nodePath || nodePath.length !== 3 || nodePath[2] !== "post") {
124
+ return node;
125
+ }
126
+
127
+ const operation = node as RecordAny;
128
+ if (!operation?.["x-zuplo-route"]) return node;
129
+
130
+ const handler = operation["x-zuplo-route"]?.handler;
131
+ if (handler?.export !== "mcpServerHandler" || !handler.options?.files)
132
+ return node;
133
+
134
+ const tools: ExtensionMcpServerTool[] = [];
135
+
136
+ for (const fileConfig of handler.options.files) {
137
+ if (!fileConfig.path || !fileConfig.operationIds) continue;
138
+
139
+ const resolvedPath = path.resolve(rootDir, "../", fileConfig.path);
140
+ const fileContent = await fs.readFile(resolvedPath, "utf-8");
141
+ const document = JSON.parse(fileContent);
142
+
143
+ if (document) {
144
+ const fileTools = findOperationsInDocument(
145
+ document,
146
+ fileConfig.operationIds,
147
+ );
148
+
149
+ tools.push(...fileTools);
150
+ }
151
+ }
152
+
153
+ const mcpExtension: ExtensionMcpServer = {
154
+ name: DEFAULT_MCP_SERVER_NAME,
155
+ version: DEFAULT_MCP_SERVER_VERSION,
156
+ };
157
+
158
+ if (tools.length > 0) {
159
+ mcpExtension.tools = tools;
160
+ }
161
+
162
+ node["x-mcp-server"] = mcpExtension;
163
+ return node;
164
+ });
165
+
166
+ return modifiedSchema;
167
+ };
168
+ };
@@ -0,0 +1,254 @@
1
+ import type { OpenAPIV3_1 } from "openapi-types";
2
+ import type { ProcessorArg } from "../config/validators/BuildSchema.js";
3
+ import { objectEntries } from "../lib/util/objectEntries.js";
4
+ import type { RecordAny } from "../lib/util/traverse.js";
5
+ import type {
6
+ PoliciesConfigFile,
7
+ PolicyConfigurationFragment,
8
+ } from "./policy-types.js";
9
+
10
+ const API_KEY_REPLACEMENT_STRING = "YOUR_KEY_HERE";
11
+
12
+ const enrichWithApiKeyData = (
13
+ operationObject: RecordAny,
14
+ apiKeyPolicies: PolicyConfigurationFragment[],
15
+ ) => {
16
+ if (apiKeyPolicies.length === 0) {
17
+ return operationObject;
18
+ }
19
+
20
+ const firstPolicy = apiKeyPolicies[0];
21
+ const authorizationHeader =
22
+ (firstPolicy?.handler.options?.authHeader as string) || "Authorization";
23
+ const authorizationScheme = (firstPolicy?.handler.options?.authScheme ??
24
+ "Bearer") as string;
25
+ const authSchemeExample =
26
+ authorizationScheme !== ""
27
+ ? `${authorizationScheme} ${API_KEY_REPLACEMENT_STRING}`
28
+ : API_KEY_REPLACEMENT_STRING;
29
+
30
+ // Add API key header parameter
31
+ const apiKeyHeader: OpenAPIV3_1.ParameterObject = {
32
+ name: authorizationHeader,
33
+ in: "header",
34
+ required: true,
35
+ example: authSchemeExample,
36
+ schema: {
37
+ type: "string",
38
+ },
39
+ description: `The \`${authorizationHeader}\` header is used to authenticate with the API using your API key. Value is of the format \`${authSchemeExample}\`.`,
40
+ };
41
+
42
+ const parameters = operationObject.parameters || [];
43
+ if (
44
+ !parameters.some((param: RecordAny) => param.name === authorizationHeader)
45
+ ) {
46
+ operationObject.parameters = [apiKeyHeader, ...parameters];
47
+ }
48
+
49
+ // Add security scheme and requirement
50
+ const apiSecuritySchemeId = "api_key";
51
+ const apiKeySecurityRequirement = { [apiSecuritySchemeId]: [] };
52
+
53
+ if (!operationObject.security) {
54
+ operationObject.security = [apiKeySecurityRequirement];
55
+ } else if (
56
+ !operationObject.security.some((req: RecordAny) => req[apiSecuritySchemeId])
57
+ ) {
58
+ operationObject.security = [
59
+ apiKeySecurityRequirement,
60
+ ...operationObject.security,
61
+ ];
62
+ }
63
+
64
+ return operationObject;
65
+ };
66
+
67
+ const enrichWithRateLimitData = (
68
+ operationObject: RecordAny,
69
+ rateLimitPolicies: PolicyConfigurationFragment[],
70
+ ) => {
71
+ if (rateLimitPolicies.length === 0) {
72
+ return operationObject;
73
+ }
74
+
75
+ const shouldIncludeHeader = rateLimitPolicies.some(
76
+ (policy) => policy.handler.options?.headerMode !== "none",
77
+ );
78
+
79
+ if (!operationObject.responses) {
80
+ operationObject.responses = {};
81
+ }
82
+
83
+ if (!operationObject.responses["429"]) {
84
+ operationObject.responses["429"] = {
85
+ $ref: shouldIncludeHeader
86
+ ? "#/components/responses/RateLimitWithRetryAfter"
87
+ : "#/components/responses/RateLimitNoRetryAfter",
88
+ };
89
+ }
90
+
91
+ return operationObject;
92
+ };
93
+
94
+ // biome-ignore format: for readability
95
+ export const operations = [
96
+ "get", "put", "post", "delete",
97
+ "options", "head", "patch", "trace",
98
+ ];
99
+
100
+ const rateLimitingResponse: OpenAPIV3_1.ResponseObject = {
101
+ description: "Rate Limiting Response",
102
+ content: {
103
+ "application/json": {
104
+ schema: {
105
+ type: "object",
106
+ required: ["type", "title", "status"],
107
+ examples: [
108
+ {
109
+ type: "https://httpproblems.com/http-status/429",
110
+ title: "Too Many Requests",
111
+ status: 429,
112
+ instance: "/foo/bar",
113
+ },
114
+ ],
115
+ properties: {
116
+ type: {
117
+ type: "string",
118
+ example: "https://httpproblems.com/http-status/429",
119
+ description: "A URI reference that identifies the problem.",
120
+ },
121
+ title: {
122
+ type: "string",
123
+ example: "Too Many Requests",
124
+ description: "A short, human-readable summary of the problem.",
125
+ },
126
+ status: {
127
+ type: "number",
128
+ example: 429,
129
+ description: "The HTTP status code.",
130
+ },
131
+ instance: {
132
+ type: "string",
133
+ example: "/foo/bar",
134
+ },
135
+ },
136
+ },
137
+ },
138
+ },
139
+ };
140
+
141
+ const rateLimitingResponseWithHeader: OpenAPIV3_1.ResponseObject = {
142
+ ...rateLimitingResponse,
143
+ headers: {
144
+ "retry-after": {
145
+ description: "The number of seconds to wait before making a new request.",
146
+ schema: {
147
+ type: "integer",
148
+ example: 60,
149
+ },
150
+ },
151
+ },
152
+ };
153
+
154
+ export const enrichWithZuploData = ({
155
+ policiesConfig,
156
+ }: {
157
+ policiesConfig: PoliciesConfigFile;
158
+ }) => {
159
+ return ({ schema }: ProcessorArg) => {
160
+ if (!schema.paths) return schema;
161
+
162
+ let hasRateLimitPolicies = false;
163
+
164
+ for (const [, pathItem] of objectEntries<RecordAny>(schema.paths)) {
165
+ for (const method of operations) {
166
+ const operation = pathItem[method];
167
+ if (!operation?.["x-zuplo-route"]) continue;
168
+
169
+ const inboundPolicies = operation[
170
+ "x-zuplo-route"
171
+ ]?.policies?.inbound?.reduce((acc: string[], policyName: string) => {
172
+ const policy = policiesConfig.policies?.find(
173
+ ({ name }) => name === policyName,
174
+ );
175
+ if (!policy) return acc;
176
+
177
+ // Handle composite policies
178
+ if (policy.handler.export === "CompositeInboundPolicy") {
179
+ const childPolicies = policy.handler.options?.policies as
180
+ | string[]
181
+ | undefined;
182
+ return childPolicies ? [...acc, ...childPolicies] : acc;
183
+ }
184
+
185
+ return [...acc, policyName];
186
+ }, []);
187
+
188
+ if (!inboundPolicies) continue;
189
+
190
+ // Find API key policies
191
+ const apiKeyPolicies =
192
+ policiesConfig.policies?.filter(
193
+ (policy) =>
194
+ inboundPolicies.includes(policy.name) &&
195
+ (policy.handler.export === "ApiAuthKeyInboundPolicy" ||
196
+ policy.handler.export === "ApiKeyInboundPolicy") &&
197
+ !policy.handler.options
198
+ ?.disableAutomaticallyAddingKeyHeaderToOpenApi,
199
+ ) ?? [];
200
+
201
+ // Find rate limit policies
202
+ const rateLimitPolicies =
203
+ policiesConfig.policies?.filter(
204
+ (policy) =>
205
+ inboundPolicies.includes(policy.name) &&
206
+ (policy.handler.export === "RateLimitInboundPolicy" ||
207
+ policy.handler.export === "ComplexRateLimitInboundPolicy"),
208
+ ) ?? [];
209
+
210
+ if (rateLimitPolicies.length > 0) {
211
+ hasRateLimitPolicies = true;
212
+ }
213
+
214
+ // Apply enrichments directly to the operation
215
+ pathItem[method] = enrichWithApiKeyData(operation, apiKeyPolicies);
216
+ pathItem[method] = enrichWithRateLimitData(
217
+ pathItem[method],
218
+ rateLimitPolicies,
219
+ );
220
+ }
221
+ }
222
+
223
+ // Add security scheme if we have API key policies
224
+ if (
225
+ policiesConfig.policies?.some(
226
+ (policy) =>
227
+ policy.handler.export === "ApiAuthKeyInboundPolicy" ||
228
+ policy.handler.export === "ApiKeyInboundPolicy",
229
+ )
230
+ ) {
231
+ if (!schema.components) schema.components = {};
232
+ if (!schema.components.securitySchemes)
233
+ schema.components.securitySchemes = {};
234
+
235
+ if (!schema.components.securitySchemes.api_key) {
236
+ schema.components.securitySchemes.api_key = {
237
+ type: "http",
238
+ scheme: "bearer",
239
+ };
240
+ }
241
+ }
242
+
243
+ // Add rate limiting responses only if we found rate limiting policies
244
+ if (hasRateLimitPolicies) {
245
+ if (!schema.components) schema.components = {};
246
+ if (!schema.components.responses) schema.components.responses = {};
247
+ schema.components.responses.RateLimitNoRetryAfter = rateLimitingResponse;
248
+ schema.components.responses.RateLimitWithRetryAfter =
249
+ rateLimitingResponseWithHeader;
250
+ }
251
+
252
+ return schema;
253
+ };
254
+ };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * This file was automatically generated by json-schema-to-typescript.
3
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
4
+ * and run json-schema-to-typescript to regenerate this file.
5
+ */
6
+
7
+ export interface PoliciesConfigFile {
8
+ policies?: PolicyConfigurationFragment[];
9
+ corsPolicies?: CorsPolicyConfiguration[];
10
+ }
11
+ export interface PolicyConfigurationFragment {
12
+ name: string;
13
+ policyType: string;
14
+ handler: HandlerDefinition;
15
+ options?: {
16
+ [k: string]: unknown;
17
+ };
18
+ }
19
+ export interface HandlerDefinition {
20
+ module: string;
21
+ export: string;
22
+ options?: {
23
+ [k: string]: unknown;
24
+ };
25
+ }
26
+ export interface CorsPolicyConfiguration {
27
+ name: string;
28
+ allowCredentials?: boolean;
29
+ maxAge?: number;
30
+ allowedOrigins: string[] | string;
31
+ allowedMethods?:
32
+ | (
33
+ | "GET"
34
+ | "HEAD"
35
+ | "POST"
36
+ | "PUT"
37
+ | "DELETE"
38
+ | "CONNECT"
39
+ | "OPTIONS"
40
+ | "TRACE"
41
+ | "PATCH"
42
+ )[]
43
+ | string;
44
+ allowedHeaders?: string[] | string;
45
+ exposeHeaders?: string[] | string;
46
+ }
@@ -0,0 +1,35 @@
1
+ import fs from "node:fs/promises";
2
+ import path from "node:path";
3
+ import { ZuploEnv } from "../app/env.js";
4
+ import type {
5
+ Processor,
6
+ ProcessorArg,
7
+ } from "../config/validators/BuildSchema.js";
8
+ import { removeExtensions } from "../lib/plugins/openapi/processors/removeExtensions.js";
9
+ import { removeParameters } from "../lib/plugins/openapi/processors/removeParameters.js";
10
+ import { removePaths } from "../lib/plugins/openapi/processors/removePaths.js";
11
+ import { enrichWithZuploData } from "./enrich-with-zuplo.js";
12
+ import { enrichWithZuploMcpServerData } from "./enrich-with-zuplo-mcp.js";
13
+
14
+ export const getProcessors = async (rootDir: string): Promise<Processor[]> => {
15
+ const policiesConfig = JSON.parse(
16
+ await fs.readFile(path.join(rootDir, "../config/policies.json"), "utf-8"),
17
+ );
18
+
19
+ return [
20
+ removePaths({ shouldRemove: ({ operation }) => operation["x-internal"] }),
21
+ removeParameters({
22
+ shouldRemove: ({ parameter }) => parameter["x-internal"],
23
+ }),
24
+ enrichWithZuploData({ policiesConfig }),
25
+ enrichWithZuploMcpServerData({ rootDir }),
26
+ ({ schema }: ProcessorArg) => {
27
+ const url = ZuploEnv.serverUrl;
28
+ if (!url) return schema;
29
+ return { ...schema, servers: [{ url }] };
30
+ },
31
+ removeExtensions({ shouldRemove: (key) => key.startsWith("x-zuplo") }),
32
+ ];
33
+ };
34
+
35
+ export default getProcessors;
@@ -0,0 +1,14 @@
1
+ import type { ZudokuConfig } from "../config/validators/validate.js";
2
+
3
+ /**
4
+ * @deprecated `withZuplo` is no longer needed and will automatically be applied. It will be removed in a future version.
5
+ */
6
+ const withZuplo = (config: ZudokuConfig): ZudokuConfig => {
7
+ // biome-ignore lint/suspicious/noConsole: Logging allowed here
8
+ console.warn(
9
+ "`withZuplo` is no longer needed and will automatically be applied. It will be removed in a future version.",
10
+ );
11
+ return config;
12
+ };
13
+
14
+ export default withZuplo;
@@ -1 +0,0 @@
1
- {"version":3,"file":"ClaudeLogo-B4Xxt-x_.js","sources":["../src/lib/components/Pagination.tsx","../src/lib/plugins/markdown/assets/ChatGPTLogo.tsx","../src/lib/plugins/markdown/assets/ClaudeLogo.tsx"],"sourcesContent":["import { ArrowLeftIcon, ArrowRightIcon } from \"lucide-react\";\nimport { Link } from \"react-router\";\nimport { cn } from \"../util/cn.js\";\nimport { Button } from \"./index.js\";\n\nexport const Pagination = ({\n prev,\n next,\n className,\n}: {\n prev: { to: string; label: string } | undefined;\n next: { to: string; label: string } | undefined;\n className?: string;\n}) => {\n const linkClass =\n \"group transition-all p-5 space-x-1 rtl:space-x-reverse transition-all hover:text-foreground\";\n\n return (\n <div\n className={cn(\n \"flex -mx-4 text-muted-foreground font-semibold\",\n prev ? \"justify-between\" : \"justify-end\",\n className,\n )}\n data-pagefind-ignore=\"all\"\n >\n {prev && (\n <Button variant=\"ghost\" asChild>\n <Link to={prev.to} relative=\"path\" className={linkClass}>\n <ArrowLeftIcon size={14} strokeWidth={2.5} />\n <span className=\"text-lg truncate\">{prev.label}</span>\n </Link>\n </Button>\n )}\n {next && (\n <Button variant=\"ghost\" asChild>\n <Link to={next.to} relative=\"path\" className={linkClass}>\n <span className=\"text-lg truncate\">{next.label}</span>\n <ArrowRightIcon size={14} strokeWidth={2.5} />\n </Link>\n </Button>\n )}\n </div>\n );\n};\n","import type { SVGProps } from \"react\";\n\nexport const ChatGPTLogo = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 320\" {...props}>\n <title>ChatGPT</title>\n <path\n fill=\"currentColor\"\n d=\"M297.06 130.97a79.712 79.712 0 0 0-6.85-65.48c-17.46-30.4-52.56-46.04-86.84-38.68A79.747 79.747 0 0 0 143.24 0C108.2-.08 77.11 22.48 66.33 55.82a79.754 79.754 0 0 0-53.31 38.67c-17.59 30.32-13.58 68.54 9.92 94.54a79.712 79.712 0 0 0 6.85 65.48c17.46 30.4 52.56 46.04 86.84 38.68a79.687 79.687 0 0 0 60.13 26.8c35.06.09 66.16-22.49 76.94-55.86a79.754 79.754 0 0 0 53.31-38.67c17.57-30.32 13.55-68.51-9.94-94.51zM176.78 299.08a59.77 59.77 0 0 1-38.39-13.88c.49-.26 1.34-.73 1.89-1.07l63.72-36.8a10.36 10.36 0 0 0 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97zM47.94 244.05a59.71 59.71 0 0 1-7.15-40.18c.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83L129.87 266c-28.69 16.52-65.33 6.7-81.92-21.95zM31.17 104.96c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91L118.44 224c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94a59.94 59.94 0 0 1-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8a10.375 10.375 0 0 0-10.47 0l-77.79 44.92V92c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22a59.95 59.95 0 0 1 7.15 40.1zm-168.51 55.43-26.94-15.55a.943.943 0 0 1-.52-.74V80.86c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07L116 72.67a10.344 10.344 0 0 0-5.24 9.06l-.04 89.79zM125.35 140 160 119.99l34.65 20V180L160 200l-34.65-20z\"\n />\n </svg>\n);\n","import type { SVGProps } from \"react\";\n\nexport const ClaudeLogo = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"1em\"\n height=\"1em\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <title>Claude</title>\n <path\n fill=\"#D97757\"\n d=\"m4.709 15.955 4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 0 1-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312z\"\n />\n </svg>\n);\n"],"names":["Pagination","prev","next","className","linkClass","jsxs","cn","jsx","Button","Link","ArrowLeftIcon","ArrowRightIcon","ChatGPTLogo","props","ClaudeLogo"],"mappings":";;;;;AAKO,MAAMA,IAAa,CAAC;AAAA,EACzB,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AACF,MAIM;AACJ,QAAMC,IACJ;AAEF,SACEC,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAL,IAAO,oBAAoB;AAAA,QAC3BE;AAAA,MAAA;AAAA,MAEF,wBAAqB;AAAA,MAEpB,UAAA;AAAA,QAAAF,KACCM,gBAAAA,EAAAA,IAACC,GAAA,EAAO,SAAQ,SAAQ,SAAO,IAC7B,UAAAH,gBAAAA,EAAAA,KAACI,GAAA,EAAK,IAAIR,EAAK,IAAI,UAAS,QAAO,WAAWG,GAC5C,UAAA;AAAA,UAAAG,gBAAAA,EAAAA,IAACG,GAAA,EAAc,MAAM,IAAI,aAAa,KAAK;AAAA,UAC3CH,gBAAAA,EAAAA,IAAC,QAAA,EAAK,WAAU,oBAAoB,YAAK,MAAA,CAAM;AAAA,QAAA,EAAA,CACjD,EAAA,CACF;AAAA,QAEDL,KACCK,gBAAAA,EAAAA,IAACC,GAAA,EAAO,SAAQ,SAAQ,SAAO,IAC7B,UAAAH,gBAAAA,EAAAA,KAACI,GAAA,EAAK,IAAIP,EAAK,IAAI,UAAS,QAAO,WAAWE,GAC5C,UAAA;AAAA,UAAAG,gBAAAA,EAAAA,IAAC,QAAA,EAAK,WAAU,oBAAoB,UAAAL,EAAK,OAAM;AAAA,UAC/CK,gBAAAA,EAAAA,IAACI,GAAA,EAAe,MAAM,IAAI,aAAa,IAAA,CAAK;AAAA,QAAA,EAAA,CAC9C,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,GC1CaC,IAAc,CAACC,MAC1BR,gBAAAA,EAAAA,KAAC,OAAA,EAAI,OAAM,8BAA6B,SAAQ,eAAe,GAAGQ,GAChE,UAAA;AAAA,EAAAN,gBAAAA,EAAAA,IAAC,WAAM,UAAA,UAAA,CAAO;AAAA,EACdA,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,GAAE;AAAA,IAAA;AAAA,EAAA;AACJ,EAAA,CACF,GCPWO,IAAa,CAACD,MACzBR,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,OAAM;AAAA,IACN,QAAO;AAAA,IACP,MAAK;AAAA,IACL,UAAS;AAAA,IACT,SAAQ;AAAA,IACP,GAAGQ;AAAA,IAEJ,UAAA;AAAA,MAAAN,gBAAAA,EAAAA,IAAC,WAAM,UAAA,SAAA,CAAM;AAAA,MACbA,gBAAAA,EAAAA;AAAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,GAAE;AAAA,QAAA;AAAA,MAAA;AAAA,IACJ;AAAA,EAAA;AACF;"}