@kurly-growth/growthman 0.1.13 → 0.1.15
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/CLAUDE.md +58 -0
- package/app/api/endpoints/[id]/route.ts +63 -0
- package/app/api/endpoints/bulk/route.ts +23 -0
- package/app/api/endpoints/import/route.ts +62 -0
- package/app/api/endpoints/route.ts +39 -0
- package/app/api/endpoints/sync/route.ts +89 -0
- package/app/api/mock/[...slug]/route.ts +82 -0
- package/app/globals.css +125 -0
- package/app/layout.tsx +36 -0
- package/app/page.tsx +213 -0
- package/bin/cli.js +12 -2
- package/components/api-test-dialog.tsx +222 -0
- package/components/endpoint-edit-dialog.tsx +181 -0
- package/components/endpoint-table.tsx +147 -0
- package/components/openapi-upload-dialog.tsx +213 -0
- package/components/ui/button.tsx +62 -0
- package/components/ui/checkbox.tsx +32 -0
- package/components/ui/dialog.tsx +143 -0
- package/components/ui/input.tsx +21 -0
- package/components/ui/label.tsx +24 -0
- package/components/ui/sonner.tsx +37 -0
- package/components/ui/table.tsx +116 -0
- package/components/ui/textarea.tsx +18 -0
- package/components.json +22 -0
- package/lib/openapi-parser.ts +270 -0
- package/lib/prisma.ts +9 -0
- package/lib/utils.ts +6 -0
- package/lib/validation.ts +19 -0
- package/next-env.d.ts +6 -0
- package/next.config.ts +7 -0
- package/package.json +10 -19
- package/pnpm-workspace.yaml +4 -0
- package/postcss.config.mjs +7 -0
- package/prisma/seed.ts +29 -0
- package/tsconfig.json +34 -0
- package/types/endpoint.ts +10 -0
- package/.next/BUILD_ID +0 -1
- package/.next/app-path-routes-manifest.json +0 -12
- package/.next/build/chunks/[root-of-the-server]__51225daf._.js +0 -206
- package/.next/build/chunks/[root-of-the-server]__51225daf._.js.map +0 -8
- package/.next/build/chunks/[root-of-the-server]__974941ed._.js +0 -500
- package/.next/build/chunks/[root-of-the-server]__974941ed._.js.map +0 -11
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_6920245c._.js +0 -13
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_6920245c._.js.map +0 -5
- package/.next/build/chunks/[turbopack]_runtime.js +0 -795
- package/.next/build/chunks/[turbopack]_runtime.js.map +0 -10
- package/.next/build/chunks/node_modules_fe693df6._.js +0 -6758
- package/.next/build/chunks/node_modules_fe693df6._.js.map +0 -47
- package/.next/build/package.json +0 -1
- package/.next/build/postcss.js +0 -6
- package/.next/build/postcss.js.map +0 -5
- package/.next/build-manifest.json +0 -19
- package/.next/diagnostics/build-diagnostics.json +0 -6
- package/.next/diagnostics/framework.json +0 -1
- package/.next/export-marker.json +0 -6
- package/.next/fallback-build-manifest.json +0 -12
- package/.next/images-manifest.json +0 -66
- package/.next/next-minimal-server.js.nft.json +0 -1
- package/.next/next-server.js.nft.json +0 -1
- package/.next/package.json +0 -1
- package/.next/prerender-manifest.json +0 -114
- package/.next/required-server-files.js +0 -163
- package/.next/required-server-files.json +0 -163
- package/.next/routes-manifest.json +0 -109
- package/.next/server/app/_global-error/page/app-paths-manifest.json +0 -3
- package/.next/server/app/_global-error/page/build-manifest.json +0 -16
- package/.next/server/app/_global-error/page/next-font-manifest.json +0 -6
- package/.next/server/app/_global-error/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/_global-error/page/server-reference-manifest.json +0 -4
- package/.next/server/app/_global-error/page.js +0 -11
- package/.next/server/app/_global-error/page.js.map +0 -5
- package/.next/server/app/_global-error/page.js.nft.json +0 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +0 -2
- package/.next/server/app/_global-error.html +0 -2
- package/.next/server/app/_global-error.meta +0 -15
- package/.next/server/app/_global-error.rsc +0 -13
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +0 -5
- package/.next/server/app/_global-error.segments/_full.segment.rsc +0 -13
- package/.next/server/app/_global-error.segments/_head.segment.rsc +0 -6
- package/.next/server/app/_global-error.segments/_index.segment.rsc +0 -4
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +0 -1
- package/.next/server/app/_not-found/page/app-paths-manifest.json +0 -3
- package/.next/server/app/_not-found/page/build-manifest.json +0 -16
- package/.next/server/app/_not-found/page/next-font-manifest.json +0 -11
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/_not-found/page/server-reference-manifest.json +0 -4
- package/.next/server/app/_not-found/page.js +0 -14
- package/.next/server/app/_not-found/page.js.map +0 -5
- package/.next/server/app/_not-found/page.js.nft.json +0 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +0 -2
- package/.next/server/app/_not-found.html +0 -1
- package/.next/server/app/_not-found.meta +0 -16
- package/.next/server/app/_not-found.rsc +0 -15
- package/.next/server/app/_not-found.segments/_full.segment.rsc +0 -15
- package/.next/server/app/_not-found.segments/_head.segment.rsc +0 -6
- package/.next/server/app/_not-found.segments/_index.segment.rsc +0 -6
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +0 -5
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +0 -4
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +0 -2
- package/.next/server/app/api/endpoints/[id]/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/endpoints/[id]/route/build-manifest.json +0 -11
- package/.next/server/app/api/endpoints/[id]/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/endpoints/[id]/route.js +0 -7
- package/.next/server/app/api/endpoints/[id]/route.js.map +0 -5
- package/.next/server/app/api/endpoints/[id]/route.js.nft.json +0 -1
- package/.next/server/app/api/endpoints/[id]/route_client-reference-manifest.js +0 -2
- package/.next/server/app/api/endpoints/bulk/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/endpoints/bulk/route/build-manifest.json +0 -11
- package/.next/server/app/api/endpoints/bulk/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/endpoints/bulk/route.js +0 -7
- package/.next/server/app/api/endpoints/bulk/route.js.map +0 -5
- package/.next/server/app/api/endpoints/bulk/route.js.nft.json +0 -1
- package/.next/server/app/api/endpoints/bulk/route_client-reference-manifest.js +0 -2
- package/.next/server/app/api/endpoints/import/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/endpoints/import/route/build-manifest.json +0 -11
- package/.next/server/app/api/endpoints/import/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/endpoints/import/route.js +0 -7
- package/.next/server/app/api/endpoints/import/route.js.map +0 -5
- package/.next/server/app/api/endpoints/import/route.js.nft.json +0 -1
- package/.next/server/app/api/endpoints/import/route_client-reference-manifest.js +0 -2
- package/.next/server/app/api/endpoints/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/endpoints/route/build-manifest.json +0 -11
- package/.next/server/app/api/endpoints/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/endpoints/route.js +0 -7
- package/.next/server/app/api/endpoints/route.js.map +0 -5
- package/.next/server/app/api/endpoints/route.js.nft.json +0 -1
- package/.next/server/app/api/endpoints/route_client-reference-manifest.js +0 -2
- package/.next/server/app/api/endpoints/sync/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/endpoints/sync/route/build-manifest.json +0 -11
- package/.next/server/app/api/endpoints/sync/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/endpoints/sync/route.js +0 -7
- package/.next/server/app/api/endpoints/sync/route.js.map +0 -5
- package/.next/server/app/api/endpoints/sync/route.js.nft.json +0 -1
- package/.next/server/app/api/endpoints/sync/route_client-reference-manifest.js +0 -2
- package/.next/server/app/api/mock/[...slug]/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/mock/[...slug]/route/build-manifest.json +0 -11
- package/.next/server/app/api/mock/[...slug]/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/mock/[...slug]/route.js +0 -8
- package/.next/server/app/api/mock/[...slug]/route.js.map +0 -5
- package/.next/server/app/api/mock/[...slug]/route.js.nft.json +0 -1
- package/.next/server/app/api/mock/[...slug]/route_client-reference-manifest.js +0 -2
- package/.next/server/app/favicon.ico/route/app-paths-manifest.json +0 -3
- package/.next/server/app/favicon.ico/route/build-manifest.json +0 -11
- package/.next/server/app/favicon.ico/route.js +0 -7
- package/.next/server/app/favicon.ico/route.js.map +0 -5
- package/.next/server/app/favicon.ico/route.js.nft.json +0 -1
- package/.next/server/app/favicon.ico.meta +0 -1
- package/.next/server/app/index.html +0 -1
- package/.next/server/app/index.meta +0 -14
- package/.next/server/app/index.rsc +0 -21
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +0 -9
- package/.next/server/app/index.segments/_full.segment.rsc +0 -21
- package/.next/server/app/index.segments/_head.segment.rsc +0 -6
- package/.next/server/app/index.segments/_index.segment.rsc +0 -6
- package/.next/server/app/index.segments/_tree.segment.rsc +0 -4
- package/.next/server/app/page/app-paths-manifest.json +0 -3
- package/.next/server/app/page/build-manifest.json +0 -16
- package/.next/server/app/page/next-font-manifest.json +0 -11
- package/.next/server/app/page/react-loadable-manifest.json +0 -8
- package/.next/server/app/page/server-reference-manifest.json +0 -4
- package/.next/server/app/page.js +0 -16
- package/.next/server/app/page.js.map +0 -5
- package/.next/server/app/page.js.nft.json +0 -1
- package/.next/server/app/page_client-reference-manifest.js +0 -2
- package/.next/server/app-paths-manifest.json +0 -12
- package/.next/server/chunks/1629d_next_dist_esm_build_templates_app-route_498527d5.js +0 -3
- package/.next/server/chunks/1629d_next_dist_esm_build_templates_app-route_498527d5.js.map +0 -1
- package/.next/server/chunks/[externals]__cf2ccb51._.js +0 -3
- package/.next/server/chunks/[externals]__cf2ccb51._.js.map +0 -1
- package/.next/server/chunks/[externals]_next_dist_8dbe5856._.js +0 -3
- package/.next/server/chunks/[externals]_next_dist_8dbe5856._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__3534fecc._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__3534fecc._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__461ea613._.js +0 -21
- package/.next/server/chunks/[root-of-the-server]__461ea613._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__4929acb0._.js +0 -129
- package/.next/server/chunks/[root-of-the-server]__4929acb0._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__909218aa._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__909218aa._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__a6c01a13._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__a6c01a13._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__db1127cf._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__db1127cf._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__e46f3e25._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__e46f3e25._.js.map +0 -1
- package/.next/server/chunks/[turbopack]_runtime.js +0 -795
- package/.next/server/chunks/[turbopack]_runtime.js.map +0 -10
- package/.next/server/chunks/_next-internal_server_app_api_endpoints_[id]_route_actions_b91cfc4c.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_api_endpoints_[id]_route_actions_b91cfc4c.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_endpoints_bulk_route_actions_560cc6cd.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_api_endpoints_bulk_route_actions_560cc6cd.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_endpoints_import_route_actions_f2444950.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_api_endpoints_import_route_actions_f2444950.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_endpoints_route_actions_49d8ad56.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_api_endpoints_route_actions_49d8ad56.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_endpoints_sync_route_actions_0f446550.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_api_endpoints_sync_route_actions_0f446550.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_mock_[___slug]_route_actions_be875f77.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_api_mock_[___slug]_route_actions_be875f77.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_353150a5.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_353150a5.js.map +0 -1
- package/.next/server/chunks/node_modules__pnpm_a61fb769._.js +0 -3
- package/.next/server/chunks/node_modules__pnpm_a61fb769._.js.map +0 -1
- package/.next/server/chunks/ssr/1629d_next_dist_1a21bde7._.js +0 -6
- package/.next/server/chunks/ssr/1629d_next_dist_1a21bde7._.js.map +0 -1
- package/.next/server/chunks/ssr/1629d_next_dist_8dc31fba._.js +0 -3
- package/.next/server/chunks/ssr/1629d_next_dist_8dc31fba._.js.map +0 -1
- package/.next/server/chunks/ssr/1629d_next_dist_client_components_b01b33e4._.js +0 -3
- package/.next/server/chunks/ssr/1629d_next_dist_client_components_b01b33e4._.js.map +0 -1
- package/.next/server/chunks/ssr/1629d_next_dist_client_components_builtin_forbidden_4cab2078.js +0 -3
- package/.next/server/chunks/ssr/1629d_next_dist_client_components_builtin_forbidden_4cab2078.js.map +0 -1
- package/.next/server/chunks/ssr/1629d_next_dist_client_components_builtin_global-error_0d5cb623.js +0 -3
- package/.next/server/chunks/ssr/1629d_next_dist_client_components_builtin_global-error_0d5cb623.js.map +0 -1
- package/.next/server/chunks/ssr/1629d_next_dist_client_components_builtin_unauthorized_b8fbdcad.js +0 -3
- package/.next/server/chunks/ssr/1629d_next_dist_client_components_builtin_unauthorized_b8fbdcad.js.map +0 -1
- package/.next/server/chunks/ssr/1629d_next_dist_d78dee57._.js +0 -4
- package/.next/server/chunks/ssr/1629d_next_dist_d78dee57._.js.map +0 -1
- package/.next/server/chunks/ssr/1629d_next_dist_esm_build_templates_app-page_d4e9464b.js +0 -4
- package/.next/server/chunks/ssr/1629d_next_dist_esm_build_templates_app-page_d4e9464b.js.map +0 -1
- package/.next/server/chunks/ssr/67049_lucide-react_dist_esm_createLucideIcon_22fe2e14.js +0 -3
- package/.next/server/chunks/ssr/67049_lucide-react_dist_esm_createLucideIcon_22fe2e14.js.map +0 -1
- package/.next/server/chunks/ssr/[externals]_next_dist_server_app-render_work-async-storage_external_1f8eeae7.js +0 -3
- package/.next/server/chunks/ssr/[externals]_next_dist_server_app-render_work-async-storage_external_1f8eeae7.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__14f4396a._.js +0 -10
- package/.next/server/chunks/ssr/[root-of-the-server]__14f4396a._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__3064bf15._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__3064bf15._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__4ff41ba3._.js +0 -4
- package/.next/server/chunks/ssr/[root-of-the-server]__4ff41ba3._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__57c5da8e._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__57c5da8e._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__67653b38._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__67653b38._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__7d48410d._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__7d48410d._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__a49eaf36._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__a49eaf36._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__b0617f51._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__b0617f51._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__cc026bde._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__cc026bde._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__d079898e._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__d079898e._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__d3649e47._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__d3649e47._.js.map +0 -1
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +0 -795
- package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +0 -10
- package/.next/server/chunks/ssr/_9b6e3dc4._.js +0 -3
- package/.next/server/chunks/ssr/_9b6e3dc4._.js.map +0 -1
- package/.next/server/chunks/ssr/_a437ac52._.js +0 -7
- package/.next/server/chunks/ssr/_a437ac52._.js.map +0 -1
- package/.next/server/chunks/ssr/_b62b070d._.js +0 -4
- package/.next/server/chunks/ssr/_b62b070d._.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_75761787.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_75761787.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_554ec2bf.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_554ec2bf.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_39d4fc33.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_39d4fc33.js.map +0 -1
- package/.next/server/chunks/ssr/app_b9b1292a._.js +0 -3
- package/.next/server/chunks/ssr/app_b9b1292a._.js.map +0 -1
- package/.next/server/functions-config-manifest.json +0 -4
- package/.next/server/interception-route-rewrite-manifest.js +0 -1
- package/.next/server/middleware-build-manifest.js +0 -20
- package/.next/server/middleware-manifest.json +0 -6
- package/.next/server/next-font-manifest.js +0 -1
- package/.next/server/next-font-manifest.json +0 -15
- package/.next/server/pages/404.html +0 -1
- package/.next/server/pages/500.html +0 -2
- package/.next/server/pages-manifest.json +0 -4
- package/.next/server/server-reference-manifest.js +0 -1
- package/.next/server/server-reference-manifest.json +0 -5
- package/.next/static/chunks/16403d658c649f0f.js +0 -1
- package/.next/static/chunks/2422cfacfdb28c2c.js +0 -5
- package/.next/static/chunks/42572c067be8ea0f.js +0 -1
- package/.next/static/chunks/5045da71379799ce.js +0 -1
- package/.next/static/chunks/6e04dfc4035d7150.js +0 -5
- package/.next/static/chunks/8155485116e3ff24.js +0 -1
- package/.next/static/chunks/a66e09a7c2336f67.js +0 -1
- package/.next/static/chunks/a6dad97d9634a72d.js +0 -1
- package/.next/static/chunks/a6dad97d9634a72d.js.map +0 -1
- package/.next/static/chunks/da3f3e4f37f68cee.css +0 -3
- package/.next/static/chunks/f1cfb69226717279.js +0 -1
- package/.next/static/chunks/turbopack-7027959231bb432a.js +0 -4
- package/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
- package/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
- package/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
- package/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
- package/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
- package/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
- package/.next/static/media/favicon.de6b30f1.ico +0 -0
- package/.next/static/rD3QdLXPN9C3vquucAUu6/_buildManifest.js +0 -11
- package/.next/static/rD3QdLXPN9C3vquucAUu6/_clientMiddlewareManifest.json +0 -1
- package/.next/static/rD3QdLXPN9C3vquucAUu6/_ssgManifest.js +0 -1
- package/.next/trace +0 -1
- package/.next/trace-build +0 -1
- package/.next/turbopack +0 -0
- package/.next/types/routes.d.ts +0 -78
- package/.next/types/validator.ts +0 -124
- /package/{.next/server/app/favicon.ico.body → app/favicon.ico} +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
|
|
7
|
+
function Table({ className, ...props }: React.ComponentProps<"table">) {
|
|
8
|
+
return (
|
|
9
|
+
<div
|
|
10
|
+
data-slot="table-container"
|
|
11
|
+
className="relative w-full overflow-x-auto"
|
|
12
|
+
>
|
|
13
|
+
<table
|
|
14
|
+
data-slot="table"
|
|
15
|
+
className={cn("w-full caption-bottom text-sm", className)}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
|
|
23
|
+
return (
|
|
24
|
+
<thead
|
|
25
|
+
data-slot="table-header"
|
|
26
|
+
className={cn("[&_tr]:border-b", className)}
|
|
27
|
+
{...props}
|
|
28
|
+
/>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
|
|
33
|
+
return (
|
|
34
|
+
<tbody
|
|
35
|
+
data-slot="table-body"
|
|
36
|
+
className={cn("[&_tr:last-child]:border-0", className)}
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
|
|
43
|
+
return (
|
|
44
|
+
<tfoot
|
|
45
|
+
data-slot="table-footer"
|
|
46
|
+
className={cn(
|
|
47
|
+
"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
|
|
48
|
+
className
|
|
49
|
+
)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
|
|
56
|
+
return (
|
|
57
|
+
<tr
|
|
58
|
+
data-slot="table-row"
|
|
59
|
+
className={cn(
|
|
60
|
+
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
61
|
+
className
|
|
62
|
+
)}
|
|
63
|
+
{...props}
|
|
64
|
+
/>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
|
|
69
|
+
return (
|
|
70
|
+
<th
|
|
71
|
+
data-slot="table-head"
|
|
72
|
+
className={cn(
|
|
73
|
+
"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
74
|
+
className
|
|
75
|
+
)}
|
|
76
|
+
{...props}
|
|
77
|
+
/>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
|
|
82
|
+
return (
|
|
83
|
+
<td
|
|
84
|
+
data-slot="table-cell"
|
|
85
|
+
className={cn(
|
|
86
|
+
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
87
|
+
className
|
|
88
|
+
)}
|
|
89
|
+
{...props}
|
|
90
|
+
/>
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function TableCaption({
|
|
95
|
+
className,
|
|
96
|
+
...props
|
|
97
|
+
}: React.ComponentProps<"caption">) {
|
|
98
|
+
return (
|
|
99
|
+
<caption
|
|
100
|
+
data-slot="table-caption"
|
|
101
|
+
className={cn("text-muted-foreground mt-4 text-sm", className)}
|
|
102
|
+
{...props}
|
|
103
|
+
/>
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export {
|
|
108
|
+
Table,
|
|
109
|
+
TableHeader,
|
|
110
|
+
TableBody,
|
|
111
|
+
TableFooter,
|
|
112
|
+
TableHead,
|
|
113
|
+
TableRow,
|
|
114
|
+
TableCell,
|
|
115
|
+
TableCaption,
|
|
116
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
|
6
|
+
return (
|
|
7
|
+
<textarea
|
|
8
|
+
data-slot="textarea"
|
|
9
|
+
className={cn(
|
|
10
|
+
"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
11
|
+
className
|
|
12
|
+
)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { Textarea }
|
package/components.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "new-york",
|
|
4
|
+
"rsc": true,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "",
|
|
8
|
+
"css": "app/globals.css",
|
|
9
|
+
"baseColor": "neutral",
|
|
10
|
+
"cssVariables": true,
|
|
11
|
+
"prefix": ""
|
|
12
|
+
},
|
|
13
|
+
"iconLibrary": "lucide",
|
|
14
|
+
"aliases": {
|
|
15
|
+
"components": "@/components",
|
|
16
|
+
"utils": "@/lib/utils",
|
|
17
|
+
"ui": "@/components/ui",
|
|
18
|
+
"lib": "@/lib",
|
|
19
|
+
"hooks": "@/hooks"
|
|
20
|
+
},
|
|
21
|
+
"registries": {}
|
|
22
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
interface OpenAPISpec {
|
|
2
|
+
paths?: Record<string, Record<string, OpenAPIOperation>>
|
|
3
|
+
components?: {
|
|
4
|
+
schemas?: Record<string, OpenAPISchema>
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface OpenAPIOperation {
|
|
9
|
+
summary?: string
|
|
10
|
+
description?: string
|
|
11
|
+
responses?: Record<string, OpenAPIResponse>
|
|
12
|
+
requestBody?: {
|
|
13
|
+
content?: Record<string, { schema?: OpenAPISchema; example?: unknown }>
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface OpenAPIResponse {
|
|
18
|
+
description?: string
|
|
19
|
+
content?: Record<string, { schema?: OpenAPISchema; example?: unknown }>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface OpenAPISchema {
|
|
23
|
+
type?: string
|
|
24
|
+
format?: string
|
|
25
|
+
properties?: Record<string, OpenAPISchema>
|
|
26
|
+
items?: OpenAPISchema
|
|
27
|
+
example?: unknown
|
|
28
|
+
default?: unknown
|
|
29
|
+
enum?: unknown[]
|
|
30
|
+
$ref?: string
|
|
31
|
+
allOf?: OpenAPISchema[]
|
|
32
|
+
oneOf?: OpenAPISchema[]
|
|
33
|
+
anyOf?: OpenAPISchema[]
|
|
34
|
+
nullable?: boolean
|
|
35
|
+
required?: string[]
|
|
36
|
+
additionalProperties?: boolean | OpenAPISchema
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ParsedEndpoint {
|
|
40
|
+
path: string
|
|
41
|
+
method: string
|
|
42
|
+
description: string | null
|
|
43
|
+
statusCode: number
|
|
44
|
+
responseBody: unknown
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function resolveRef(ref: string, spec: OpenAPISpec): OpenAPISchema | null {
|
|
48
|
+
// $ref format: "#/components/schemas/SchemaName"
|
|
49
|
+
const parts = ref.split('/')
|
|
50
|
+
if (parts[0] !== '#' || parts[1] !== 'components' || parts[2] !== 'schemas') {
|
|
51
|
+
return null
|
|
52
|
+
}
|
|
53
|
+
const schemaName = parts[3]
|
|
54
|
+
return spec.components?.schemas?.[schemaName] || null
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function generateMockValue(
|
|
58
|
+
schema: OpenAPISchema,
|
|
59
|
+
spec: OpenAPISpec,
|
|
60
|
+
visited: Set<string> = new Set()
|
|
61
|
+
): unknown {
|
|
62
|
+
// Handle $ref
|
|
63
|
+
if (schema.$ref) {
|
|
64
|
+
// Prevent circular references
|
|
65
|
+
if (visited.has(schema.$ref)) {
|
|
66
|
+
return {}
|
|
67
|
+
}
|
|
68
|
+
visited.add(schema.$ref)
|
|
69
|
+
const resolved = resolveRef(schema.$ref, spec)
|
|
70
|
+
if (resolved) {
|
|
71
|
+
return generateMockValue(resolved, spec, visited)
|
|
72
|
+
}
|
|
73
|
+
return {}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Handle allOf (merge schemas)
|
|
77
|
+
if (schema.allOf && schema.allOf.length > 0) {
|
|
78
|
+
const merged: Record<string, unknown> = {}
|
|
79
|
+
for (const subSchema of schema.allOf) {
|
|
80
|
+
const value = generateMockValue(subSchema, spec, visited)
|
|
81
|
+
if (typeof value === 'object' && value !== null) {
|
|
82
|
+
Object.assign(merged, value)
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return merged
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Handle oneOf/anyOf (use first option)
|
|
89
|
+
if (schema.oneOf && schema.oneOf.length > 0) {
|
|
90
|
+
return generateMockValue(schema.oneOf[0], spec, visited)
|
|
91
|
+
}
|
|
92
|
+
if (schema.anyOf && schema.anyOf.length > 0) {
|
|
93
|
+
return generateMockValue(schema.anyOf[0], spec, visited)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Use example or default if available
|
|
97
|
+
if (schema.example !== undefined) return schema.example
|
|
98
|
+
if (schema.default !== undefined) return schema.default
|
|
99
|
+
if (schema.enum && schema.enum.length > 0) return schema.enum[0]
|
|
100
|
+
|
|
101
|
+
// Generate based on type and format
|
|
102
|
+
switch (schema.type) {
|
|
103
|
+
case 'string':
|
|
104
|
+
return generateStringValue(schema.format)
|
|
105
|
+
case 'number':
|
|
106
|
+
return generateNumberValue(schema.format)
|
|
107
|
+
case 'integer':
|
|
108
|
+
return generateIntegerValue(schema.format)
|
|
109
|
+
case 'boolean':
|
|
110
|
+
return true
|
|
111
|
+
case 'array':
|
|
112
|
+
if (schema.items) {
|
|
113
|
+
return [generateMockValue(schema.items, spec, visited)]
|
|
114
|
+
}
|
|
115
|
+
return []
|
|
116
|
+
case 'object':
|
|
117
|
+
return generateObjectValue(schema, spec, visited)
|
|
118
|
+
default:
|
|
119
|
+
// If no type but has properties, treat as object
|
|
120
|
+
if (schema.properties) {
|
|
121
|
+
return generateObjectValue(schema, spec, visited)
|
|
122
|
+
}
|
|
123
|
+
return null
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function generateStringValue(format?: string): string {
|
|
128
|
+
switch (format) {
|
|
129
|
+
case 'date':
|
|
130
|
+
return '2024-01-15'
|
|
131
|
+
case 'date-time':
|
|
132
|
+
return '2024-01-15T09:30:00Z'
|
|
133
|
+
case 'time':
|
|
134
|
+
return '09:30:00'
|
|
135
|
+
case 'email':
|
|
136
|
+
return 'user@example.com'
|
|
137
|
+
case 'uri':
|
|
138
|
+
case 'url':
|
|
139
|
+
return 'https://example.com'
|
|
140
|
+
case 'uuid':
|
|
141
|
+
return '550e8400-e29b-41d4-a716-446655440000'
|
|
142
|
+
case 'hostname':
|
|
143
|
+
return 'example.com'
|
|
144
|
+
case 'ipv4':
|
|
145
|
+
return '192.168.1.1'
|
|
146
|
+
case 'ipv6':
|
|
147
|
+
return '2001:0db8:85a3:0000:0000:8a2e:0370:7334'
|
|
148
|
+
case 'byte':
|
|
149
|
+
return 'SGVsbG8gV29ybGQ='
|
|
150
|
+
case 'binary':
|
|
151
|
+
return '<binary>'
|
|
152
|
+
case 'password':
|
|
153
|
+
return '********'
|
|
154
|
+
case 'phone':
|
|
155
|
+
return '+1-555-555-5555'
|
|
156
|
+
default:
|
|
157
|
+
return 'string'
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function generateNumberValue(format?: string): number {
|
|
162
|
+
switch (format) {
|
|
163
|
+
case 'float':
|
|
164
|
+
return 1.5
|
|
165
|
+
case 'double':
|
|
166
|
+
return 1.23456789
|
|
167
|
+
default:
|
|
168
|
+
return 0
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function generateIntegerValue(format?: string): number {
|
|
173
|
+
switch (format) {
|
|
174
|
+
case 'int32':
|
|
175
|
+
return 123
|
|
176
|
+
case 'int64':
|
|
177
|
+
return 1234567890
|
|
178
|
+
default:
|
|
179
|
+
return 0
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function generateObjectValue(
|
|
184
|
+
schema: OpenAPISchema,
|
|
185
|
+
spec: OpenAPISpec,
|
|
186
|
+
visited: Set<string>
|
|
187
|
+
): Record<string, unknown> {
|
|
188
|
+
const obj: Record<string, unknown> = {}
|
|
189
|
+
|
|
190
|
+
if (schema.properties) {
|
|
191
|
+
for (const [key, propSchema] of Object.entries(schema.properties)) {
|
|
192
|
+
obj[key] = generateMockValue(propSchema, spec, visited)
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return obj
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export function parseOpenAPISpec(spec: OpenAPISpec): ParsedEndpoint[] {
|
|
200
|
+
const endpoints: ParsedEndpoint[] = []
|
|
201
|
+
|
|
202
|
+
if (!spec.paths) return endpoints
|
|
203
|
+
|
|
204
|
+
for (const [path, methods] of Object.entries(spec.paths)) {
|
|
205
|
+
for (const [method, operation] of Object.entries(methods)) {
|
|
206
|
+
// Skip non-HTTP method properties like 'parameters'
|
|
207
|
+
if (
|
|
208
|
+
!['get', 'post', 'put', 'patch', 'delete', 'head', 'options'].includes(
|
|
209
|
+
method.toLowerCase()
|
|
210
|
+
)
|
|
211
|
+
) {
|
|
212
|
+
continue
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const description = operation.summary || operation.description || null
|
|
216
|
+
|
|
217
|
+
// Find successful response (2xx)
|
|
218
|
+
let statusCode = 200
|
|
219
|
+
let responseBody: unknown = {}
|
|
220
|
+
|
|
221
|
+
if (operation.responses) {
|
|
222
|
+
// Sort response codes to prefer 200, then other 2xx
|
|
223
|
+
const responseCodes = Object.keys(operation.responses).sort((a, b) => {
|
|
224
|
+
if (a === '200') return -1
|
|
225
|
+
if (b === '200') return 1
|
|
226
|
+
return parseInt(a, 10) - parseInt(b, 10)
|
|
227
|
+
})
|
|
228
|
+
|
|
229
|
+
for (const code of responseCodes) {
|
|
230
|
+
const codeNum = parseInt(code, 10)
|
|
231
|
+
if (codeNum >= 200 && codeNum < 300) {
|
|
232
|
+
statusCode = codeNum
|
|
233
|
+
const response = operation.responses[code]
|
|
234
|
+
|
|
235
|
+
if (response.content) {
|
|
236
|
+
// Try application/json first, then any JSON-like content type
|
|
237
|
+
const jsonContent =
|
|
238
|
+
response.content['application/json'] ||
|
|
239
|
+
response.content['application/hal+json'] ||
|
|
240
|
+
response.content['application/vnd.api+json'] ||
|
|
241
|
+
Object.values(response.content).find((c) => c.schema)
|
|
242
|
+
|
|
243
|
+
if (jsonContent) {
|
|
244
|
+
if (jsonContent.example) {
|
|
245
|
+
responseBody = jsonContent.example
|
|
246
|
+
} else if (jsonContent.schema) {
|
|
247
|
+
responseBody = generateMockValue(jsonContent.schema, spec)
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
break
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// Convert OpenAPI path params {id} to Express-style :id
|
|
257
|
+
const normalizedPath = path.replace(/\{(\w+)\}/g, ':$1')
|
|
258
|
+
|
|
259
|
+
endpoints.push({
|
|
260
|
+
path: normalizedPath,
|
|
261
|
+
method: method.toUpperCase(),
|
|
262
|
+
description,
|
|
263
|
+
statusCode,
|
|
264
|
+
responseBody,
|
|
265
|
+
})
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
return endpoints
|
|
270
|
+
}
|
package/lib/prisma.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PrismaClient } from '@/generated/prisma'
|
|
2
|
+
|
|
3
|
+
const globalForPrisma = globalThis as unknown as {
|
|
4
|
+
prisma: PrismaClient | undefined
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const prisma = globalForPrisma.prisma ?? new PrismaClient()
|
|
8
|
+
|
|
9
|
+
if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma
|
package/lib/utils.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const VALID_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']
|
|
2
|
+
|
|
3
|
+
export function validatePath(path: unknown): path is string {
|
|
4
|
+
if (!path || typeof path !== 'string') return false
|
|
5
|
+
if (!path.startsWith('/')) return false
|
|
6
|
+
if (path.length > 1000) return false
|
|
7
|
+
return true
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function validateMethod(method: unknown): method is string {
|
|
11
|
+
if (typeof method !== 'string') return false
|
|
12
|
+
return VALID_METHODS.includes(method.toUpperCase())
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function validateStatusCode(statusCode: unknown): statusCode is number {
|
|
16
|
+
if (statusCode === undefined || statusCode === null) return true // optional
|
|
17
|
+
if (typeof statusCode !== 'number') return false
|
|
18
|
+
return statusCode >= 100 && statusCode < 600
|
|
19
|
+
}
|
package/next-env.d.ts
ADDED
package/next.config.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kurly-growth/growthman",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "Local mock API server with UI dashboard",
|
|
5
5
|
"bin": {
|
|
6
6
|
"growthman": "./bin/cli.js"
|
|
@@ -8,16 +8,7 @@
|
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
|
-
"files": [
|
|
12
|
-
"bin",
|
|
13
|
-
".next",
|
|
14
|
-
"!.next/cache",
|
|
15
|
-
"!.next/dev",
|
|
16
|
-
"prisma/schema.prisma",
|
|
17
|
-
"public"
|
|
18
|
-
],
|
|
19
11
|
"scripts": {
|
|
20
|
-
"prepack": "next build",
|
|
21
12
|
"postinstall": "prisma generate",
|
|
22
13
|
"dev": "next dev -p ${PORT:-3100}",
|
|
23
14
|
"dev:clean": "npx prisma db seed && next dev -p ${PORT:-3100}",
|
|
@@ -40,6 +31,10 @@
|
|
|
40
31
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
41
32
|
"@radix-ui/react-label": "^2.1.8",
|
|
42
33
|
"@radix-ui/react-slot": "^1.2.4",
|
|
34
|
+
"@tailwindcss/postcss": "^4",
|
|
35
|
+
"@types/node": "^20",
|
|
36
|
+
"@types/react": "^19",
|
|
37
|
+
"@types/react-dom": "^19",
|
|
43
38
|
"class-variance-authority": "^0.7.1",
|
|
44
39
|
"clsx": "^2.1.1",
|
|
45
40
|
"lucide-react": "^0.562.0",
|
|
@@ -50,18 +45,14 @@
|
|
|
50
45
|
"react": "19.2.3",
|
|
51
46
|
"react-dom": "19.2.3",
|
|
52
47
|
"sonner": "^2.0.7",
|
|
53
|
-
"tailwind-merge": "^3.4.0"
|
|
48
|
+
"tailwind-merge": "^3.4.0",
|
|
49
|
+
"tailwindcss": "^4",
|
|
50
|
+
"tw-animate-css": "^1.4.0",
|
|
51
|
+
"typescript": "^5"
|
|
54
52
|
},
|
|
55
53
|
"devDependencies": {
|
|
56
|
-
"@tailwindcss/postcss": "^4",
|
|
57
|
-
"@types/node": "^20",
|
|
58
|
-
"@types/react": "^19",
|
|
59
|
-
"@types/react-dom": "^19",
|
|
60
54
|
"eslint": "^9",
|
|
61
55
|
"eslint-config-next": "16.1.1",
|
|
62
|
-
"
|
|
63
|
-
"tsx": "^4.21.0",
|
|
64
|
-
"tw-animate-css": "^1.4.0",
|
|
65
|
-
"typescript": "^5"
|
|
56
|
+
"tsx": "^4.21.0"
|
|
66
57
|
}
|
|
67
58
|
}
|
package/prisma/seed.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PrismaClient } from '../generated/prisma'
|
|
2
|
+
|
|
3
|
+
const prisma = new PrismaClient()
|
|
4
|
+
|
|
5
|
+
async function main() {
|
|
6
|
+
// 기존 데이터 삭제
|
|
7
|
+
await prisma.mockEndpoint.deleteMany()
|
|
8
|
+
console.log('Cleared all mock endpoints')
|
|
9
|
+
|
|
10
|
+
// 샘플 데이터 추가 (선택사항)
|
|
11
|
+
// await prisma.mockEndpoint.create({
|
|
12
|
+
// data: {
|
|
13
|
+
// path: '/v1/health',
|
|
14
|
+
// method: 'GET',
|
|
15
|
+
// description: 'Health check',
|
|
16
|
+
// statusCode: 200,
|
|
17
|
+
// responseBody: { status: 'ok' },
|
|
18
|
+
// },
|
|
19
|
+
// })
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
main()
|
|
23
|
+
.catch((e) => {
|
|
24
|
+
console.error(e)
|
|
25
|
+
process.exit(1)
|
|
26
|
+
})
|
|
27
|
+
.finally(async () => {
|
|
28
|
+
await prisma.$disconnect()
|
|
29
|
+
})
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2017",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "react-jsx",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [
|
|
17
|
+
{
|
|
18
|
+
"name": "next"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"paths": {
|
|
22
|
+
"@/*": ["./*"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"include": [
|
|
26
|
+
"next-env.d.ts",
|
|
27
|
+
"**/*.ts",
|
|
28
|
+
"**/*.tsx",
|
|
29
|
+
".next/types/**/*.ts",
|
|
30
|
+
".next/dev/types/**/*.ts",
|
|
31
|
+
"**/*.mts"
|
|
32
|
+
],
|
|
33
|
+
"exclude": ["node_modules"]
|
|
34
|
+
}
|
package/.next/BUILD_ID
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
rD3QdLXPN9C3vquucAUu6
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"/_global-error/page": "/_global-error",
|
|
3
|
-
"/_not-found/page": "/_not-found",
|
|
4
|
-
"/api/endpoints/[id]/route": "/api/endpoints/[id]",
|
|
5
|
-
"/api/endpoints/bulk/route": "/api/endpoints/bulk",
|
|
6
|
-
"/api/endpoints/import/route": "/api/endpoints/import",
|
|
7
|
-
"/api/endpoints/route": "/api/endpoints",
|
|
8
|
-
"/api/endpoints/sync/route": "/api/endpoints/sync",
|
|
9
|
-
"/api/mock/[...slug]/route": "/api/mock/[...slug]",
|
|
10
|
-
"/favicon.ico/route": "/favicon.ico",
|
|
11
|
-
"/page": "/"
|
|
12
|
-
}
|