@shepai/cli 1.116.3-pr373.2304074 → 1.117.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/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +2 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +0 -1
- package/web/.next/build-manifest.json +6 -6
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +2 -2
- package/web/.next/required-server-files.json +2 -2
- package/web/.next/routes-manifest.json +0 -6
- package/web/.next/server/app/(dashboard)/@drawer/create/page/build-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +21 -21
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/build-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/build-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/build-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +19 -19
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/build-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +21 -21
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/build-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/build-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/build-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +19 -19
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/build-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +19 -19
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error/page/build-manifest.json +4 -4
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/build-manifest.json +4 -4
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
- package/web/.next/server/app/settings/page/build-manifest.json +4 -4
- package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
- package/web/.next/server/app/settings/page.js +1 -1
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/build-manifest.json +4 -4
- package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/skills/page.js +1 -1
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/build-manifest.json +4 -4
- package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/tools/page.js +1 -1
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/build-manifest.json +4 -4
- package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app-paths-manifest.json +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_2eacac96.js +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_2eacac96.js.map +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_46d6bf1b.js +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_46d6bf1b.js.map +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_54b1e179.js +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_54b1e179.js.map +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_6c70ecca.js +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_6c70ecca.js.map +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_c29a2302.js +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_c29a2302.js.map +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_c9978986.js +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_c9978986.js.map +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_ce6dae5d.js +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_ce6dae5d.js.map +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_d1fd387b.js +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_d1fd387b.js.map +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_d82f78f0.js +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_d82f78f0.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_d0119342._.js +3 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_d0119342._.js.map +1 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_rocket_1575cd4d.js +3 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_rocket_1575cd4d.js.map +1 -0
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_ed372306.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_ed372306.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_32e26434.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_32e26434.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__07a39ff2._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__07a39ff2._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0880ff0e._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0880ff0e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__172d9576._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__172d9576._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__23b5ca2c._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__23b5ca2c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__24dd0927._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2a5592d5._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2a5592d5._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__52485955._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5edfc56b._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5edfc56b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6367aea0._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6367aea0._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__684a868c._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__684a868c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6eb2a2b0._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6eb2a2b0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__19187772._.js → [root-of-the-server]__89e8a5cc._.js} +3 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__89e8a5cc._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8c88ef55._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8c88ef55._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a93289b0._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a93289b0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ac0304e7._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ac0304e7._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b1e68e34._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b1e68e34._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c16bf5de._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c16bf5de._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0e506641._.js +7 -0
- package/web/.next/server/chunks/ssr/_0e506641._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_125679ad._.js +3 -0
- package/web/.next/server/chunks/ssr/_125679ad._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_135edb9c._.js +3 -0
- package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_16235e5e._.js +1 -1
- package/web/.next/server/chunks/ssr/_16235e5e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1bb131c4._.js +3 -0
- package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_273d4632._.js +3 -0
- package/web/.next/server/chunks/ssr/_273d4632._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_6887cba3._.js +1 -1
- package/web/.next/server/chunks/ssr/_6887cba3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_6d26a08f._.js +3 -0
- package/web/.next/server/chunks/ssr/_6d26a08f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_8eeee4db._.js +1 -1
- package/web/.next/server/chunks/ssr/_8eeee4db._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_a0b23a7c._.js → _a8d14ab2._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_a0b23a7c._.js.map → _a8d14ab2._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_b5fc318a._.js +3 -0
- package/web/.next/server/chunks/ssr/_b5fc318a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_cc77a143._.js +3 -0
- package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_9f81a163._.js → _d6a1ec27._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_9f81a163._.js.map → _d6a1ec27._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_ed11dcd6._.js +1 -1
- package/web/.next/server/chunks/ssr/_ed11dcd6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f4d222d6._.js +1 -1
- package/web/.next/server/chunks/ssr/_f4d222d6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f5316e67._.js +3 -0
- package/web/.next/server/chunks/ssr/_f5316e67._.js.map +1 -0
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0835b28e._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_0835b28e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_e99d78dd.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_e99d78dd.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e8034a29._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_e8034a29._.js.map +1 -1
- package/web/.next/server/middleware-build-manifest.js +4 -4
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +32 -99
- package/web/.next/static/chunks/{b890d6030441cf27.js → 2251df6427162751.js} +1 -1
- package/web/.next/static/chunks/{fc0fb1f7061949ef.js → 2c98935265aa3622.js} +2 -2
- package/web/.next/static/chunks/303a1217006489b9.js +1 -0
- package/web/.next/static/chunks/{206f677ee9f6dc5d.js → 34b275db4ad6fb5d.js} +1 -1
- package/web/.next/static/chunks/3a806cf059241bc9.js +1 -0
- package/web/.next/static/chunks/{c6ad05eb3945ee43.js → 425894e5bf370bd2.js} +2 -2
- package/web/.next/static/chunks/498777301470975b.js +1 -0
- package/web/.next/static/chunks/50f06bb71bace452.js +1 -0
- package/web/.next/static/chunks/5fe03deadb83628b.js +1 -0
- package/web/.next/static/chunks/619af41a8d3232e5.js +1 -0
- package/web/.next/static/chunks/62a8173911f8f130.css +1 -0
- package/web/.next/static/chunks/84a181ff3270fd9f.js +1 -0
- package/web/.next/static/chunks/b1f3c0e8e9872ef8.js +1 -0
- package/web/.next/static/chunks/b855de1b1e5458f6.js +11 -0
- package/web/.next/static/chunks/c76f6d06b1b69b57.js +1 -0
- package/web/.next/static/chunks/e2caffa0bb759c6c.js +1 -0
- package/web/.next/static/chunks/ed3a602003bcb31b.js +1 -0
- package/web/.next/static/chunks/fcde0cbb2976b933.js +1 -0
- package/web/.next/static/chunks/{turbopack-b1685b5f87ad1d60.js → turbopack-426d9bc2450816ba.js} +1 -1
- package/dist/src/presentation/web/app/actions/execute-query.d.ts +0 -7
- package/dist/src/presentation/web/app/actions/execute-query.d.ts.map +0 -1
- package/dist/src/presentation/web/app/actions/execute-query.js +0 -55
- package/dist/src/presentation/web/app/actions/get-table-rows.d.ts +0 -10
- package/dist/src/presentation/web/app/actions/get-table-rows.d.ts.map +0 -1
- package/dist/src/presentation/web/app/actions/get-table-rows.js +0 -55
- package/dist/src/presentation/web/app/actions/get-table-schema.d.ts +0 -13
- package/dist/src/presentation/web/app/actions/get-table-schema.d.ts.map +0 -1
- package/dist/src/presentation/web/app/actions/get-table-schema.js +0 -27
- package/dist/src/presentation/web/app/actions/list-tables.d.ts +0 -10
- package/dist/src/presentation/web/app/actions/list-tables.d.ts.map +0 -1
- package/dist/src/presentation/web/app/actions/list-tables.js +0 -19
- package/dist/src/presentation/web/app/database/page.d.ts +0 -4
- package/dist/src/presentation/web/app/database/page.d.ts.map +0 -1
- package/dist/src/presentation/web/app/database/page.js +0 -15
- package/dist/src/presentation/web/components/features/database/cell-value-dialog.d.ts +0 -8
- package/dist/src/presentation/web/components/features/database/cell-value-dialog.d.ts.map +0 -1
- package/dist/src/presentation/web/components/features/database/cell-value-dialog.js +0 -7
- package/dist/src/presentation/web/components/features/database/cell-value-dialog.stories.d.ts +0 -10
- package/dist/src/presentation/web/components/features/database/cell-value-dialog.stories.d.ts.map +0 -1
- package/dist/src/presentation/web/components/features/database/cell-value-dialog.stories.js +0 -48
- package/dist/src/presentation/web/components/features/database/database-page-client.d.ts +0 -13
- package/dist/src/presentation/web/components/features/database/database-page-client.d.ts.map +0 -1
- package/dist/src/presentation/web/components/features/database/database-page-client.js +0 -75
- package/dist/src/presentation/web/components/features/database/database-page-client.stories.d.ts +0 -9
- package/dist/src/presentation/web/components/features/database/database-page-client.stories.d.ts.map +0 -1
- package/dist/src/presentation/web/components/features/database/database-page-client.stories.js +0 -74
- package/dist/src/presentation/web/components/features/database/query-runner.d.ts +0 -9
- package/dist/src/presentation/web/components/features/database/query-runner.d.ts.map +0 -1
- package/dist/src/presentation/web/components/features/database/query-runner.js +0 -53
- package/dist/src/presentation/web/components/features/database/query-runner.stories.d.ts +0 -9
- package/dist/src/presentation/web/components/features/database/query-runner.stories.d.ts.map +0 -1
- package/dist/src/presentation/web/components/features/database/query-runner.stories.js +0 -55
- package/dist/src/presentation/web/components/features/database/row-browser.d.ts +0 -11
- package/dist/src/presentation/web/components/features/database/row-browser.d.ts.map +0 -1
- package/dist/src/presentation/web/components/features/database/row-browser.js +0 -42
- package/dist/src/presentation/web/components/features/database/row-browser.stories.d.ts +0 -14
- package/dist/src/presentation/web/components/features/database/row-browser.stories.d.ts.map +0 -1
- package/dist/src/presentation/web/components/features/database/row-browser.stories.js +0 -120
- package/dist/src/presentation/web/components/features/database/schema-viewer.d.ts +0 -7
- package/dist/src/presentation/web/components/features/database/schema-viewer.d.ts.map +0 -1
- package/dist/src/presentation/web/components/features/database/schema-viewer.js +0 -13
- package/dist/src/presentation/web/components/features/database/schema-viewer.stories.d.ts +0 -11
- package/dist/src/presentation/web/components/features/database/schema-viewer.stories.d.ts.map +0 -1
- package/dist/src/presentation/web/components/features/database/schema-viewer.stories.js +0 -67
- package/dist/src/presentation/web/components/features/database/table-list.d.ts +0 -8
- package/dist/src/presentation/web/components/features/database/table-list.d.ts.map +0 -1
- package/dist/src/presentation/web/components/features/database/table-list.js +0 -17
- package/dist/src/presentation/web/components/features/database/table-list.stories.d.ts +0 -10
- package/dist/src/presentation/web/components/features/database/table-list.stories.d.ts.map +0 -1
- package/dist/src/presentation/web/components/features/database/table-list.stories.js +0 -66
- package/dist/src/presentation/web/components/ui/table.d.ts +0 -11
- package/dist/src/presentation/web/components/ui/table.d.ts.map +0 -1
- package/dist/src/presentation/web/components/ui/table.js +0 -28
- package/dist/src/presentation/web/lib/server-db.d.ts +0 -16
- package/dist/src/presentation/web/lib/server-db.d.ts.map +0 -1
- package/dist/src/presentation/web/lib/server-db.js +0 -10
- package/dist/src/presentation/web/lib/sql-validation.d.ts +0 -7
- package/dist/src/presentation/web/lib/sql-validation.d.ts.map +0 -1
- package/dist/src/presentation/web/lib/sql-validation.js +0 -17
- package/web/.next/server/app/database/page/app-paths-manifest.json +0 -3
- package/web/.next/server/app/database/page/build-manifest.json +0 -18
- package/web/.next/server/app/database/page/next-font-manifest.json +0 -6
- package/web/.next/server/app/database/page/react-loadable-manifest.json +0 -1
- package/web/.next/server/app/database/page/server-reference-manifest.json +0 -80
- package/web/.next/server/app/database/page.js +0 -16
- package/web/.next/server/app/database/page.js.map +0 -5
- package/web/.next/server/app/database/page.js.nft.json +0 -1
- package/web/.next/server/app/database/page_client-reference-manifest.js +0 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__19187772._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__29958296._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__29958296._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2d3ecc16._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2d3ecc16._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__590dfc34._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__590dfc34._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6aae816d._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6aae816d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__930c8634._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__930c8634._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0e6034fc._.js +0 -3
- package/web/.next/server/chunks/ssr/_0e6034fc._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_34ba40e0._.js +0 -3
- package/web/.next/server/chunks/ssr/_34ba40e0._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_43997634._.js +0 -3
- package/web/.next/server/chunks/ssr/_43997634._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_5b809cd2._.js +0 -4
- package/web/.next/server/chunks/ssr/_5b809cd2._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_6552e0aa._.js +0 -3
- package/web/.next/server/chunks/ssr/_6552e0aa._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_78be8103._.js +0 -3
- package/web/.next/server/chunks/ssr/_78be8103._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_95f78b9e._.js +0 -3
- package/web/.next/server/chunks/ssr/_95f78b9e._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_ad5819d0._.js +0 -3
- package/web/.next/server/chunks/ssr/_ad5819d0._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_e35fc15d._.js +0 -3
- package/web/.next/server/chunks/ssr/_e35fc15d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_e4923d09._.js +0 -7
- package/web/.next/server/chunks/ssr/_e4923d09._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_f38b49fe._.js +0 -3
- package/web/.next/server/chunks/ssr/_f38b49fe._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_f9959908._.js +0 -3
- package/web/.next/server/chunks/ssr/_f9959908._.js.map +0 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_database_database-page-client_tsx_b853607a._.js +0 -3
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_database_database-page-client_tsx_b853607a._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_8b0ea744._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_8b0ea744._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_scroll-area_tsx_53ae5be7._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_scroll-area_tsx_53ae5be7._.js.map +0 -1
- package/web/.next/static/chunks/1bee2061703e096e.js +0 -1
- package/web/.next/static/chunks/40b6bcf1a2de4a0f.js +0 -1
- package/web/.next/static/chunks/4395a53ed15eef72.js +0 -1
- package/web/.next/static/chunks/57f503ca6caf30d1.js +0 -1
- package/web/.next/static/chunks/5b305e0321c90039.js +0 -1
- package/web/.next/static/chunks/692a746daf1778d6.js +0 -1
- package/web/.next/static/chunks/78334cf5381241fe.css +0 -1
- package/web/.next/static/chunks/7d61f552216da1a2.js +0 -1
- package/web/.next/static/chunks/958828e09daddad9.js +0 -1
- package/web/.next/static/chunks/a659cdb17ae65f2e.js +0 -1
- package/web/.next/static/chunks/ac9e29ce89401022.js +0 -11
- package/web/.next/static/chunks/c20537d1fd9f2494.js +0 -1
- package/web/.next/static/chunks/c2c0d4e71c36199f.js +0 -1
- package/web/.next/static/chunks/c7e793951b20a67f.js +0 -1
- package/web/.next/static/chunks/d647189ea3b87ed4.js +0 -1
- package/web/.next/static/chunks/f8bf91061681f06c.js +0 -1
- /package/web/.next/static/{7el9fE5_x45gdlg69l1-h → bAT4Gm6M7U0lGmNAN3mTn}/_buildManifest.js +0 -0
- /package/web/.next/static/{7el9fE5_x45gdlg69l1-h → bAT4Gm6M7U0lGmNAN3mTn}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{7el9fE5_x45gdlg69l1-h → bAT4Gm6M7U0lGmNAN3mTn}/_ssgManifest.js +0 -0
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use server';
|
|
2
|
-
import { getDb } from '../../lib/server-db.js';
|
|
3
|
-
/**
|
|
4
|
-
* Regex pattern to detect write/destructive SQL statements.
|
|
5
|
-
* Strips SQL comments and checks for disallowed keywords.
|
|
6
|
-
*/
|
|
7
|
-
const WRITE_KEYWORDS_PATTERN = /^\s*(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|ATTACH|DETACH|REINDEX|VACUUM)\b/i;
|
|
8
|
-
/**
|
|
9
|
-
* Catches CTEs that lead to write operations: WITH ... INSERT/UPDATE/DELETE
|
|
10
|
-
*/
|
|
11
|
-
const CTE_WRITE_PATTERN = /^\s*WITH\b[\s\S]*?\b(INSERT|UPDATE|DELETE)\b/i;
|
|
12
|
-
function stripSqlComments(sql) {
|
|
13
|
-
return sql
|
|
14
|
-
.replace(/--[^\n]*/g, '') // single-line comments
|
|
15
|
-
.replace(/\/\*[\s\S]*?\*\//g, '') // multi-line comments
|
|
16
|
-
.trim();
|
|
17
|
-
}
|
|
18
|
-
function isWriteQuery(sql) {
|
|
19
|
-
const normalized = stripSqlComments(sql);
|
|
20
|
-
return WRITE_KEYWORDS_PATTERN.test(normalized) || CTE_WRITE_PATTERN.test(normalized);
|
|
21
|
-
}
|
|
22
|
-
function formatCellValue(value) {
|
|
23
|
-
if (Buffer.isBuffer(value)) {
|
|
24
|
-
return `(${value.length} bytes)`;
|
|
25
|
-
}
|
|
26
|
-
return value;
|
|
27
|
-
}
|
|
28
|
-
export async function executeQuery(sql) {
|
|
29
|
-
const trimmed = sql.trim();
|
|
30
|
-
if (!trimmed) {
|
|
31
|
-
return { error: 'Query cannot be empty' };
|
|
32
|
-
}
|
|
33
|
-
if (isWriteQuery(trimmed)) {
|
|
34
|
-
return {
|
|
35
|
-
error: 'Write operations are not allowed. Only SELECT and PRAGMA queries are permitted.',
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
try {
|
|
39
|
-
const db = getDb();
|
|
40
|
-
const rows = db.prepare(trimmed).all();
|
|
41
|
-
const columns = rows.length > 0 ? Object.keys(rows[0]) : [];
|
|
42
|
-
const formattedRows = rows.map((row) => {
|
|
43
|
-
const formatted = {};
|
|
44
|
-
for (const [key, value] of Object.entries(row)) {
|
|
45
|
-
formatted[key] = formatCellValue(value);
|
|
46
|
-
}
|
|
47
|
-
return formatted;
|
|
48
|
-
});
|
|
49
|
-
return { columns, rows: formattedRows };
|
|
50
|
-
}
|
|
51
|
-
catch (error) {
|
|
52
|
-
const message = error instanceof Error ? error.message : 'Query execution failed';
|
|
53
|
-
return { error: message };
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface GetTableRowsResult {
|
|
2
|
-
columns?: string[];
|
|
3
|
-
rows?: Record<string, unknown>[];
|
|
4
|
-
totalRows?: number;
|
|
5
|
-
page?: number;
|
|
6
|
-
pageSize?: number;
|
|
7
|
-
error?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function getTableRows(tableName: string, page?: number): Promise<GetTableRowsResult>;
|
|
10
|
-
//# sourceMappingURL=get-table-rows.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-table-rows.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/get-table-rows.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AASD,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,SAAI,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAsD3F"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use server';
|
|
2
|
-
import { getDb } from '../../lib/server-db.js';
|
|
3
|
-
const PAGE_SIZE = 50;
|
|
4
|
-
function formatCellValue(value) {
|
|
5
|
-
if (Buffer.isBuffer(value)) {
|
|
6
|
-
return `(${value.length} bytes)`;
|
|
7
|
-
}
|
|
8
|
-
return value;
|
|
9
|
-
}
|
|
10
|
-
export async function getTableRows(tableName, page = 0) {
|
|
11
|
-
try {
|
|
12
|
-
const db = getDb();
|
|
13
|
-
// Validate table name against sqlite_master (prevents SQL injection)
|
|
14
|
-
const tableExists = db
|
|
15
|
-
.prepare(`SELECT name FROM sqlite_master WHERE type = 'table' AND name = ?`)
|
|
16
|
-
.get(tableName);
|
|
17
|
-
if (!tableExists) {
|
|
18
|
-
return { error: `Table "${tableName}" not found` };
|
|
19
|
-
}
|
|
20
|
-
const countRow = db.prepare(`SELECT COUNT(*) as count FROM "${tableName}"`).get();
|
|
21
|
-
const totalRows = countRow.count;
|
|
22
|
-
const offset = page * PAGE_SIZE;
|
|
23
|
-
const rows = db
|
|
24
|
-
.prepare(`SELECT * FROM "${tableName}" LIMIT ? OFFSET ?`)
|
|
25
|
-
.all(PAGE_SIZE, offset);
|
|
26
|
-
// Get column names from first row or from pragma if empty
|
|
27
|
-
let columns;
|
|
28
|
-
if (rows.length > 0) {
|
|
29
|
-
columns = Object.keys(rows[0]);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
const pragmaResult = db.prepare(`PRAGMA table_info("${tableName}")`).all();
|
|
33
|
-
columns = pragmaResult.map((c) => c.name);
|
|
34
|
-
}
|
|
35
|
-
// Format BLOB values
|
|
36
|
-
const formattedRows = rows.map((row) => {
|
|
37
|
-
const formatted = {};
|
|
38
|
-
for (const [key, value] of Object.entries(row)) {
|
|
39
|
-
formatted[key] = formatCellValue(value);
|
|
40
|
-
}
|
|
41
|
-
return formatted;
|
|
42
|
-
});
|
|
43
|
-
return {
|
|
44
|
-
columns,
|
|
45
|
-
rows: formattedRows,
|
|
46
|
-
totalRows,
|
|
47
|
-
page,
|
|
48
|
-
pageSize: PAGE_SIZE,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
catch (error) {
|
|
52
|
-
const message = error instanceof Error ? error.message : 'Failed to fetch table rows';
|
|
53
|
-
return { error: message };
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface ColumnInfo {
|
|
2
|
-
name: string;
|
|
3
|
-
type: string;
|
|
4
|
-
notnull: boolean;
|
|
5
|
-
defaultValue: string | null;
|
|
6
|
-
primaryKey: boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface GetTableSchemaResult {
|
|
9
|
-
columns?: ColumnInfo[];
|
|
10
|
-
error?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function getTableSchema(tableName: string): Promise<GetTableSchemaResult>;
|
|
13
|
-
//# sourceMappingURL=get-table-schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-table-schema.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/get-table-schema.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAmCrF"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use server';
|
|
2
|
-
import { getDb } from '../../lib/server-db.js';
|
|
3
|
-
export async function getTableSchema(tableName) {
|
|
4
|
-
try {
|
|
5
|
-
const db = getDb();
|
|
6
|
-
// Validate table name against sqlite_master
|
|
7
|
-
const tableExists = db
|
|
8
|
-
.prepare(`SELECT name FROM sqlite_master WHERE type = 'table' AND name = ?`)
|
|
9
|
-
.get(tableName);
|
|
10
|
-
if (!tableExists) {
|
|
11
|
-
return { error: `Table "${tableName}" not found` };
|
|
12
|
-
}
|
|
13
|
-
const pragmaResult = db.prepare(`PRAGMA table_info("${tableName}")`).all();
|
|
14
|
-
const columns = pragmaResult.map((col) => ({
|
|
15
|
-
name: col.name,
|
|
16
|
-
type: col.type || 'TEXT',
|
|
17
|
-
notnull: col.notnull === 1,
|
|
18
|
-
defaultValue: col.dflt_value,
|
|
19
|
-
primaryKey: col.pk > 0,
|
|
20
|
-
}));
|
|
21
|
-
return { columns };
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
const message = error instanceof Error ? error.message : 'Failed to fetch table schema';
|
|
25
|
-
return { error: message };
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface TableInfo {
|
|
2
|
-
name: string;
|
|
3
|
-
rowCount: number;
|
|
4
|
-
}
|
|
5
|
-
export interface ListTablesResult {
|
|
6
|
-
tables?: TableInfo[];
|
|
7
|
-
error?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function listTables(): Promise<ListTablesResult>;
|
|
10
|
-
//# sourceMappingURL=list-tables.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-tables.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/list-tables.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAsB5D"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use server';
|
|
2
|
-
import { getDb } from '../../lib/server-db.js';
|
|
3
|
-
export async function listTables() {
|
|
4
|
-
try {
|
|
5
|
-
const db = getDb();
|
|
6
|
-
const tables = db
|
|
7
|
-
.prepare(`SELECT name FROM sqlite_master WHERE type = 'table' AND name NOT LIKE 'sqlite_%' ORDER BY name`)
|
|
8
|
-
.all();
|
|
9
|
-
const result = tables.map((t) => {
|
|
10
|
-
const row = db.prepare(`SELECT COUNT(*) as count FROM "${t.name}"`).get();
|
|
11
|
-
return { name: t.name, rowCount: row.count };
|
|
12
|
-
});
|
|
13
|
-
return { tables: result };
|
|
14
|
-
}
|
|
15
|
-
catch (error) {
|
|
16
|
-
const message = error instanceof Error ? error.message : 'Failed to list tables';
|
|
17
|
-
return { error: message };
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/database/page.tsx"],"names":[],"mappings":"AAMA,2EAA2E;AAC3E,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAEvC,wBAA8B,YAAY,qDAqBzC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { listTables } from '../actions/list-tables.js';
|
|
3
|
-
import { getTableRows } from '../actions/get-table-rows.js';
|
|
4
|
-
import { getTableSchema } from '../actions/get-table-schema.js';
|
|
5
|
-
import { executeQuery } from '../actions/execute-query.js';
|
|
6
|
-
import { DatabasePageClient } from '../../components/features/database/database-page-client.js';
|
|
7
|
-
/** Skip static pre-rendering since we need runtime database connection. */
|
|
8
|
-
export const dynamic = 'force-dynamic';
|
|
9
|
-
export default async function DatabasePage() {
|
|
10
|
-
const { tables, error } = await listTables();
|
|
11
|
-
if (error || !tables) {
|
|
12
|
-
return (_jsx("div", { className: "flex h-full flex-col p-6", children: _jsxs("p", { className: "text-destructive text-sm", children: ["Failed to load database: ", error] }) }));
|
|
13
|
-
}
|
|
14
|
-
return (_jsx("div", { className: "flex h-full flex-col px-6 pb-6", children: _jsx(DatabasePageClient, { initialTables: tables, fetchRows: getTableRows, fetchSchema: getTableSchema, runQuery: executeQuery }) }));
|
|
15
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface CellValueDialogProps {
|
|
2
|
-
open: boolean;
|
|
3
|
-
onOpenChange: (open: boolean) => void;
|
|
4
|
-
columnName: string;
|
|
5
|
-
value: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function CellValueDialog({ open, onOpenChange, columnName, value }: CellValueDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
//# sourceMappingURL=cell-value-dialog.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cell-value-dialog.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/database/cell-value-dialog.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,oBAAoB,2CAe9F"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '../../ui/dialog.js';
|
|
4
|
-
import { ScrollArea } from '../../ui/scroll-area.js';
|
|
5
|
-
export function CellValueDialog({ open, onOpenChange, columnName, value }) {
|
|
6
|
-
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { className: "max-w-2xl", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: columnName }) }), _jsx(ScrollArea, { className: "max-h-[60vh]", children: _jsx("pre", { className: "text-sm break-all whitespace-pre-wrap", "data-testid": "cell-value-content", children: value }) })] }) }));
|
|
7
|
-
}
|
package/dist/src/presentation/web/components/features/database/cell-value-dialog.stories.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { CellValueDialog } from './cell-value-dialog.js';
|
|
3
|
-
declare const meta: Meta<typeof CellValueDialog>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const ShortText: Story;
|
|
7
|
-
export declare const LongText: Story;
|
|
8
|
-
export declare const BlobValue: Story;
|
|
9
|
-
export declare const JsonValue: Story;
|
|
10
|
-
//# sourceMappingURL=cell-value-dialog.stories.d.ts.map
|
package/dist/src/presentation/web/components/features/database/cell-value-dialog.stories.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cell-value-dialog.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/database/cell-value-dialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAYtC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAMnC,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAevB,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { fn } from '@storybook/test';
|
|
2
|
-
import { CellValueDialog } from './cell-value-dialog.js';
|
|
3
|
-
const meta = {
|
|
4
|
-
title: 'Features/Database/CellValueDialog',
|
|
5
|
-
component: CellValueDialog,
|
|
6
|
-
tags: ['autodocs'],
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
|
-
args: {
|
|
11
|
-
open: true,
|
|
12
|
-
onOpenChange: fn(),
|
|
13
|
-
columnName: 'description',
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
export default meta;
|
|
17
|
-
/* ---------------------------------------------------------------------------
|
|
18
|
-
* Stories
|
|
19
|
-
* ------------------------------------------------------------------------- */
|
|
20
|
-
export const ShortText = {
|
|
21
|
-
args: {
|
|
22
|
-
value: 'A simple short text value.',
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
export const LongText = {
|
|
26
|
-
args: {
|
|
27
|
-
columnName: 'content',
|
|
28
|
-
value: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris.',
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
export const BlobValue = {
|
|
32
|
-
args: {
|
|
33
|
-
columnName: 'data',
|
|
34
|
-
value: '(2048 bytes)',
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
export const JsonValue = {
|
|
38
|
-
args: {
|
|
39
|
-
columnName: 'metadata',
|
|
40
|
-
value: JSON.stringify({
|
|
41
|
-
id: 'feat-12345',
|
|
42
|
-
name: 'database-management-ui',
|
|
43
|
-
status: 'in_progress',
|
|
44
|
-
config: { maxRetries: 3, timeout: 30000 },
|
|
45
|
-
tags: ['web', 'database', 'ui'],
|
|
46
|
-
}, null, 2),
|
|
47
|
-
},
|
|
48
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { TableInfo } from '../../../app/actions/list-tables.js';
|
|
2
|
-
import type { GetTableSchemaResult } from '../../../app/actions/get-table-schema.js';
|
|
3
|
-
import type { GetTableRowsResult } from '../../../app/actions/get-table-rows.js';
|
|
4
|
-
import type { ExecuteQueryResult } from '../../../app/actions/execute-query.js';
|
|
5
|
-
export interface DatabasePageClientProps {
|
|
6
|
-
initialTables: TableInfo[];
|
|
7
|
-
fetchRows: (tableName: string, page: number) => Promise<GetTableRowsResult>;
|
|
8
|
-
fetchSchema: (tableName: string) => Promise<GetTableSchemaResult>;
|
|
9
|
-
runQuery: (sql: string) => Promise<ExecuteQueryResult>;
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function DatabasePageClient({ initialTables, fetchRows: fetchRowsAction, fetchSchema: fetchSchemaAction, runQuery, className, }: DatabasePageClientProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
//# sourceMappingURL=database-page-client.d.ts.map
|
package/dist/src/presentation/web/components/features/database/database-page-client.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"database-page-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/database/database-page-client.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAc,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAItE,MAAM,WAAW,uBAAuB;IACtC,aAAa,EAAE,SAAS,EAAE,CAAC;IAC3B,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC5E,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAClE,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,aAAa,EACb,SAAS,EAAE,eAAe,EAC1B,WAAW,EAAE,iBAAiB,EAC9B,QAAQ,EACR,SAAS,GACV,EAAE,uBAAuB,2CAiKzB"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState, useCallback } from 'react';
|
|
4
|
-
import { Database } from 'lucide-react';
|
|
5
|
-
import { Card, CardContent } from '../../ui/card.js';
|
|
6
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from '../../ui/tabs.js';
|
|
7
|
-
import { TableList } from './table-list.js';
|
|
8
|
-
import { RowBrowser } from './row-browser.js';
|
|
9
|
-
import { SchemaViewer } from './schema-viewer.js';
|
|
10
|
-
import { QueryRunner } from './query-runner.js';
|
|
11
|
-
export function DatabasePageClient({ initialTables, fetchRows: fetchRowsAction, fetchSchema: fetchSchemaAction, runQuery, className, }) {
|
|
12
|
-
const [selectedTable, setSelectedTable] = useState(null);
|
|
13
|
-
const [activeTab, setActiveTab] = useState('data');
|
|
14
|
-
// Row browser state
|
|
15
|
-
const [columns, setColumns] = useState([]);
|
|
16
|
-
const [rows, setRows] = useState([]);
|
|
17
|
-
const [totalRows, setTotalRows] = useState(0);
|
|
18
|
-
const [page, setPage] = useState(0);
|
|
19
|
-
const [pageSize, setPageSize] = useState(50);
|
|
20
|
-
const [rowsLoading, setRowsLoading] = useState(false);
|
|
21
|
-
// Schema state
|
|
22
|
-
const [schemaColumns, setSchemaColumns] = useState([]);
|
|
23
|
-
const [schemaLoading, setSchemaLoading] = useState(false);
|
|
24
|
-
const fetchRows = useCallback(async (tableName, pageNum) => {
|
|
25
|
-
setRowsLoading(true);
|
|
26
|
-
try {
|
|
27
|
-
const result = await fetchRowsAction(tableName, pageNum);
|
|
28
|
-
if (result.error) {
|
|
29
|
-
setColumns([]);
|
|
30
|
-
setRows([]);
|
|
31
|
-
setTotalRows(0);
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
setColumns(result.columns ?? []);
|
|
35
|
-
setRows(result.rows ?? []);
|
|
36
|
-
setTotalRows(result.totalRows ?? 0);
|
|
37
|
-
setPage(result.page ?? 0);
|
|
38
|
-
setPageSize(result.pageSize ?? 50);
|
|
39
|
-
}
|
|
40
|
-
finally {
|
|
41
|
-
setRowsLoading(false);
|
|
42
|
-
}
|
|
43
|
-
}, [fetchRowsAction]);
|
|
44
|
-
const fetchSchema = useCallback(async (tableName) => {
|
|
45
|
-
setSchemaLoading(true);
|
|
46
|
-
try {
|
|
47
|
-
const result = await fetchSchemaAction(tableName);
|
|
48
|
-
if (result.error) {
|
|
49
|
-
setSchemaColumns([]);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
setSchemaColumns(result.columns ?? []);
|
|
53
|
-
}
|
|
54
|
-
finally {
|
|
55
|
-
setSchemaLoading(false);
|
|
56
|
-
}
|
|
57
|
-
}, [fetchSchemaAction]);
|
|
58
|
-
const handleSelectTable = useCallback((tableName) => {
|
|
59
|
-
setSelectedTable(tableName);
|
|
60
|
-
setPage(0);
|
|
61
|
-
setActiveTab('data');
|
|
62
|
-
fetchRows(tableName, 0);
|
|
63
|
-
fetchSchema(tableName);
|
|
64
|
-
}, [fetchRows, fetchSchema]);
|
|
65
|
-
const handlePageChange = useCallback((newPage) => {
|
|
66
|
-
if (selectedTable) {
|
|
67
|
-
setPage(newPage);
|
|
68
|
-
fetchRows(selectedTable, newPage);
|
|
69
|
-
}
|
|
70
|
-
}, [selectedTable, fetchRows]);
|
|
71
|
-
const handleExecuteQuery = useCallback(async (sql) => {
|
|
72
|
-
return runQuery(sql);
|
|
73
|
-
}, [runQuery]);
|
|
74
|
-
return (_jsxs("div", { "data-testid": "database-page-client", className: className, children: [_jsxs("div", { className: "mb-4 flex items-center gap-2", children: [_jsx(Database, { className: "text-muted-foreground h-4 w-4" }), _jsx("h1", { className: "text-sm font-bold tracking-tight", children: "Database" })] }), _jsxs("div", { className: "flex gap-4", children: [_jsx(Card, { className: "w-64 shrink-0", children: _jsx(CardContent, { className: "p-0", children: _jsx(TableList, { tables: initialTables, selectedTable: selectedTable, onSelectTable: handleSelectTable }) }) }), _jsx("div", { className: "min-w-0 flex-1", children: selectedTable ? (_jsx(Card, { children: _jsxs(CardContent, { className: "p-4", children: [_jsx("div", { className: "mb-3 font-mono text-sm font-medium", children: selectedTable }), _jsxs(Tabs, { value: activeTab, onValueChange: (v) => setActiveTab(v), "data-testid": "database-tabs", children: [_jsxs(TabsList, { className: "h-8", children: [_jsx(TabsTrigger, { value: "data", className: "text-xs", "data-testid": "tab-data", children: "Data" }), _jsx(TabsTrigger, { value: "schema", className: "text-xs", "data-testid": "tab-schema", children: "Schema" }), _jsx(TabsTrigger, { value: "query", className: "text-xs", "data-testid": "tab-query", children: "Query" })] }), _jsx(TabsContent, { value: "data", children: _jsx(RowBrowser, { columns: columns, rows: rows, totalRows: totalRows, page: page, pageSize: pageSize, onPageChange: handlePageChange, loading: rowsLoading }) }), _jsx(TabsContent, { value: "schema", children: _jsx(SchemaViewer, { columns: schemaColumns, loading: schemaLoading }) }), _jsx(TabsContent, { value: "query", children: _jsx(QueryRunner, { onExecute: handleExecuteQuery }) })] })] }) })) : (_jsx(Card, { children: _jsx(CardContent, { className: "flex items-center justify-center p-12", children: _jsx("p", { className: "text-muted-foreground text-sm", children: "Select a table from the list to browse its data" }) }) })) })] })] }));
|
|
75
|
-
}
|
package/dist/src/presentation/web/components/features/database/database-page-client.stories.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { DatabasePageClient } from './database-page-client.js';
|
|
3
|
-
declare const meta: Meta<typeof DatabasePageClient>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const EmptyDatabase: Story;
|
|
8
|
-
export declare const SingleTable: Story;
|
|
9
|
-
//# sourceMappingURL=database-page-client.stories.d.ts.map
|
package/dist/src/presentation/web/components/features/database/database-page-client.stories.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"database-page-client.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/database/database-page-client.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AA8C5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,kBAAkB,CAYzC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAUnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC"}
|
package/dist/src/presentation/web/components/features/database/database-page-client.stories.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { DatabasePageClient } from './database-page-client.js';
|
|
2
|
-
const mockFetchRows = async (_tableName, page) => ({
|
|
3
|
-
columns: ['id', 'name', 'status', 'created_at'],
|
|
4
|
-
rows: [
|
|
5
|
-
{ id: 1, name: 'auth-module', status: 'done', created_at: '2026-01-15' },
|
|
6
|
-
{ id: 2, name: 'payment-flow', status: 'in-progress', created_at: '2026-02-01' },
|
|
7
|
-
{ id: 3, name: 'dashboard', status: 'pending', created_at: '2026-02-10' },
|
|
8
|
-
],
|
|
9
|
-
totalRows: 42,
|
|
10
|
-
page,
|
|
11
|
-
pageSize: 50,
|
|
12
|
-
});
|
|
13
|
-
const mockFetchSchema = async (_tableName) => ({
|
|
14
|
-
columns: [
|
|
15
|
-
{ name: 'id', type: 'INTEGER', notnull: true, defaultValue: null, primaryKey: true },
|
|
16
|
-
{ name: 'name', type: 'TEXT', notnull: true, defaultValue: null, primaryKey: false },
|
|
17
|
-
{ name: 'status', type: 'TEXT', notnull: false, defaultValue: "'pending'", primaryKey: false },
|
|
18
|
-
{
|
|
19
|
-
name: 'created_at',
|
|
20
|
-
type: 'TEXT',
|
|
21
|
-
notnull: true,
|
|
22
|
-
defaultValue: 'CURRENT_TIMESTAMP',
|
|
23
|
-
primaryKey: false,
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
});
|
|
27
|
-
const mockRunQuery = async (sql) => {
|
|
28
|
-
if (sql.toLowerCase().includes('error')) {
|
|
29
|
-
return { error: 'near "error": syntax error' };
|
|
30
|
-
}
|
|
31
|
-
return {
|
|
32
|
-
columns: ['id', 'name'],
|
|
33
|
-
rows: [
|
|
34
|
-
{ id: 1, name: 'result-1' },
|
|
35
|
-
{ id: 2, name: 'result-2' },
|
|
36
|
-
],
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
const meta = {
|
|
40
|
-
title: 'Features/Database/DatabasePageClient',
|
|
41
|
-
component: DatabasePageClient,
|
|
42
|
-
tags: ['autodocs'],
|
|
43
|
-
parameters: {
|
|
44
|
-
layout: 'padded',
|
|
45
|
-
},
|
|
46
|
-
args: {
|
|
47
|
-
fetchRows: mockFetchRows,
|
|
48
|
-
fetchSchema: mockFetchSchema,
|
|
49
|
-
runQuery: mockRunQuery,
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
export default meta;
|
|
53
|
-
const mockTables = [
|
|
54
|
-
{ name: 'features', rowCount: 42 },
|
|
55
|
-
{ name: 'repositories', rowCount: 5 },
|
|
56
|
-
{ name: 'settings', rowCount: 12 },
|
|
57
|
-
{ name: 'migrations', rowCount: 8 },
|
|
58
|
-
{ name: 'agent_events', rowCount: 1024 },
|
|
59
|
-
];
|
|
60
|
-
export const Default = {
|
|
61
|
-
args: {
|
|
62
|
-
initialTables: mockTables,
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
export const EmptyDatabase = {
|
|
66
|
-
args: {
|
|
67
|
-
initialTables: [],
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
export const SingleTable = {
|
|
71
|
-
args: {
|
|
72
|
-
initialTables: [{ name: 'features', rowCount: 3 }],
|
|
73
|
-
},
|
|
74
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface QueryRunnerProps {
|
|
2
|
-
onExecute: (sql: string) => Promise<{
|
|
3
|
-
columns?: string[];
|
|
4
|
-
rows?: Record<string, unknown>[];
|
|
5
|
-
error?: string;
|
|
6
|
-
}>;
|
|
7
|
-
}
|
|
8
|
-
export declare function QueryRunner({ onExecute }: QueryRunnerProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
//# sourceMappingURL=query-runner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query-runner.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/database/query-runner.tsx"],"names":[],"mappings":"AAoBA,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;QAClC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;QACjC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;CACJ;AASD,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,EAAE,gBAAgB,2CAyI1D"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { Button } from '../../ui/button.js';
|
|
5
|
-
import { Label } from '../../ui/label.js';
|
|
6
|
-
import { Textarea } from '../../ui/textarea.js';
|
|
7
|
-
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '../../ui/table.js';
|
|
8
|
-
import { Play } from 'lucide-react';
|
|
9
|
-
import { isWriteQuery } from '../../../lib/sql-validation.js';
|
|
10
|
-
import { CellValueDialog } from './cell-value-dialog.js';
|
|
11
|
-
const MAX_CELL_LENGTH = 100;
|
|
12
|
-
function formatCellDisplay(value) {
|
|
13
|
-
if (value === null || value === undefined) {
|
|
14
|
-
return 'NULL';
|
|
15
|
-
}
|
|
16
|
-
return String(value);
|
|
17
|
-
}
|
|
18
|
-
export function QueryRunner({ onExecute }) {
|
|
19
|
-
const [sql, setSql] = useState('');
|
|
20
|
-
const [result, setResult] = useState(null);
|
|
21
|
-
const [clientError, setClientError] = useState(null);
|
|
22
|
-
const [loading, setLoading] = useState(false);
|
|
23
|
-
const [dialogState, setDialogState] = useState({ open: false, columnName: '', value: '' });
|
|
24
|
-
const handleExecute = async () => {
|
|
25
|
-
setClientError(null);
|
|
26
|
-
setResult(null);
|
|
27
|
-
const trimmed = sql.trim();
|
|
28
|
-
if (!trimmed) {
|
|
29
|
-
setClientError('Query cannot be empty');
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
if (isWriteQuery(trimmed)) {
|
|
33
|
-
setClientError('Write operations are not allowed. Only SELECT and PRAGMA queries are permitted.');
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
setLoading(true);
|
|
37
|
-
try {
|
|
38
|
-
const res = await onExecute(trimmed);
|
|
39
|
-
setResult(res);
|
|
40
|
-
}
|
|
41
|
-
finally {
|
|
42
|
-
setLoading(false);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
const error = clientError ?? result?.error;
|
|
46
|
-
return (_jsxs("div", { className: "flex flex-col gap-4", "data-testid": "query-runner", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { htmlFor: "sql-query", children: "SQL Query" }), _jsx(Textarea, { id: "sql-query", placeholder: "SELECT * FROM features LIMIT 10", value: sql, onChange: (e) => setSql(e.target.value), className: "font-mono text-sm", rows: 4, "data-testid": "query-runner-input" }), _jsx("div", { className: "flex justify-end", children: _jsxs(Button, { onClick: handleExecute, disabled: loading || sql.trim().length === 0, size: "sm", "data-testid": "query-runner-execute", children: [_jsx(Play, { className: "size-4" }), loading ? 'Executing...' : 'Execute'] }) })] }), error ? (_jsx("div", { className: "bg-destructive/10 text-destructive rounded-md border border-red-200 p-3 text-sm dark:border-red-800", role: "alert", "aria-live": "polite", "data-testid": "query-runner-error", children: error })) : null, result?.columns && result.rows ? (_jsxs("div", { "data-testid": "query-runner-results", children: [_jsxs("div", { className: "text-muted-foreground mb-2 text-sm", children: [result.rows.length, " row", result.rows.length !== 1 ? 's' : '', " returned"] }), _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsx(TableRow, { children: result.columns.map((col) => (_jsx(TableHead, { children: col }, col))) }) }), _jsx(TableBody, { children: result.rows.map((row, rowIdx) => (
|
|
47
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
48
|
-
_jsx(TableRow, { children: result.columns.map((col) => {
|
|
49
|
-
const display = formatCellDisplay(row[col]);
|
|
50
|
-
const truncated = display.length > MAX_CELL_LENGTH;
|
|
51
|
-
return (_jsx(TableCell, { children: truncated ? (_jsxs("button", { className: "text-primary cursor-pointer text-left underline-offset-2 hover:underline", onClick: () => setDialogState({ open: true, columnName: col, value: display }), title: "Click to view full value", children: [display.slice(0, MAX_CELL_LENGTH), "..."] })) : (_jsx("span", { className: display === 'NULL' ? 'text-muted-foreground italic' : '', children: display })) }, col));
|
|
52
|
-
}) }, rowIdx))) })] })] })) : null, _jsx(CellValueDialog, { open: dialogState.open, onOpenChange: (open) => setDialogState((s) => ({ ...s, open })), columnName: dialogState.columnName, value: dialogState.value })] }));
|
|
53
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { QueryRunner } from './query-runner.js';
|
|
3
|
-
declare const meta: Meta<typeof QueryRunner>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Interactive: Story;
|
|
8
|
-
export declare const WithError: Story;
|
|
9
|
-
//# sourceMappingURL=query-runner.stories.d.ts.map
|
package/dist/src/presentation/web/components/features/database/query-runner.stories.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query-runner.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/database/query-runner.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAUlC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAiDnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAC"}
|