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