drizzle-cube 0.4.53 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/dist/adapters/express/index.cjs +2 -2
  2. package/dist/adapters/express/index.js +109 -96
  3. package/dist/adapters/fastify/index.cjs +2 -2
  4. package/dist/adapters/fastify/index.js +148 -134
  5. package/dist/adapters/{handler-RItnSaEl.js → handler-3LGcjLtr.js} +617 -612
  6. package/dist/adapters/handler-BzzbVpcl.cjs +25 -0
  7. package/dist/adapters/hono/index.cjs +1 -1
  8. package/dist/adapters/hono/index.js +103 -99
  9. package/dist/adapters/{compiler-S6KHiOY6.js → locale-DTnJrxm1.js} +1700 -1563
  10. package/dist/adapters/locale-DueXjqMh.cjs +198 -0
  11. package/dist/adapters/locale.d.ts +8 -0
  12. package/dist/adapters/mcp-tools.cjs +1 -1
  13. package/dist/adapters/mcp-tools.d.ts +7 -3
  14. package/dist/adapters/mcp-tools.js +27 -27
  15. package/dist/adapters/mcp-transport-C7VLf4T5.js +579 -0
  16. package/dist/adapters/mcp-transport-poPHl_2j.cjs +39 -0
  17. package/dist/adapters/mcp-transport.d.ts +25 -2
  18. package/dist/adapters/nextjs/index.cjs +1 -1
  19. package/dist/adapters/nextjs/index.js +152 -132
  20. package/dist/adapters/utils-DNrj-ryp.cjs +17 -0
  21. package/dist/adapters/{utils-IH1ePsBd.js → utils-DOg9oGdt.js} +2341 -819
  22. package/dist/adapters/utils.cjs +1 -1
  23. package/dist/adapters/utils.d.ts +45 -2
  24. package/dist/adapters/utils.js +1 -1
  25. package/dist/client/charts.js +12 -12
  26. package/dist/client/chunks/{DashboardEditModal-BTdV528l.js → DashboardEditModal-cSSIAZGy.js} +1968 -1973
  27. package/dist/client/chunks/DashboardEditModal-cSSIAZGy.js.map +1 -0
  28. package/dist/client/chunks/{FieldSearchModal-D75vy4Wb.js → FieldSearchModal-CZNo4pNK.js} +550 -536
  29. package/dist/client/chunks/FieldSearchModal-CZNo4pNK.js.map +1 -0
  30. package/dist/client/chunks/KpiDelta-Dll_eCV1.js +2 -0
  31. package/dist/client/chunks/KpiNumber-BPlR92hI.js +2 -0
  32. package/dist/client/chunks/KpiText-BIxq7Jso.js +2 -0
  33. package/dist/client/chunks/{RetentionCombinedChart-DIhK5pD8.js → RetentionCombinedChart-BD8tGeM_.js} +96 -96
  34. package/dist/client/chunks/RetentionCombinedChart-BD8tGeM_.js.map +1 -0
  35. package/dist/client/chunks/{RetentionHeatmap-CyREolyP.js → RetentionHeatmap-B_5sewwi.js} +77 -77
  36. package/dist/client/chunks/RetentionHeatmap-B_5sewwi.js.map +1 -0
  37. package/dist/client/chunks/SchemaVisualization-CCICjhvv.js +2 -0
  38. package/dist/client/chunks/SchemaVisualizationLazy-DraGsMx6.js +2 -0
  39. package/dist/client/chunks/af-ZA-xDmO5F0s.js +1431 -0
  40. package/dist/client/chunks/af-ZA-xDmO5F0s.js.map +1 -0
  41. package/dist/client/chunks/{analysis-builder-C1CJ0c7L.js → analysis-builder-BeVZhiQ5.js} +1519 -1507
  42. package/dist/client/chunks/analysis-builder-BeVZhiQ5.js.map +1 -0
  43. package/dist/client/chunks/{analysis-builder-shared-rkjJfWLT.js → analysis-builder-shared-BWc7ZZnG.js} +925 -954
  44. package/dist/client/chunks/analysis-builder-shared-BWc7ZZnG.js.map +1 -0
  45. package/dist/client/chunks/chart-activity-grid-CWT0gLv4.js +2376 -0
  46. package/dist/client/chunks/chart-activity-grid-CWT0gLv4.js.map +1 -0
  47. package/dist/client/chunks/{chart-area-BwYaflNk.js → chart-area-D63kG8OT.js} +157 -157
  48. package/dist/client/chunks/chart-area-D63kG8OT.js.map +1 -0
  49. package/dist/client/chunks/{chart-bar-BiENfFgE.js → chart-bar-BEfsCLjl.js} +78 -78
  50. package/dist/client/chunks/chart-bar-BEfsCLjl.js.map +1 -0
  51. package/dist/client/chunks/{chart-box-plot-BJF1tBXC.js → chart-box-plot-o-h9MRX5.js} +111 -114
  52. package/dist/client/chunks/chart-box-plot-o-h9MRX5.js.map +1 -0
  53. package/dist/client/chunks/{chart-bubble-DQQhGVDJ.js → chart-bubble-CMDp4Pfm.js} +121 -121
  54. package/dist/client/chunks/chart-bubble-CMDp4Pfm.js.map +1 -0
  55. package/dist/client/chunks/chart-candlestick-WyANJ0Ky.js +303 -0
  56. package/dist/client/chunks/chart-candlestick-WyANJ0Ky.js.map +1 -0
  57. package/dist/client/chunks/chart-config-activity-grid-C-EkgYoa.js +51 -0
  58. package/dist/client/chunks/chart-config-activity-grid-C-EkgYoa.js.map +1 -0
  59. package/dist/client/chunks/chart-config-area-CMZpbIah.js +93 -0
  60. package/dist/client/chunks/chart-config-area-CMZpbIah.js.map +1 -0
  61. package/dist/client/chunks/chart-config-bar-B8_V4YLg.js +87 -0
  62. package/dist/client/chunks/chart-config-bar-B8_V4YLg.js.map +1 -0
  63. package/dist/client/chunks/chart-config-box-plot-Dwj7sEbU.js +35 -0
  64. package/dist/client/chunks/chart-config-box-plot-Dwj7sEbU.js.map +1 -0
  65. package/dist/client/chunks/chart-config-bubble-B0w0ZVp4.js +82 -0
  66. package/dist/client/chunks/chart-config-bubble-B0w0ZVp4.js.map +1 -0
  67. package/dist/client/chunks/chart-config-candlestick-Bvo3zeIn.js +72 -0
  68. package/dist/client/chunks/chart-config-candlestick-Bvo3zeIn.js.map +1 -0
  69. package/dist/client/chunks/{chart-config-data-table-Bhdx5Hem.js → chart-config-data-table-BQXSn4b_.js} +9 -9
  70. package/dist/client/chunks/chart-config-data-table-BQXSn4b_.js.map +1 -0
  71. package/dist/client/chunks/chart-config-funnel-BzEsHmjR.js +93 -0
  72. package/dist/client/chunks/chart-config-funnel-BzEsHmjR.js.map +1 -0
  73. package/dist/client/chunks/chart-config-gauge-C5ZiyZy7.js +64 -0
  74. package/dist/client/chunks/chart-config-gauge-C5ZiyZy7.js.map +1 -0
  75. package/dist/client/chunks/chart-config-heat-map-Cv8qNnVP.js +91 -0
  76. package/dist/client/chunks/chart-config-heat-map-Cv8qNnVP.js.map +1 -0
  77. package/dist/client/chunks/chart-config-kpi-delta-BraHQc2E.js +94 -0
  78. package/dist/client/chunks/chart-config-kpi-delta-BraHQc2E.js.map +1 -0
  79. package/dist/client/chunks/chart-config-kpi-number-CeCkx7mC.js +75 -0
  80. package/dist/client/chunks/chart-config-kpi-number-CeCkx7mC.js.map +1 -0
  81. package/dist/client/chunks/chart-config-kpi-text-CImM3SvH.js +47 -0
  82. package/dist/client/chunks/chart-config-kpi-text-CImM3SvH.js.map +1 -0
  83. package/dist/client/chunks/chart-config-line-BVKapAQK.js +104 -0
  84. package/dist/client/chunks/chart-config-line-BVKapAQK.js.map +1 -0
  85. package/dist/client/chunks/chart-config-markdown-C-_g_8te.js +117 -0
  86. package/dist/client/chunks/chart-config-markdown-C-_g_8te.js.map +1 -0
  87. package/dist/client/chunks/chart-config-measure-profile-KTVV1gO3.js +82 -0
  88. package/dist/client/chunks/chart-config-measure-profile-KTVV1gO3.js.map +1 -0
  89. package/dist/client/chunks/chart-config-pie-BZxVl25X.js +68 -0
  90. package/dist/client/chunks/chart-config-pie-BZxVl25X.js.map +1 -0
  91. package/dist/client/chunks/chart-config-radar-B7FByX3t.js +49 -0
  92. package/dist/client/chunks/chart-config-radar-B7FByX3t.js.map +1 -0
  93. package/dist/client/chunks/chart-config-radial-bar-UfW_3yyX.js +38 -0
  94. package/dist/client/chunks/chart-config-radial-bar-UfW_3yyX.js.map +1 -0
  95. package/dist/client/chunks/chart-config-sankey-DGAThN9i.js +66 -0
  96. package/dist/client/chunks/chart-config-sankey-DGAThN9i.js.map +1 -0
  97. package/dist/client/chunks/chart-config-scatter-BVVJuOnt.js +61 -0
  98. package/dist/client/chunks/chart-config-scatter-BVVJuOnt.js.map +1 -0
  99. package/dist/client/chunks/chart-config-sunburst-utejM2YS.js +45 -0
  100. package/dist/client/chunks/chart-config-sunburst-utejM2YS.js.map +1 -0
  101. package/dist/client/chunks/chart-config-tree-map-IHp97OyV.js +51 -0
  102. package/dist/client/chunks/chart-config-tree-map-IHp97OyV.js.map +1 -0
  103. package/dist/client/chunks/chart-config-waterfall-BdqG1V-x.js +59 -0
  104. package/dist/client/chunks/chart-config-waterfall-BdqG1V-x.js.map +1 -0
  105. package/dist/client/chunks/{chart-data-table-2iCsn0CF.js → chart-data-table-C3Xh9jwL.js} +1083 -1086
  106. package/dist/client/chunks/chart-data-table-C3Xh9jwL.js.map +1 -0
  107. package/dist/client/chunks/{chart-funnel-poyOf7-e.js → chart-funnel-C7pgktN5.js} +132 -132
  108. package/dist/client/chunks/chart-funnel-C7pgktN5.js.map +1 -0
  109. package/dist/client/chunks/{chart-gauge-D5J4gRky.js → chart-gauge-D2r2B_AR.js} +150 -150
  110. package/dist/client/chunks/chart-gauge-D2r2B_AR.js.map +1 -0
  111. package/dist/client/chunks/{chart-heat-map-BAMVhLGG.js → chart-heat-map-Dw2yjwfO.js} +75 -80
  112. package/dist/client/chunks/chart-heat-map-Dw2yjwfO.js.map +1 -0
  113. package/dist/client/chunks/{chart-kpi-delta-KQjUIeal.js → chart-kpi-delta-CYE0S1x_.js} +117 -117
  114. package/dist/client/chunks/chart-kpi-delta-CYE0S1x_.js.map +1 -0
  115. package/dist/client/chunks/chart-kpi-number-BlZ79xHW.js +321 -0
  116. package/dist/client/chunks/chart-kpi-number-BlZ79xHW.js.map +1 -0
  117. package/dist/client/chunks/chart-kpi-text-DY1BnxPe.js +148 -0
  118. package/dist/client/chunks/chart-kpi-text-DY1BnxPe.js.map +1 -0
  119. package/dist/client/chunks/{chart-line-B5_WntY5.js → chart-line-CBsTThTv.js} +123 -123
  120. package/dist/client/chunks/chart-line-CBsTThTv.js.map +1 -0
  121. package/dist/client/chunks/chart-markdown-BWaWVkuz.js +3474 -0
  122. package/dist/client/chunks/chart-markdown-BWaWVkuz.js.map +1 -0
  123. package/dist/client/chunks/chart-measure-profile-B41qCTBG.js +179 -0
  124. package/dist/client/chunks/chart-measure-profile-B41qCTBG.js.map +1 -0
  125. package/dist/client/chunks/chart-pie-Djbu8x2v.js +172 -0
  126. package/dist/client/chunks/chart-pie-Djbu8x2v.js.map +1 -0
  127. package/dist/client/chunks/chart-radar-BsTcKV0K.js +154 -0
  128. package/dist/client/chunks/chart-radar-BsTcKV0K.js.map +1 -0
  129. package/dist/client/chunks/chart-radial-bar-Du7XNnwE.js +148 -0
  130. package/dist/client/chunks/chart-radial-bar-Du7XNnwE.js.map +1 -0
  131. package/dist/client/chunks/{chart-sankey-BOyxfG1Q.js → chart-sankey-WwkZAhLy.js} +73 -73
  132. package/dist/client/chunks/chart-sankey-WwkZAhLy.js.map +1 -0
  133. package/dist/client/chunks/chart-scatter-D8krEYsA.js +255 -0
  134. package/dist/client/chunks/chart-scatter-D8krEYsA.js.map +1 -0
  135. package/dist/client/chunks/{chart-sunburst-D9lGEOCc.js → chart-sunburst-CIDB_pTl.js} +66 -66
  136. package/dist/client/chunks/chart-sunburst-CIDB_pTl.js.map +1 -0
  137. package/dist/client/chunks/chart-tree-map-C5C2iaWM.js +298 -0
  138. package/dist/client/chunks/chart-tree-map-C5C2iaWM.js.map +1 -0
  139. package/dist/client/chunks/{chart-waterfall-BCdUx4DC.js → chart-waterfall-BGdPrJ5Y.js} +80 -80
  140. package/dist/client/chunks/chart-waterfall-BGdPrJ5Y.js.map +1 -0
  141. package/dist/client/chunks/{charts-core-C5Yokk-x.js → charts-core-BXOqaYFn.js} +92 -92
  142. package/dist/client/chunks/charts-core-BXOqaYFn.js.map +1 -0
  143. package/dist/client/chunks/en-US-5xPTdCXg.js +35 -0
  144. package/dist/client/chunks/en-US-5xPTdCXg.js.map +1 -0
  145. package/dist/client/chunks/nl-NL-vCifBijs.js +1491 -0
  146. package/dist/client/chunks/nl-NL-vCifBijs.js.map +1 -0
  147. package/dist/client/chunks/{schema-visualization-t1KiOORo.js → schema-visualization-Xp60Ff2W.js} +352 -364
  148. package/dist/client/chunks/schema-visualization-Xp60Ff2W.js.map +1 -0
  149. package/dist/client/chunks/{useDebounce-CKqkM42n.js → useDebounce-CfmUMFau.js} +85 -85
  150. package/dist/client/chunks/useDebounce-CfmUMFau.js.map +1 -0
  151. package/dist/client/chunks/{useExplainAI-DBIfYwz-.js → useExplainAI-BKGmejIj.js} +4 -4
  152. package/dist/client/chunks/{useExplainAI-DBIfYwz-.js.map → useExplainAI-BKGmejIj.js.map} +1 -1
  153. package/dist/client/chunks/{utils--qCr8Yn5.js → utils-BldkcRHv.js} +2 -2
  154. package/dist/client/chunks/{utils--qCr8Yn5.js.map → utils-BldkcRHv.js.map} +1 -1
  155. package/dist/client/chunks/{vendor-BRlsCGnK.js → vendor-ClXpIiea.js} +2 -2
  156. package/dist/client/chunks/{vendor-BRlsCGnK.js.map → vendor-ClXpIiea.js.map} +1 -1
  157. package/dist/client/components/AnalysisBuilder/types.d.ts +6 -6
  158. package/dist/client/components.js +3 -3
  159. package/dist/client/hooks/useTranslation.d.ts +21 -0
  160. package/dist/client/hooks.js +3 -3
  161. package/dist/client/icons.js +1 -1
  162. package/dist/client/index.js +493 -488
  163. package/dist/client/index.js.map +1 -1
  164. package/dist/client/providers/CubeApiProvider.d.ts +2 -1
  165. package/dist/client/providers/CubeProvider.d.ts +7 -1
  166. package/dist/client/providers/I18nProvider.d.ts +18 -0
  167. package/dist/client/providers.js +1 -1
  168. package/dist/client/schema.js +1 -1
  169. package/dist/client/shared/types.d.ts +5 -20
  170. package/dist/client/styles.css +1 -1
  171. package/dist/client/utils.js +5 -5
  172. package/dist/client-bundle-stats.html +1 -1
  173. package/dist/mcp-app/mcp-app.html +40 -36
  174. package/dist/server/index.cjs +42 -40
  175. package/dist/server/index.js +3311 -1672
  176. package/package.json +5 -2
  177. package/dist/adapters/compiler-CRgLzmSn.cjs +0 -198
  178. package/dist/adapters/handler-DumFgnNM.cjs +0 -25
  179. package/dist/adapters/mcp-transport-C6bsIOSV.js +0 -545
  180. package/dist/adapters/mcp-transport-DMhuYmFp.cjs +0 -39
  181. package/dist/adapters/utils-CyBt-as9.cjs +0 -15
  182. package/dist/client/chunks/DashboardEditModal-BTdV528l.js.map +0 -1
  183. package/dist/client/chunks/FieldSearchModal-D75vy4Wb.js.map +0 -1
  184. package/dist/client/chunks/KpiDelta-Bk8bzKYM.js +0 -2
  185. package/dist/client/chunks/KpiNumber-CKF-8e_T.js +0 -2
  186. package/dist/client/chunks/KpiText-Iz1vIvu_.js +0 -2
  187. package/dist/client/chunks/RetentionCombinedChart-DIhK5pD8.js.map +0 -1
  188. package/dist/client/chunks/RetentionHeatmap-CyREolyP.js.map +0 -1
  189. package/dist/client/chunks/SchemaVisualization-B1GUT-FM.js +0 -2
  190. package/dist/client/chunks/SchemaVisualizationLazy-DymwT34e.js +0 -2
  191. package/dist/client/chunks/analysis-builder-C1CJ0c7L.js.map +0 -1
  192. package/dist/client/chunks/analysis-builder-shared-rkjJfWLT.js.map +0 -1
  193. package/dist/client/chunks/chart-activity-grid-DLktOINm.js +0 -806
  194. package/dist/client/chunks/chart-activity-grid-DLktOINm.js.map +0 -1
  195. package/dist/client/chunks/chart-area-BwYaflNk.js.map +0 -1
  196. package/dist/client/chunks/chart-bar-BiENfFgE.js.map +0 -1
  197. package/dist/client/chunks/chart-box-plot-BJF1tBXC.js.map +0 -1
  198. package/dist/client/chunks/chart-bubble-DQQhGVDJ.js.map +0 -1
  199. package/dist/client/chunks/chart-candlestick-C2UuXbLe.js +0 -306
  200. package/dist/client/chunks/chart-candlestick-C2UuXbLe.js.map +0 -1
  201. package/dist/client/chunks/chart-config-activity-grid-DJOU3TEz.js +0 -51
  202. package/dist/client/chunks/chart-config-activity-grid-DJOU3TEz.js.map +0 -1
  203. package/dist/client/chunks/chart-config-area-CWnWVT6a.js +0 -93
  204. package/dist/client/chunks/chart-config-area-CWnWVT6a.js.map +0 -1
  205. package/dist/client/chunks/chart-config-bar-C-7Dr1Ho.js +0 -87
  206. package/dist/client/chunks/chart-config-bar-C-7Dr1Ho.js.map +0 -1
  207. package/dist/client/chunks/chart-config-box-plot-mVOwmLdu.js +0 -35
  208. package/dist/client/chunks/chart-config-box-plot-mVOwmLdu.js.map +0 -1
  209. package/dist/client/chunks/chart-config-bubble-BPE2CeiD.js +0 -82
  210. package/dist/client/chunks/chart-config-bubble-BPE2CeiD.js.map +0 -1
  211. package/dist/client/chunks/chart-config-candlestick-BSB9DRy2.js +0 -72
  212. package/dist/client/chunks/chart-config-candlestick-BSB9DRy2.js.map +0 -1
  213. package/dist/client/chunks/chart-config-data-table-Bhdx5Hem.js.map +0 -1
  214. package/dist/client/chunks/chart-config-funnel-Cl-v-bm1.js +0 -93
  215. package/dist/client/chunks/chart-config-funnel-Cl-v-bm1.js.map +0 -1
  216. package/dist/client/chunks/chart-config-gauge-CdrUTJMJ.js +0 -64
  217. package/dist/client/chunks/chart-config-gauge-CdrUTJMJ.js.map +0 -1
  218. package/dist/client/chunks/chart-config-heat-map-DGE3NzoF.js +0 -91
  219. package/dist/client/chunks/chart-config-heat-map-DGE3NzoF.js.map +0 -1
  220. package/dist/client/chunks/chart-config-kpi-delta-DMrQerUW.js +0 -94
  221. package/dist/client/chunks/chart-config-kpi-delta-DMrQerUW.js.map +0 -1
  222. package/dist/client/chunks/chart-config-kpi-number-DCytCytn.js +0 -75
  223. package/dist/client/chunks/chart-config-kpi-number-DCytCytn.js.map +0 -1
  224. package/dist/client/chunks/chart-config-kpi-text-KdKQUvHo.js +0 -47
  225. package/dist/client/chunks/chart-config-kpi-text-KdKQUvHo.js.map +0 -1
  226. package/dist/client/chunks/chart-config-line-Bl9VDAdz.js +0 -104
  227. package/dist/client/chunks/chart-config-line-Bl9VDAdz.js.map +0 -1
  228. package/dist/client/chunks/chart-config-markdown-BX26b94i.js +0 -117
  229. package/dist/client/chunks/chart-config-markdown-BX26b94i.js.map +0 -1
  230. package/dist/client/chunks/chart-config-measure-profile-DwtRhEFh.js +0 -82
  231. package/dist/client/chunks/chart-config-measure-profile-DwtRhEFh.js.map +0 -1
  232. package/dist/client/chunks/chart-config-pie-BzBcqPMJ.js +0 -68
  233. package/dist/client/chunks/chart-config-pie-BzBcqPMJ.js.map +0 -1
  234. package/dist/client/chunks/chart-config-radar-6ZOgt__z.js +0 -49
  235. package/dist/client/chunks/chart-config-radar-6ZOgt__z.js.map +0 -1
  236. package/dist/client/chunks/chart-config-radial-bar-Df6Eta7N.js +0 -38
  237. package/dist/client/chunks/chart-config-radial-bar-Df6Eta7N.js.map +0 -1
  238. package/dist/client/chunks/chart-config-sankey-DgqKBFvN.js +0 -66
  239. package/dist/client/chunks/chart-config-sankey-DgqKBFvN.js.map +0 -1
  240. package/dist/client/chunks/chart-config-scatter-D5nVLDvi.js +0 -61
  241. package/dist/client/chunks/chart-config-scatter-D5nVLDvi.js.map +0 -1
  242. package/dist/client/chunks/chart-config-sunburst-Ca3FX9nW.js +0 -45
  243. package/dist/client/chunks/chart-config-sunburst-Ca3FX9nW.js.map +0 -1
  244. package/dist/client/chunks/chart-config-tree-map-Bjy4QNa3.js +0 -51
  245. package/dist/client/chunks/chart-config-tree-map-Bjy4QNa3.js.map +0 -1
  246. package/dist/client/chunks/chart-config-waterfall-C5K2eqR7.js +0 -59
  247. package/dist/client/chunks/chart-config-waterfall-C5K2eqR7.js.map +0 -1
  248. package/dist/client/chunks/chart-data-table-2iCsn0CF.js.map +0 -1
  249. package/dist/client/chunks/chart-funnel-poyOf7-e.js.map +0 -1
  250. package/dist/client/chunks/chart-gauge-D5J4gRky.js.map +0 -1
  251. package/dist/client/chunks/chart-heat-map-BAMVhLGG.js.map +0 -1
  252. package/dist/client/chunks/chart-kpi-delta-KQjUIeal.js.map +0 -1
  253. package/dist/client/chunks/chart-kpi-number-CsQgV_x3.js +0 -325
  254. package/dist/client/chunks/chart-kpi-number-CsQgV_x3.js.map +0 -1
  255. package/dist/client/chunks/chart-kpi-text-BR0IyeUU.js +0 -148
  256. package/dist/client/chunks/chart-kpi-text-BR0IyeUU.js.map +0 -1
  257. package/dist/client/chunks/chart-line-B5_WntY5.js.map +0 -1
  258. package/dist/client/chunks/chart-markdown-B6bENbel.js +0 -3473
  259. package/dist/client/chunks/chart-markdown-B6bENbel.js.map +0 -1
  260. package/dist/client/chunks/chart-measure-profile-yWk-obNb.js +0 -179
  261. package/dist/client/chunks/chart-measure-profile-yWk-obNb.js.map +0 -1
  262. package/dist/client/chunks/chart-pie-BodrUoHv.js +0 -172
  263. package/dist/client/chunks/chart-pie-BodrUoHv.js.map +0 -1
  264. package/dist/client/chunks/chart-radar-gG3zfLud.js +0 -154
  265. package/dist/client/chunks/chart-radar-gG3zfLud.js.map +0 -1
  266. package/dist/client/chunks/chart-radial-bar-C2IPCV8c.js +0 -148
  267. package/dist/client/chunks/chart-radial-bar-C2IPCV8c.js.map +0 -1
  268. package/dist/client/chunks/chart-sankey-BOyxfG1Q.js.map +0 -1
  269. package/dist/client/chunks/chart-scatter-B8OwlsAX.js +0 -255
  270. package/dist/client/chunks/chart-scatter-B8OwlsAX.js.map +0 -1
  271. package/dist/client/chunks/chart-sunburst-D9lGEOCc.js.map +0 -1
  272. package/dist/client/chunks/chart-tree-map-DZaKy9he.js +0 -298
  273. package/dist/client/chunks/chart-tree-map-DZaKy9he.js.map +0 -1
  274. package/dist/client/chunks/chart-waterfall-BCdUx4DC.js.map +0 -1
  275. package/dist/client/chunks/charts-core-C5Yokk-x.js.map +0 -1
  276. package/dist/client/chunks/schema-visualization-t1KiOORo.js.map +0 -1
  277. package/dist/client/chunks/useDebounce-CKqkM42n.js.map +0 -1
@@ -1,58 +1,66 @@
1
- import { _ as e, a as t, f as n, i as r, o as i, r as a, u as o } from "../utils-IH1ePsBd.js";
2
- import { t as s } from "../compiler-S6KHiOY6.js";
3
- import { _ as c, a as l, d as u, f as d, g as f, h as p, i as m, m as h, p as g, r as _, s as v, v as y } from "../mcp-transport-C6bsIOSV.js";
1
+ import { a as e, f as t, i as n, o as r, r as i, u as a, v as o } from "../utils-DOg9oGdt.js";
2
+ import { i as s, n as c, r as l, t as u } from "../locale-DTnJrxm1.js";
3
+ import { S as d, _ as f, a as p, b as m, c as h, g, h as _, i as v, l as y, m as b, o as x, r as S, u as C, v as w, x as T, y as E } from "../mcp-transport-C7VLf4T5.js";
4
4
  //#region src/adapters/fastify/index.ts
5
- var b = function(e, b, x) {
6
- let { cubes: S, drizzle: C, schema: w, extractSecurityContext: T, engineType: E, cors: D, basePath: O = "/cubejs-api/v1", bodyLimit: k = 10485760, cache: A, mcp: j = { enabled: !0 }, agent: M } = b;
7
- if (!S || S.length === 0) return x(/* @__PURE__ */ Error("At least one cube must be provided in the cubes array"));
8
- D && e.register(import("@fastify/cors"), D), e.addHook("onRequest", async (e, t) => {
5
+ var D = function(o, D, O) {
6
+ let { cubes: k, drizzle: A, schema: j, extractSecurityContext: M, engineType: N, cors: P, basePath: F = "/cubejs-api/v1", bodyLimit: I = 10485760, cache: L, mcp: R = { enabled: !0 }, agent: z } = D;
7
+ if (!k || k.length === 0) return O(/* @__PURE__ */ Error("At least one cube must be provided in the cubes array"));
8
+ let B = async (e) => l(await M(e), c((t) => e.headers[t.toLowerCase()]));
9
+ if (P) {
10
+ let e = {
11
+ ...P,
12
+ allowedHeaders: u(P.allowedHeaders)
13
+ };
14
+ o.register(import("@fastify/cors"), e);
15
+ }
16
+ o.addHook("onRequest", async (e, t) => {
9
17
  e.method === "POST" && (e.body = void 0);
10
18
  });
11
- let N = new s({
12
- drizzle: C,
13
- schema: w,
14
- engineType: E,
15
- cache: A,
16
- rlsSetup: b.rlsSetup
19
+ let V = new s({
20
+ drizzle: A,
21
+ schema: j,
22
+ engineType: N,
23
+ cache: L,
24
+ rlsSetup: D.rlsSetup
17
25
  });
18
- if (S.forEach((e) => {
19
- N.registerCube(e);
20
- }), e.post(`${O}/load`, {
21
- bodyLimit: k,
26
+ if (k.forEach((e) => {
27
+ V.registerCube(e);
28
+ }), o.post(`${F}/load`, {
29
+ bodyLimit: I,
22
30
  schema: { body: {
23
31
  type: "object",
24
32
  additionalProperties: !0
25
33
  } }
26
34
  }, async (e, t) => {
27
35
  try {
28
- let n = e.body, i = n.query || n, o = await T(e), s = N.validateQuery(i);
29
- if (!s.isValid) return t.status(400).send(r(`Query validation failed: ${s.errors.join(", ")}`, 400));
36
+ let r = e.body, a = r.query || r, o = await B(e), s = V.validateQuery(a);
37
+ if (!s.isValid) return t.status(400).send(n(`Query validation failed: ${s.errors.join(", ")}`, 400));
30
38
  let c = e.headers["x-cache-control"] === "no-cache";
31
- return a(i, await N.executeMultiCubeQuery(i, o, { skipCache: c }), N);
32
- } catch (n) {
33
- return e.log.error(n, "Query execution error"), t.status(500).send(r(n instanceof Error ? n.message : "Query execution failed", 500));
39
+ return i(a, await V.executeMultiCubeQuery(a, o, { skipCache: c }), V);
40
+ } catch (r) {
41
+ return e.log.error(r, "Query execution error"), t.status(500).send(n(r instanceof Error ? r.message : "Query execution failed", 500));
34
42
  }
35
- }), e.get(`${O}/load`, { schema: { querystring: {
43
+ }), o.get(`${F}/load`, { schema: { querystring: {
36
44
  type: "object",
37
45
  properties: { query: { type: "string" } },
38
46
  required: ["query"]
39
47
  } } }, async (e, t) => {
40
48
  try {
41
- let { query: n } = e.query, i;
49
+ let { query: r } = e.query, a;
42
50
  try {
43
- i = JSON.parse(n);
51
+ a = JSON.parse(r);
44
52
  } catch {
45
- return t.status(400).send(r("Invalid JSON in query parameter", 400));
53
+ return t.status(400).send(n("Invalid JSON in query parameter", 400));
46
54
  }
47
- let o = await T(e), s = N.validateQuery(i);
48
- if (!s.isValid) return t.status(400).send(r(`Query validation failed: ${s.errors.join(", ")}`, 400));
49
- let c = e.headers["x-cache-control"] === "no-cache", l = await N.executeMultiCubeQuery(i, o, { skipCache: c });
50
- return a(i, l, N);
51
- } catch (n) {
52
- return e.log.error(n, "Query execution error"), t.status(500).send(r(n instanceof Error ? n.message : "Query execution failed", 500));
55
+ let o = await B(e), s = V.validateQuery(a);
56
+ if (!s.isValid) return t.status(400).send(n(`Query validation failed: ${s.errors.join(", ")}`, 400));
57
+ let c = e.headers["x-cache-control"] === "no-cache", l = await V.executeMultiCubeQuery(a, o, { skipCache: c });
58
+ return i(a, l, V);
59
+ } catch (r) {
60
+ return e.log.error(r, "Query execution error"), t.status(500).send(n(r instanceof Error ? r.message : "Query execution failed", 500));
53
61
  }
54
- }), e.post(`${O}/batch`, {
55
- bodyLimit: k,
62
+ }), o.post(`${F}/batch`, {
63
+ bodyLimit: I,
56
64
  schema: { body: {
57
65
  type: "object",
58
66
  required: ["queries"],
@@ -63,109 +71,109 @@ var b = function(e, b, x) {
63
71
  } }
64
72
  }, async (e, t) => {
65
73
  try {
66
- let { queries: n } = e.body;
67
- return !n || !Array.isArray(n) ? t.status(400).send(r("Request body must contain a \"queries\" array", 400)) : n.length === 0 ? t.status(400).send(r("Queries array cannot be empty", 400)) : await o(n, await T(e), N, { skipCache: e.headers["x-cache-control"] === "no-cache" });
68
- } catch (n) {
69
- return e.log.error(n, "Batch execution error"), t.status(500).send(r(n instanceof Error ? n.message : "Batch execution failed", 500));
74
+ let { queries: r } = e.body;
75
+ return !r || !Array.isArray(r) ? t.status(400).send(n("Request body must contain a \"queries\" array", 400)) : r.length === 0 ? t.status(400).send(n("Queries array cannot be empty", 400)) : await a(r, await B(e), V, { skipCache: e.headers["x-cache-control"] === "no-cache" });
76
+ } catch (r) {
77
+ return e.log.error(r, "Batch execution error"), t.status(500).send(n(r instanceof Error ? r.message : "Batch execution failed", 500));
70
78
  }
71
- }), e.get(`${O}/meta`, async (e, n) => {
79
+ }), o.get(`${F}/meta`, async (t, r) => {
72
80
  try {
73
- return t(N.getMetadata());
74
- } catch (t) {
75
- return e.log.error(t, "Metadata error"), n.status(500).send(r(t instanceof Error ? t.message : "Failed to fetch metadata", 500));
81
+ return e(V.getMetadata());
82
+ } catch (e) {
83
+ return t.log.error(e, "Metadata error"), r.status(500).send(n(e instanceof Error ? e.message : "Failed to fetch metadata", 500));
76
84
  }
77
- }), e.post(`${O}/sql`, {
78
- bodyLimit: k,
85
+ }), o.post(`${F}/sql`, {
86
+ bodyLimit: I,
79
87
  schema: { body: {
80
88
  type: "object",
81
89
  additionalProperties: !0
82
90
  } }
83
91
  }, async (e, t) => {
84
92
  try {
85
- let n = e.body, a = await T(e), o = N.validateQuery(n);
86
- if (!o.isValid) return t.status(400).send(r(`Query validation failed: ${o.errors.join(", ")}`, 400));
87
- let s = n.measures?.[0] || n.dimensions?.[0];
88
- if (!s) return t.status(400).send(r("No measures or dimensions specified", 400));
93
+ let i = e.body, a = await B(e), o = V.validateQuery(i);
94
+ if (!o.isValid) return t.status(400).send(n(`Query validation failed: ${o.errors.join(", ")}`, 400));
95
+ let s = i.measures?.[0] || i.dimensions?.[0];
96
+ if (!s) return t.status(400).send(n("No measures or dimensions specified", 400));
89
97
  let c = s.split(".")[0];
90
- return i(n, await N.generateSQL(c, n, a));
91
- } catch (n) {
92
- return e.log.error({ err: String(n).replace(/\n|\r/g, "") }, "SQL generation error"), t.status(500).send(r(n instanceof Error ? n.message : "SQL generation failed", 500));
98
+ return r(i, await V.generateSQL(c, i, a));
99
+ } catch (r) {
100
+ return e.log.error({ err: String(r).replace(/\n|\r/g, "") }, "SQL generation error"), t.status(500).send(n(r instanceof Error ? r.message : "SQL generation failed", 500));
93
101
  }
94
- }), e.get(`${O}/sql`, { schema: { querystring: {
102
+ }), o.get(`${F}/sql`, { schema: { querystring: {
95
103
  type: "object",
96
104
  properties: { query: { type: "string" } },
97
105
  required: ["query"]
98
106
  } } }, async (e, t) => {
99
107
  try {
100
- let { query: n } = e.query, a = JSON.parse(n), o = await T(e), s = N.validateQuery(a);
101
- if (!s.isValid) return t.status(400).send(r(`Query validation failed: ${s.errors.join(", ")}`, 400));
108
+ let { query: i } = e.query, a = JSON.parse(i), o = await B(e), s = V.validateQuery(a);
109
+ if (!s.isValid) return t.status(400).send(n(`Query validation failed: ${s.errors.join(", ")}`, 400));
102
110
  let c = a.measures?.[0] || a.dimensions?.[0];
103
- if (!c) return t.status(400).send(r("No measures or dimensions specified", 400));
111
+ if (!c) return t.status(400).send(n("No measures or dimensions specified", 400));
104
112
  let l = c.split(".")[0];
105
- return i(a, await N.generateSQL(l, a, o));
106
- } catch (n) {
107
- return e.log.error({ err: String(n).replace(/\n|\r/g, "") }, "SQL generation error"), t.status(500).send(r(n instanceof Error ? n.message : "SQL generation failed", 500));
113
+ return r(a, await V.generateSQL(l, a, o));
114
+ } catch (r) {
115
+ return e.log.error({ err: String(r).replace(/\n|\r/g, "") }, "SQL generation error"), t.status(500).send(n(r instanceof Error ? r.message : "SQL generation failed", 500));
108
116
  }
109
- }), e.post(`${O}/dry-run`, {
110
- bodyLimit: k,
117
+ }), o.post(`${F}/dry-run`, {
118
+ bodyLimit: I,
111
119
  schema: { body: {
112
120
  type: "object",
113
121
  additionalProperties: !0
114
122
  } }
115
- }, async (e, t) => {
123
+ }, async (e, n) => {
116
124
  try {
117
- let t = e.body;
118
- return await n(t.query || t, await T(e), N);
119
- } catch (n) {
120
- return e.log.error(n, "Dry-run error"), t.status(400).send({
121
- error: n instanceof Error ? n.message : "Dry-run validation failed",
125
+ let n = e.body;
126
+ return await t(n.query || n, await B(e), V);
127
+ } catch (t) {
128
+ return e.log.error(t, "Dry-run error"), n.status(400).send({
129
+ error: t instanceof Error ? t.message : "Dry-run validation failed",
122
130
  valid: !1
123
131
  });
124
132
  }
125
- }), e.get(`${O}/dry-run`, { schema: { querystring: {
133
+ }), o.get(`${F}/dry-run`, { schema: { querystring: {
126
134
  type: "object",
127
135
  properties: { query: { type: "string" } },
128
136
  required: ["query"]
129
- } } }, async (e, t) => {
137
+ } } }, async (e, n) => {
130
138
  try {
131
- let { query: t } = e.query;
132
- return await n(JSON.parse(t), await T(e), N);
133
- } catch (n) {
134
- return e.log.error(n, "Dry-run error"), t.status(400).send({
135
- error: n instanceof Error ? n.message : "Dry-run validation failed",
139
+ let { query: n } = e.query;
140
+ return await t(JSON.parse(n), await B(e), V);
141
+ } catch (t) {
142
+ return e.log.error(t, "Dry-run error"), n.status(400).send({
143
+ error: t instanceof Error ? t.message : "Dry-run validation failed",
136
144
  valid: !1
137
145
  });
138
146
  }
139
- }), e.post(`${O}/explain`, {
140
- bodyLimit: k,
147
+ }), o.post(`${F}/explain`, {
148
+ bodyLimit: I,
141
149
  schema: { body: {
142
150
  type: "object",
143
151
  additionalProperties: !0
144
152
  } }
145
153
  }, async (e, t) => {
146
154
  try {
147
- let n = e.body, r = n.query || n, i = n.options || {}, a = await T(e), o = N.validateQuery(r);
148
- return o.isValid ? await N.explainQuery(r, a, i) : t.status(400).send({ error: `Query validation failed: ${o.errors.join(", ")}` });
155
+ let n = e.body, r = n.query || n, i = n.options || {}, a = await B(e), o = V.validateQuery(r);
156
+ return o.isValid ? await V.explainQuery(r, a, i) : t.status(400).send({ error: `Query validation failed: ${o.errors.join(", ")}` });
149
157
  } catch (n) {
150
158
  return e.log.error(n, "Explain error"), t.status(500).send({ error: n instanceof Error ? n.message : "Explain query failed" });
151
159
  }
152
- }), M && e.post(`${O}/agent/chat`, {
153
- bodyLimit: k,
160
+ }), z && o.post(`${F}/agent/chat`, {
161
+ bodyLimit: I,
154
162
  schema: { body: {
155
163
  type: "object",
156
164
  additionalProperties: !0
157
165
  } }
158
166
  }, async (e, t) => {
159
167
  try {
160
- let { handleAgentChat: n } = await import("../handler-RItnSaEl.js"), { message: r, sessionId: i, history: a } = e.body;
168
+ let { handleAgentChat: n } = await import("../handler-3LGcjLtr.js"), { message: r, sessionId: i, history: a } = e.body;
161
169
  if (!r || typeof r != "string") return t.status(400).send({ error: "message is required and must be a string" });
162
- let o = (M.apiKey || "").trim();
163
- if (M.allowClientApiKey) {
170
+ let o = (z.apiKey || "").trim();
171
+ if (z.allowClientApiKey) {
164
172
  let t = e.headers["x-agent-api-key"];
165
173
  t && (o = t.trim());
166
174
  }
167
175
  if (!o) return t.status(401).send({ error: "No API key configured. Set agent.apiKey in server config or send X-Agent-Api-Key header." });
168
- let s = M.allowClientApiKey ? e.headers["x-agent-provider"] : void 0, c = M.allowClientApiKey ? e.headers["x-agent-model"] : void 0, l = M.allowClientApiKey ? e.headers["x-agent-provider-endpoint"] : void 0, u = await T(e), d = M.buildSystemContext?.(u);
176
+ let s = z.allowClientApiKey ? e.headers["x-agent-provider"] : void 0, c = z.allowClientApiKey ? e.headers["x-agent-model"] : void 0, l = z.allowClientApiKey ? e.headers["x-agent-provider-endpoint"] : void 0, u = await B(e), d = z.buildSystemContext?.(u);
169
177
  t.raw.writeHead(200, {
170
178
  "Content-Type": "text/event-stream",
171
179
  "Cache-Control": "no-cache",
@@ -176,9 +184,9 @@ var b = function(e, b, x) {
176
184
  message: r,
177
185
  sessionId: i,
178
186
  history: a,
179
- semanticLayer: N,
187
+ semanticLayer: V,
180
188
  securityContext: u,
181
- agentConfig: M,
189
+ agentConfig: z,
182
190
  apiKey: o,
183
191
  systemContext: d,
184
192
  providerOverride: s,
@@ -198,64 +206,70 @@ var b = function(e, b, x) {
198
206
  } catch (n) {
199
207
  if (e.log.error(n, "Agent chat error"), !t.raw.headersSent) return t.status(500).send({ error: n instanceof Error ? n.message : "Agent chat failed" });
200
208
  }
201
- }), j.enabled !== !1) {
202
- let t = j.basePath ?? "/mcp";
203
- e.post(`${t}`, {
204
- bodyLimit: k,
209
+ }), R.enabled !== !1) {
210
+ let e = x(V, R.resources), t = w(R.prompts), n = R.basePath ?? "/mcp";
211
+ o.post(`${n}`, {
212
+ bodyLimit: I,
205
213
  schema: { body: {
206
214
  type: "object",
207
215
  additionalProperties: !0
208
216
  } }
209
- }, async (e, t) => {
210
- let n = c(e.headers.origin, j.allowedOrigins ? { allowedOrigins: j.allowedOrigins } : {});
211
- if (!n.valid) return t.status(403).send(m(null, -32600, n.reason));
212
- let r = e.headers.accept;
213
- if (!f(r)) return t.status(400).send(m(null, -32600, "Accept header must include both application/json and text/event-stream"));
214
- let i = d(e.headers);
215
- if (!i.ok) return t.status(426).send({
217
+ }, async (n, r) => {
218
+ if (R.resourceMetadataUrl && !C(n.headers.authorization)) return r.header("WWW-Authenticate", h(R.resourceMetadataUrl)), r.status(401).send({ error: "Bearer token required" });
219
+ let i = T(n.headers.origin, R.allowedOrigins ? { allowedOrigins: R.allowedOrigins } : {});
220
+ if (!i.valid) return r.status(403).send(v(null, -32600, i.reason));
221
+ let a = n.headers.accept;
222
+ if (!m(a)) return r.status(400).send(v(null, -32600, "Accept header must include both application/json and text/event-stream"));
223
+ let o = _(n.headers);
224
+ if (!o.ok) return r.status(426).send({
216
225
  error: "Unsupported MCP protocol version",
217
- supported: i.supported
226
+ supported: o.supported
218
227
  });
219
- let a = g(e.body);
220
- if (!a) return t.status(400).send(m(null, -32600, "Invalid JSON-RPC 2.0 request"));
221
- let o = y(r), s = a.method === "initialize";
228
+ let s = g(n.body);
229
+ if (!s) return r.status(400).send(v(null, -32600, "Invalid JSON-RPC 2.0 request"));
230
+ let c = d(a), l = s.method === "initialize";
222
231
  try {
223
- let n = await v(a.method, a.params, {
224
- semanticLayer: N,
225
- extractSecurityContext: T,
226
- rawRequest: e,
227
- rawResponse: t,
228
- negotiatedProtocol: i.negotiated,
229
- appEnabled: !!j.app
232
+ let i = await y(s.method, s.params, {
233
+ semanticLayer: V,
234
+ extractSecurityContext: (e, t) => B(e),
235
+ rawRequest: n,
236
+ rawResponse: r,
237
+ negotiatedProtocol: o.negotiated,
238
+ resources: e,
239
+ prompts: t,
240
+ appEnabled: !!R.app,
241
+ appConfig: typeof R.app == "object" ? R.app : void 0,
242
+ serverName: R.serverName
230
243
  });
231
- if (u(a)) return t.status(202).send();
232
- let r = s && n && typeof n == "object" && "sessionId" in n ? n.sessionId : void 0;
233
- r && t.header(_, r);
234
- let c = l(a.id ?? null, n);
235
- if (o) {
236
- let e = h();
237
- t.header("Content-Type", "text/event-stream").header("Cache-Control", "no-cache").header("Connection", "keep-alive").send(`id: ${e}\n\n${p(c, e)}`);
244
+ if (b(s)) return r.status(202).send();
245
+ let a = l && i && typeof i == "object" && "sessionId" in i ? i.sessionId : void 0;
246
+ a && r.header(S, a);
247
+ let u = p(s.id ?? null, i);
248
+ if (c) {
249
+ let e = f();
250
+ r.header("Content-Type", "text/event-stream").header("Cache-Control", "no-cache").header("Connection", "keep-alive").send(`id: ${e}\n\n${E(u, e)}`);
238
251
  return;
239
252
  }
240
- return t.send(c);
241
- } catch (n) {
242
- if (u(a)) return e.log.error({ err: String(n).replace(/\n|\r/g, "") }, "MCP notification processing error"), t.status(202).send();
243
- e.log.error({ err: String(n).replace(/\n|\r/g, "") }, "MCP RPC error");
244
- let r = n?.code ?? -32603, i = n?.data, s = n.message || "MCP request failed", c = m(a.id ?? null, r, s, i);
245
- if (o) {
246
- let e = h();
247
- t.header("Content-Type", "text/event-stream").header("Cache-Control", "no-cache").header("Connection", "keep-alive").send(`id: ${e}\n\n${p(c, e)}`);
253
+ return r.send(u);
254
+ } catch (e) {
255
+ if (b(s)) return n.log.error({ err: String(e).replace(/\n|\r/g, "") }, "MCP notification processing error"), r.status(202).send();
256
+ n.log.error({ err: String(e).replace(/\n|\r/g, "") }, "MCP RPC error");
257
+ let t = e?.code ?? -32603, i = e?.data, a = e.message || "MCP request failed", o = v(s.id ?? null, t, a, i);
258
+ if (c) {
259
+ let e = f();
260
+ r.header("Content-Type", "text/event-stream").header("Cache-Control", "no-cache").header("Connection", "keep-alive").send(`id: ${e}\n\n${E(o, e)}`);
248
261
  return;
249
262
  }
250
- return t.send(c);
263
+ return r.send(o);
251
264
  }
252
- }), e.get(`${t}`, async (e, t) => {
253
- let n = h();
265
+ }), o.get(`${n}`, async (e, t) => {
266
+ if (R.resourceMetadataUrl && !C(e.headers.authorization)) return t.header("WWW-Authenticate", h(R.resourceMetadataUrl)), t.status(401).send({ error: "Bearer token required" });
267
+ let n = f();
254
268
  t.raw.writeHead(200, {
255
269
  "Content-Type": "text/event-stream",
256
270
  "Cache-Control": "no-cache",
257
271
  Connection: "keep-alive"
258
- }), t.raw.write(p({
272
+ }), t.raw.write(E({
259
273
  jsonrpc: "2.0",
260
274
  method: "mcp/ready",
261
275
  params: { protocol: "streamable-http" }
@@ -266,16 +280,16 @@ var b = function(e, b, x) {
266
280
  e.raw.on("close", () => {
267
281
  clearInterval(r);
268
282
  });
269
- }), e.delete(`${t}`, async (e, t) => t.status(405).send({ error: "Session termination not supported" }));
283
+ }), o.delete(`${n}`, async (e, t) => R.resourceMetadataUrl && !C(e.headers.authorization) ? (t.header("WWW-Authenticate", h(R.resourceMetadataUrl)), t.status(401).send({ error: "Bearer token required" })) : t.status(405).send({ error: "Session termination not supported" }));
270
284
  }
271
- e.setErrorHandler(async (e, t, n) => (t.log.error(e, "Fastify cube adapter error"), n.statusCode < 400 && n.status(500), r(e instanceof Error ? e : String(e), n.statusCode))), x();
285
+ o.setErrorHandler(async (e, t, r) => (t.log.error(e, "Fastify cube adapter error"), r.statusCode < 400 && r.status(500), n(e instanceof Error ? e : String(e), r.statusCode))), O();
272
286
  };
273
- async function x(e, t) {
274
- await e.register(b, t);
287
+ async function O(e, t) {
288
+ await e.register(D, t);
275
289
  }
276
- function S(t) {
277
- let n = e("fastify")({ logger: !0 });
278
- return n.register(b, t), n;
290
+ function k(e) {
291
+ let t = o("fastify")({ logger: !0 });
292
+ return t.register(D, e), t;
279
293
  }
280
294
  //#endregion
281
- export { S as createCubeApp, b as cubePlugin, x as registerCubeRoutes };
295
+ export { k as createCubeApp, D as cubePlugin, O as registerCubeRoutes };