pkgviz 0.7.6 → 0.8.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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +2 -1
- package/.next/build-manifest.json +15 -24
- package/.next/fallback-build-manifest.json +15 -0
- package/.next/images-manifest.json +14 -3
- package/.next/next-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +52 -16
- package/.next/required-server-files.js +349 -0
- package/.next/required-server-files.json +106 -75
- package/.next/routes-manifest.json +16 -6
- package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_global-error/page/build-manifest.json +20 -0
- package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_global-error/page.js +9 -0
- package/.next/server/app/_global-error/page.js.map +5 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +22 -0
- package/.next/server/app/_global-error.rsc +15 -0
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +20 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +15 -0
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_not-found/page/build-manifest.json +20 -0
- package/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_not-found/page.js +13 -2
- package/.next/server/app/_not-found/page.js.map +5 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.meta +19 -0
- package/.next/server/app/_not-found.rsc +18 -19
- package/.next/server/app/_not-found.segments/_full.segment.rsc +18 -0
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +24 -0
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/favicon.ico/route/app-paths-manifest.json +3 -0
- package/.next/server/app/favicon.ico/route/build-manifest.json +12 -0
- package/.next/server/app/favicon.ico/route.js +6 -1
- package/.next/server/app/favicon.ico/route.js.map +5 -0
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/page/app-paths-manifest.json +3 -0
- package/.next/server/app/page/build-manifest.json +20 -0
- package/.next/server/app/page/next-font-manifest.json +11 -0
- package/.next/server/app/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/page/server-reference-manifest.json +93 -0
- package/.next/server/app/page.js +16 -13
- package/.next/server/app/page.js.map +5 -0
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +3 -1
- package/.next/server/app-paths-manifest.json +2 -1
- package/.next/server/chunks/[externals]__0l8ei7u._.js +3 -0
- package/.next/server/chunks/[externals]__0l8ei7u._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1to-yfd._.js +160 -0
- package/.next/server/chunks/[root-of-the-server]__1to-yfd._.js.map +1 -0
- package/.next/server/chunks/[turbopack]_runtime.js +807 -0
- package/.next/server/chunks/[turbopack]_runtime.js.map +10 -0
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_0g2jjls.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_0g2jjls.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0agsrep._.js +28 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0agsrep._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0f_e7c8._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0f_e7c8._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0yqn68e._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0yqn68e._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__112mz-6._.js +14 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__112mz-6._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__11_76b7._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__11_76b7._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__12ovu0c._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__12ovu0c._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__16pmw__._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__16pmw__._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1f2jx51._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1f2jx51._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1rn09vt._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1rn09vt._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__20e4gkp._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__20e4gkp._.js.map +1 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +807 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +10 -0
- package/.next/server/chunks/ssr/_1acy_2s._.js +158 -0
- package/.next/server/chunks/ssr/_1acy_2s._.js.map +1 -0
- package/.next/server/chunks/ssr/_1rh2tf9._.js +367 -0
- package/.next/server/chunks/ssr/_1rh2tf9._.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yr.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yr.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_01xbj_9._.js +33 -0
- package/.next/server/chunks/ssr/node_modules_01xbj_9._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1c5ky4f._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1c5ky4f._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1n3w9lb._.js +6 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1n3w9lb._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j3._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j3._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js.map +1 -0
- package/.next/server/chunks/ssr/src_app_loading_tsx_01g_-m0._.js +3 -0
- package/.next/server/chunks/ssr/src_app_loading_tsx_01g_-m0._.js.map +1 -0
- package/.next/server/middleware-build-manifest.js +24 -1
- package/.next/server/middleware-manifest.json +2 -2
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +15 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages-manifest.json +2 -4
- package/.next/server/prefetch-hints.json +25 -0
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +94 -1
- package/.next/static/chunks/19mx3mg6lkumu.js +1 -0
- package/.next/static/chunks/1las_6j17xa9p.js +1 -0
- package/.next/static/chunks/1xk6snnh6e5_j.css +3 -0
- package/.next/static/chunks/2-rtuqsgzmno4.js +22 -0
- package/.next/static/chunks/27t_qfc-3_lzs.js +1 -0
- package/.next/static/chunks/2sswp23h6zh08.js +345 -0
- package/.next/static/chunks/310vm2bl3xxpt.js +31 -0
- package/.next/static/chunks/3fntmmi971322.js +1 -0
- package/.next/static/chunks/turbopack-1b6uko1cu_h42.js +1 -0
- package/.next/static/media/4fa387ec64143e14-s.2tuy5pz7dlieh.woff2 +0 -0
- package/.next/static/media/53b9e256198e5412-s.390ncx5urfkfu.woff2 +0 -0
- package/.next/static/media/5ce348bf30bf5439-s.31988l_ccedte.woff2 +0 -0
- package/.next/static/media/6306c77e7c8268e4-s.2dbetqa9o8jxf.woff2 +0 -0
- package/.next/static/media/7178b3e590c64307-s.21jp631_3pja2.woff2 +0 -0
- package/.next/static/media/797e433ab948586e-s.p.0r6juujl39pe6.woff2 +0 -0
- package/.next/static/media/7d817b4c03b0c5f1-s.1uyisp29ctx0d.woff2 +0 -0
- package/.next/static/media/8a480f0b521d4e75-s.1qq4vpdcun5oj.woff2 +0 -0
- package/.next/static/media/bbc41e54d2fcbd21-s.1rgnod-3esatf.woff2 +0 -0
- package/.next/static/media/caa3a2e1cccd8315-s.p.0wgildi0cnwt9.woff2 +0 -0
- package/.next/static/media/favicon.2246eezznj2ab.ico +0 -0
- package/.next/static/media/fef07dbb0973bf53-s.3p2_lha1f2xer.woff2 +0 -0
- package/.next/static/rjdzHqzPw2GCNhDbjcu0-/_buildManifest.js +11 -0
- package/.next/static/rjdzHqzPw2GCNhDbjcu0-/_clientMiddlewareManifest.js +1 -0
- package/README.md +176 -4
- package/bin/pkgviz.ts +57 -29
- package/package.json +57 -36
- package/src/app/actions/audit.actions.ts +7 -49
- package/src/app/globals.css +0 -2
- package/src/app/layout.tsx +3 -2
- package/src/app/loading.tsx +8 -0
- package/src/app/page.tsx +16 -2
- package/src/app/utils/buildGraph.ts +99 -100
- package/src/app/utils/getParsedFileStructure.ts +128 -54
- package/src/app/utils/inspectParserLanguageAsync.ts +39 -0
- package/src/app/utils/markCyclicPackages.ts +45 -185
- package/src/app/utils/parser/cpp/parseCppFile.ts +68 -86
- package/src/app/utils/parser/delphi/parseFile.ts +36 -120
- package/src/app/utils/parser/java/findEntryPoint.ts +2 -1
- package/src/app/utils/parser/java/parseJavaFile.ts +33 -45
- package/src/app/utils/parser/kotlin/parseFile.ts +34 -87
- package/src/app/utils/parser/python/parseFile.ts +30 -100
- package/src/app/utils/parser/typescript/parseFile.ts +17 -52
- package/src/app/utils/selectParserLanguage.ts +39 -0
- package/src/cli/formatAuditRuleFailures.ts +21 -0
- package/src/cli/runAuditAsync.ts +41 -0
- package/src/components/Breadcrumb.tsx +5 -4
- package/src/components/ExportPanel.tsx +53 -0
- package/src/components/Header.tsx +1 -0
- package/src/components/Loader.tsx +8 -2
- package/src/components/ProjectLoadError.tsx +15 -0
- package/src/components/SettingsPanel.tsx +184 -0
- package/src/components/Switch.tsx +9 -17
- package/src/components/ThemeToggle.tsx +2 -1
- package/src/components/ToggleSwitch.tsx +36 -0
- package/src/components/sidebar/Sidebar.tsx +14 -0
- package/src/components/sidebar/SidebarBadge.tsx +25 -0
- package/src/components/sidebar/SidebarRow.tsx +14 -0
- package/src/components/sidebar/SidebarSection.tsx +16 -0
- package/src/components/sidebar/SidebarTabs.tsx +58 -0
- package/src/contexts/SettingsContext.tsx +19 -20
- package/src/features/audit/adapters/inbound/react/AuditRuleList.tsx +76 -0
- package/src/features/audit/adapters/inbound/react/AuditRulePanel.tsx +30 -0
- package/src/features/audit/adapters/inbound/react/CycleInspector.tsx +116 -0
- package/src/features/audit/adapters/inbound/react/CyclicDependenciesRuleDetails.tsx +124 -0
- package/src/features/audit/adapters/inbound/react/useCycleSelection.ts +47 -0
- package/src/features/audit/application/use-cases/createAuditFromSnapshot.ts +28 -0
- package/src/features/audit/application/use-cases/resolveSelectedCycleIds.ts +18 -0
- package/src/features/audit/composition/createAuditAsync.ts +11 -0
- package/src/features/audit/domain/evaluateAuditRules.ts +42 -0
- package/src/features/audit/domain/hasBlockingAuditRuleFailure.ts +6 -0
- package/src/features/audit/domain/resolveAuditConfiguration.ts +27 -0
- package/src/features/audit/utils/cycleVisualization.ts +86 -0
- package/src/features/dependency-analysis/adapters/outbound/dependency-graph/analyzeDependencyImportsAsync.ts +172 -0
- package/src/features/dependency-analysis/adapters/outbound/dependency-graph/analyzeTypeScriptImportsAsync.ts +6 -0
- package/src/features/graph-view/adapters/inbound/react/DependencyGraphView.tsx +184 -0
- package/src/features/graph-view/adapters/inbound/react/GraphZoomControls.tsx +48 -0
- package/src/features/graph-view/adapters/inbound/react/applyGraphInteractionPresentation.ts +35 -0
- package/src/features/graph-view/adapters/inbound/react/createGraphViewModel.ts +240 -0
- package/src/features/graph-view/adapters/inbound/react/createGraphViewStyles.ts +37 -0
- package/src/features/graph-view/adapters/inbound/react/useGraphFocus.ts +104 -0
- package/src/features/graph-view/adapters/inbound/react/useGraphInteractions.ts +50 -0
- package/src/features/graph-view/adapters/inbound/react/useGraphProjection.ts +71 -0
- package/src/features/graph-view/adapters/inbound/react/useGraphViewport.ts +48 -0
- package/src/features/graph-view/domain/getDependencyHighlightClasses.ts +39 -0
- package/src/features/graph-view/domain/reduceGraphInteraction.ts +23 -0
- package/src/features/graph-view/utils/createCompoundOpacityIndex.ts +38 -0
- package/src/features/graph-view/utils/projectVisibleGraph.ts +94 -0
- package/src/features/graph-view/utils/readNodeDefinitionId.ts +7 -0
- package/src/features/graph-view/utils/removeEmptyStructuralNodes.ts +27 -0
- package/src/features/project-analysis/adapters/outbound/filesystem/readProjectSnapshotAsync.ts +12 -0
- package/src/features/project-analysis/application/use-cases/createProjectSnapshotReader.ts +29 -0
- package/src/features/project-analysis/composition/loadProjectOverviewAsync.ts +14 -0
- package/src/features/project-analysis/composition/loadProjectSnapshotAsync.ts +12 -0
- package/src/features/project-tree/adapters/inbound/react/ProjectTreePanel.tsx +52 -0
- package/src/features/project-tree/adapters/inbound/react/useProjectTreeExpansion.ts +46 -0
- package/src/features/project-tree/application/use-cases/buildProjectTree.ts +61 -0
- package/src/features/project-tree/application/use-cases/resolveProjectTreeNavigation.ts +13 -0
- package/src/features/project-tree/utils/findProjectTreeNode.ts +14 -0
- package/src/features/project-tree/utils/findProjectTreeNodeByGraphPackage.ts +21 -0
- package/src/features/project-tree/utils/getProjectTreeAncestorIds.ts +26 -0
- package/src/features/settings/utils/readSettingsEnvironment.ts +53 -0
- package/src/i18n/en.ts +21 -2
- package/src/i18n/i18n.ts +2 -3
- package/src/layouts/breadthfirst/style.ts +1 -0
- package/src/layouts/circle/style.ts +1 -0
- package/src/layouts/concentric/style.ts +1 -0
- package/src/layouts/elk/layout.ts +1 -3
- package/src/layouts/elk/style.ts +1 -0
- package/src/layouts/getWeightBuckets.ts +3 -1
- package/src/layouts/grid/style.ts +1 -0
- package/src/layouts/index.ts +0 -4
- package/src/layouts/style.ts +172 -25
- package/src/screens/home/Home.tsx +73 -25
- package/src/screens/home/HomeGraph.tsx +43 -0
- package/src/screens/home/HomeSidebar.tsx +129 -0
- package/src/shared/types/index.ts +0 -9
- package/src/shared/utils/getProjectName.ts +4 -1
- package/src/shared/utils/parseProjectPath.ts +1 -0
- package/src/shared/utils/toPosix.ts +1 -1
- package/src/types/audit.ts +76 -0
- package/src/types/auditVisualization.ts +22 -0
- package/src/types/graphInteraction.ts +9 -0
- package/src/types/parserSelection.ts +11 -0
- package/src/types/projectAnalysis.ts +20 -0
- package/src/types/projectAnalysisActionResult.ts +2 -0
- package/src/types/projectTree.ts +7 -0
- package/src/utils/filter/filterByPackagePrefix.ts +25 -7
- package/src/utils/filter/filterEmptyPackages.ts +28 -29
- package/src/utils/filter/filterSubPackagesFromDepth.ts +20 -17
- package/src/utils/filter/filterVendorPackages.ts +1 -1
- package/src/utils/filter/isIntrinsicGraphNode.ts +8 -0
- package/src/utils/filter/toggleCompoundNodes.ts +41 -31
- package/src/utils/runProjectAnalysisActionAsync.ts +14 -0
- package/tsconfig.json +11 -3
- package/.next/app-build-manifest.json +0 -29
- package/.next/cache/.previewinfo +0 -1
- package/.next/cache/.rscinfo +0 -1
- package/.next/cache/.tsbuildinfo +0 -1
- package/.next/cache/chrome-devtools-workspace-uuid +0 -1
- package/.next/cache/eslint/.cache_6t30dc +0 -1
- package/.next/cache/webpack/client-production/0.pack +0 -4
- package/.next/cache/webpack/client-production/1.pack +0 -0
- package/.next/cache/webpack/client-production/10.pack +0 -0
- package/.next/cache/webpack/client-production/11.pack +0 -0
- package/.next/cache/webpack/client-production/12.pack +0 -0
- package/.next/cache/webpack/client-production/13.pack +0 -0
- package/.next/cache/webpack/client-production/14.pack +0 -0
- package/.next/cache/webpack/client-production/15.pack +0 -0
- package/.next/cache/webpack/client-production/16.pack +0 -0
- package/.next/cache/webpack/client-production/2.pack +0 -0
- package/.next/cache/webpack/client-production/3.pack +0 -0
- package/.next/cache/webpack/client-production/4.pack +0 -0
- package/.next/cache/webpack/client-production/5.pack +0 -0
- package/.next/cache/webpack/client-production/6.pack +0 -0
- package/.next/cache/webpack/client-production/7.pack +0 -0
- package/.next/cache/webpack/client-production/8.pack +0 -0
- package/.next/cache/webpack/client-production/9.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/1.pack +0 -0
- package/.next/cache/webpack/server-production/10.pack +0 -4
- package/.next/cache/webpack/server-production/11.pack +0 -0
- package/.next/cache/webpack/server-production/12.pack +0 -0
- package/.next/cache/webpack/server-production/13.pack +0 -0
- package/.next/cache/webpack/server-production/14.pack +0 -0
- package/.next/cache/webpack/server-production/15.pack +0 -0
- package/.next/cache/webpack/server-production/16.pack +0 -0
- package/.next/cache/webpack/server-production/17.pack +0 -0
- package/.next/cache/webpack/server-production/18.pack +0 -4
- package/.next/cache/webpack/server-production/2.pack +0 -0
- package/.next/cache/webpack/server-production/3.pack +0 -0
- package/.next/cache/webpack/server-production/4.pack +0 -0
- package/.next/cache/webpack/server-production/5.pack +0 -0
- package/.next/cache/webpack/server-production/6.pack +0 -0
- package/.next/cache/webpack/server-production/7.pack +0 -0
- package/.next/cache/webpack/server-production/8.pack +0 -0
- package/.next/cache/webpack/server-production/9.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/.next/diagnostics/build-diagnostics.json +0 -6
- package/.next/diagnostics/framework.json +0 -1
- package/.next/server/app/index.html +0 -1
- package/.next/server/app/index.meta +0 -7
- package/.next/server/app/index.rsc +0 -20
- package/.next/server/chunks/548.js +0 -6
- package/.next/server/chunks/610.js +0 -7
- package/.next/server/chunks/985.js +0 -22
- package/.next/server/middleware-react-loadable-manifest.js +0 -1
- package/.next/server/pages/_app.js +0 -1
- package/.next/server/pages/_app.js.nft.json +0 -1
- package/.next/server/pages/_document.js +0 -1
- package/.next/server/pages/_document.js.nft.json +0 -1
- package/.next/server/pages/_error.js +0 -19
- package/.next/server/pages/_error.js.nft.json +0 -1
- package/.next/server/webpack-runtime.js +0 -1
- package/.next/static/5HapMtlwNHlJNa0mJQNsK/_buildManifest.js +0 -1
- package/.next/static/chunks/4bd1b696-cf72ae8a39fa05aa.js +0 -1
- package/.next/static/chunks/680-55ad17895c8fb70b.js +0 -1
- package/.next/static/chunks/90542734-29e255269788f1bd.js +0 -1
- package/.next/static/chunks/91dbc596-b9cdccd3f5cba95d.js +0 -1
- package/.next/static/chunks/964-b440f7af22c41ca5.js +0 -1
- package/.next/static/chunks/app/_not-found/page-11e4fea8e290f304.js +0 -1
- package/.next/static/chunks/app/layout-8aae7fba5ed8afb3.js +0 -1
- package/.next/static/chunks/app/page-91450b1230da8bca.js +0 -1
- package/.next/static/chunks/framework-bc35dade6ff9684e.js +0 -1
- package/.next/static/chunks/main-9e86d333c1e02dd1.js +0 -1
- package/.next/static/chunks/main-app-69a9ff75ff3465ca.js +0 -1
- package/.next/static/chunks/pages/_app-0a0020ddd67f79cf.js +0 -1
- package/.next/static/chunks/pages/_error-03529f2c21436739.js +0 -1
- package/.next/static/chunks/webpack-7adfafc806738767.js +0 -1
- package/.next/static/css/ec31779168107a11.css +0 -3
- package/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
- package/.next/static/media/747892c23ea88013-s.woff2 +0 -0
- package/.next/static/media/8d697b304b401681-s.woff2 +0 -0
- package/.next/static/media/93f479601ee12b01-s.p.woff2 +0 -0
- package/.next/static/media/9610d9e46709d722-s.woff2 +0 -0
- package/.next/static/media/ba015fad6dcf6784-s.woff2 +0 -0
- package/.next/trace +0 -2
- package/.next/types/app/layout.ts +0 -84
- package/.next/types/app/page.ts +0 -84
- package/.next/types/cache-life.d.ts +0 -141
- package/.next/types/package.json +0 -1
- package/src/app/actions/graph.actions.ts +0 -25
- package/src/app/utils/parser/cpp/extractCppPackageFromImport.ts +0 -18
- package/src/app/utils/parser/delphi/extractPackageFromImport.ts +0 -21
- package/src/app/utils/parser/java/extractJavaPackageFromImport.ts +0 -39
- package/src/app/utils/parser/java/getIntrinsicPackagesRecursive.ts +0 -33
- package/src/app/utils/parser/kotlin/extractPackageFromImport.ts +0 -19
- package/src/app/utils/parser/python/extractPythonPackageFromImport.ts +0 -18
- package/src/app/utils/parser/typescript/extractTypeScriptPackageFromImport.ts +0 -18
- package/src/components/Cytoscape.tsx +0 -23
- package/src/components/Setting.tsx +0 -17
- package/src/components/Settings.tsx +0 -189
- package/src/components/ZoomInput.tsx +0 -94
- package/src/components/useCytoscape.ts +0 -343
- package/src/layouts/getLayoutStyle.ts +0 -19
- package/src/shared/utils/detectLanguage.ts +0 -255
- package/src/shared/utils/getJsonAsync.ts +0 -13
- package/src/shared/utils/parseEnv.ts +0 -91
- package/src/store/useLocalStorage.ts +0 -29
- package/src/utils/hasChildren.ts +0 -7
- /package/.next/{react-loadable-manifest.json → server/app/_global-error/page/react-loadable-manifest.json} +0 -0
- /package/.next/static/chunks/{polyfills-42372ed130431b0a.js → 0cz1d0mv5g_q7.js} +0 -0
- /package/.next/static/{5HapMtlwNHlJNa0mJQNsK → rjdzHqzPw2GCNhDbjcu0-}/_ssgManifest.js +0 -0
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
// File: /Users/a_rtiphishl_e/git/pkgviz/src/app/layout.tsx
|
|
2
|
-
import * as entry from '../../../src/app/layout.js'
|
|
3
|
-
import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
|
|
4
|
-
|
|
5
|
-
type TEntry = typeof import('../../../src/app/layout.js')
|
|
6
|
-
|
|
7
|
-
type SegmentParams<T extends Object = any> = T extends Record<string, any>
|
|
8
|
-
? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
|
|
9
|
-
: T
|
|
10
|
-
|
|
11
|
-
// Check that the entry is a valid entry
|
|
12
|
-
checkFields<Diff<{
|
|
13
|
-
default: Function
|
|
14
|
-
config?: {}
|
|
15
|
-
generateStaticParams?: Function
|
|
16
|
-
revalidate?: RevalidateRange<TEntry> | false
|
|
17
|
-
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
|
18
|
-
dynamicParams?: boolean
|
|
19
|
-
fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
|
|
20
|
-
preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
|
|
21
|
-
runtime?: 'nodejs' | 'experimental-edge' | 'edge'
|
|
22
|
-
maxDuration?: number
|
|
23
|
-
|
|
24
|
-
metadata?: any
|
|
25
|
-
generateMetadata?: Function
|
|
26
|
-
viewport?: any
|
|
27
|
-
generateViewport?: Function
|
|
28
|
-
experimental_ppr?: boolean
|
|
29
|
-
|
|
30
|
-
}, TEntry, ''>>()
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// Check the prop type of the entry function
|
|
34
|
-
checkFields<Diff<LayoutProps, FirstArg<TEntry['default']>, 'default'>>()
|
|
35
|
-
|
|
36
|
-
// Check the arguments and return type of the generateMetadata function
|
|
37
|
-
if ('generateMetadata' in entry) {
|
|
38
|
-
checkFields<Diff<LayoutProps, FirstArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
|
|
39
|
-
checkFields<Diff<ResolvingMetadata, SecondArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Check the arguments and return type of the generateViewport function
|
|
43
|
-
if ('generateViewport' in entry) {
|
|
44
|
-
checkFields<Diff<LayoutProps, FirstArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
|
|
45
|
-
checkFields<Diff<ResolvingViewport, SecondArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Check the arguments and return type of the generateStaticParams function
|
|
49
|
-
if ('generateStaticParams' in entry) {
|
|
50
|
-
checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
|
|
51
|
-
checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface PageProps {
|
|
55
|
-
params?: Promise<SegmentParams>
|
|
56
|
-
searchParams?: Promise<any>
|
|
57
|
-
}
|
|
58
|
-
export interface LayoutProps {
|
|
59
|
-
children?: React.ReactNode
|
|
60
|
-
|
|
61
|
-
params?: Promise<SegmentParams>
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// =============
|
|
65
|
-
// Utility types
|
|
66
|
-
type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
|
|
67
|
-
|
|
68
|
-
// If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
|
|
69
|
-
type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
|
|
70
|
-
type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
|
|
71
|
-
|
|
72
|
-
type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
|
|
73
|
-
type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
|
|
74
|
-
type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
function checkFields<_ extends { [k in keyof any]: never }>() {}
|
|
79
|
-
|
|
80
|
-
// https://github.com/sindresorhus/type-fest
|
|
81
|
-
type Numeric = number | bigint
|
|
82
|
-
type Zero = 0 | 0n
|
|
83
|
-
type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
|
|
84
|
-
type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
|
package/.next/types/app/page.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
// File: /Users/a_rtiphishl_e/git/pkgviz/src/app/page.tsx
|
|
2
|
-
import * as entry from '../../../src/app/page.js'
|
|
3
|
-
import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
|
|
4
|
-
|
|
5
|
-
type TEntry = typeof import('../../../src/app/page.js')
|
|
6
|
-
|
|
7
|
-
type SegmentParams<T extends Object = any> = T extends Record<string, any>
|
|
8
|
-
? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
|
|
9
|
-
: T
|
|
10
|
-
|
|
11
|
-
// Check that the entry is a valid entry
|
|
12
|
-
checkFields<Diff<{
|
|
13
|
-
default: Function
|
|
14
|
-
config?: {}
|
|
15
|
-
generateStaticParams?: Function
|
|
16
|
-
revalidate?: RevalidateRange<TEntry> | false
|
|
17
|
-
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
|
18
|
-
dynamicParams?: boolean
|
|
19
|
-
fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
|
|
20
|
-
preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
|
|
21
|
-
runtime?: 'nodejs' | 'experimental-edge' | 'edge'
|
|
22
|
-
maxDuration?: number
|
|
23
|
-
|
|
24
|
-
metadata?: any
|
|
25
|
-
generateMetadata?: Function
|
|
26
|
-
viewport?: any
|
|
27
|
-
generateViewport?: Function
|
|
28
|
-
experimental_ppr?: boolean
|
|
29
|
-
|
|
30
|
-
}, TEntry, ''>>()
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// Check the prop type of the entry function
|
|
34
|
-
checkFields<Diff<PageProps, FirstArg<TEntry['default']>, 'default'>>()
|
|
35
|
-
|
|
36
|
-
// Check the arguments and return type of the generateMetadata function
|
|
37
|
-
if ('generateMetadata' in entry) {
|
|
38
|
-
checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
|
|
39
|
-
checkFields<Diff<ResolvingMetadata, SecondArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Check the arguments and return type of the generateViewport function
|
|
43
|
-
if ('generateViewport' in entry) {
|
|
44
|
-
checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
|
|
45
|
-
checkFields<Diff<ResolvingViewport, SecondArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Check the arguments and return type of the generateStaticParams function
|
|
49
|
-
if ('generateStaticParams' in entry) {
|
|
50
|
-
checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
|
|
51
|
-
checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface PageProps {
|
|
55
|
-
params?: Promise<SegmentParams>
|
|
56
|
-
searchParams?: Promise<any>
|
|
57
|
-
}
|
|
58
|
-
export interface LayoutProps {
|
|
59
|
-
children?: React.ReactNode
|
|
60
|
-
|
|
61
|
-
params?: Promise<SegmentParams>
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// =============
|
|
65
|
-
// Utility types
|
|
66
|
-
type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
|
|
67
|
-
|
|
68
|
-
// If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
|
|
69
|
-
type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
|
|
70
|
-
type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
|
|
71
|
-
|
|
72
|
-
type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
|
|
73
|
-
type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
|
|
74
|
-
type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
function checkFields<_ extends { [k in keyof any]: never }>() {}
|
|
79
|
-
|
|
80
|
-
// https://github.com/sindresorhus/type-fest
|
|
81
|
-
type Numeric = number | bigint
|
|
82
|
-
type Zero = 0 | 0n
|
|
83
|
-
type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
|
|
84
|
-
type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
// Type definitions for Next.js cacheLife configs
|
|
2
|
-
|
|
3
|
-
declare module 'next/cache' {
|
|
4
|
-
export { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache'
|
|
5
|
-
export {
|
|
6
|
-
revalidateTag,
|
|
7
|
-
revalidatePath,
|
|
8
|
-
unstable_expireTag,
|
|
9
|
-
unstable_expirePath,
|
|
10
|
-
} from 'next/dist/server/web/spec-extension/revalidate'
|
|
11
|
-
export { unstable_noStore } from 'next/dist/server/web/spec-extension/unstable-no-store'
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Cache this `"use cache"` for a timespan defined by the `"default"` profile.
|
|
16
|
-
* ```
|
|
17
|
-
* stale: 300 seconds (5 minutes)
|
|
18
|
-
* revalidate: 900 seconds (15 minutes)
|
|
19
|
-
* expire: never
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* This cache may be stale on clients for 5 minutes before checking with the server.
|
|
23
|
-
* If the server receives a new request after 15 minutes, start revalidating new values in the background.
|
|
24
|
-
* It lives for the maximum age of the server cache. If this entry has no traffic for a while, it may serve an old value the next request.
|
|
25
|
-
*/
|
|
26
|
-
export function unstable_cacheLife(profile: "default"): void
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Cache this `"use cache"` for a timespan defined by the `"seconds"` profile.
|
|
30
|
-
* ```
|
|
31
|
-
* stale: 0 seconds
|
|
32
|
-
* revalidate: 1 seconds
|
|
33
|
-
* expire: 60 seconds (1 minute)
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* This cache may be stale on clients for 0 seconds before checking with the server.
|
|
37
|
-
* If the server receives a new request after 1 seconds, start revalidating new values in the background.
|
|
38
|
-
* If this entry has no traffic for 1 minute it will expire. The next request will recompute it.
|
|
39
|
-
*/
|
|
40
|
-
export function unstable_cacheLife(profile: "seconds"): void
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Cache this `"use cache"` for a timespan defined by the `"minutes"` profile.
|
|
44
|
-
* ```
|
|
45
|
-
* stale: 300 seconds (5 minutes)
|
|
46
|
-
* revalidate: 60 seconds (1 minute)
|
|
47
|
-
* expire: 3600 seconds (1 hour)
|
|
48
|
-
* ```
|
|
49
|
-
*
|
|
50
|
-
* This cache may be stale on clients for 5 minutes before checking with the server.
|
|
51
|
-
* If the server receives a new request after 1 minute, start revalidating new values in the background.
|
|
52
|
-
* If this entry has no traffic for 1 hour it will expire. The next request will recompute it.
|
|
53
|
-
*/
|
|
54
|
-
export function unstable_cacheLife(profile: "minutes"): void
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Cache this `"use cache"` for a timespan defined by the `"hours"` profile.
|
|
58
|
-
* ```
|
|
59
|
-
* stale: 300 seconds (5 minutes)
|
|
60
|
-
* revalidate: 3600 seconds (1 hour)
|
|
61
|
-
* expire: 86400 seconds (1 day)
|
|
62
|
-
* ```
|
|
63
|
-
*
|
|
64
|
-
* This cache may be stale on clients for 5 minutes before checking with the server.
|
|
65
|
-
* If the server receives a new request after 1 hour, start revalidating new values in the background.
|
|
66
|
-
* If this entry has no traffic for 1 day it will expire. The next request will recompute it.
|
|
67
|
-
*/
|
|
68
|
-
export function unstable_cacheLife(profile: "hours"): void
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Cache this `"use cache"` for a timespan defined by the `"days"` profile.
|
|
72
|
-
* ```
|
|
73
|
-
* stale: 300 seconds (5 minutes)
|
|
74
|
-
* revalidate: 86400 seconds (1 day)
|
|
75
|
-
* expire: 604800 seconds (1 week)
|
|
76
|
-
* ```
|
|
77
|
-
*
|
|
78
|
-
* This cache may be stale on clients for 5 minutes before checking with the server.
|
|
79
|
-
* If the server receives a new request after 1 day, start revalidating new values in the background.
|
|
80
|
-
* If this entry has no traffic for 1 week it will expire. The next request will recompute it.
|
|
81
|
-
*/
|
|
82
|
-
export function unstable_cacheLife(profile: "days"): void
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Cache this `"use cache"` for a timespan defined by the `"weeks"` profile.
|
|
86
|
-
* ```
|
|
87
|
-
* stale: 300 seconds (5 minutes)
|
|
88
|
-
* revalidate: 604800 seconds (1 week)
|
|
89
|
-
* expire: 2592000 seconds (30 days)
|
|
90
|
-
* ```
|
|
91
|
-
*
|
|
92
|
-
* This cache may be stale on clients for 5 minutes before checking with the server.
|
|
93
|
-
* If the server receives a new request after 1 week, start revalidating new values in the background.
|
|
94
|
-
* If this entry has no traffic for 30 days it will expire. The next request will recompute it.
|
|
95
|
-
*/
|
|
96
|
-
export function unstable_cacheLife(profile: "weeks"): void
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Cache this `"use cache"` for a timespan defined by the `"max"` profile.
|
|
100
|
-
* ```
|
|
101
|
-
* stale: 300 seconds (5 minutes)
|
|
102
|
-
* revalidate: 2592000 seconds (30 days)
|
|
103
|
-
* expire: never
|
|
104
|
-
* ```
|
|
105
|
-
*
|
|
106
|
-
* This cache may be stale on clients for 5 minutes before checking with the server.
|
|
107
|
-
* If the server receives a new request after 30 days, start revalidating new values in the background.
|
|
108
|
-
* It lives for the maximum age of the server cache. If this entry has no traffic for a while, it may serve an old value the next request.
|
|
109
|
-
*/
|
|
110
|
-
export function unstable_cacheLife(profile: "max"): void
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Cache this `"use cache"` using a custom timespan.
|
|
114
|
-
* ```
|
|
115
|
-
* stale: ... // seconds
|
|
116
|
-
* revalidate: ... // seconds
|
|
117
|
-
* expire: ... // seconds
|
|
118
|
-
* ```
|
|
119
|
-
*
|
|
120
|
-
* This is similar to Cache-Control: max-age=`stale`,s-max-age=`revalidate`,stale-while-revalidate=`expire-revalidate`
|
|
121
|
-
*
|
|
122
|
-
* If a value is left out, the lowest of other cacheLife() calls or the default, is used instead.
|
|
123
|
-
*/
|
|
124
|
-
export function unstable_cacheLife(profile: {
|
|
125
|
-
/**
|
|
126
|
-
* This cache may be stale on clients for ... seconds before checking with the server.
|
|
127
|
-
*/
|
|
128
|
-
stale?: number,
|
|
129
|
-
/**
|
|
130
|
-
* If the server receives a new request after ... seconds, start revalidating new values in the background.
|
|
131
|
-
*/
|
|
132
|
-
revalidate?: number,
|
|
133
|
-
/**
|
|
134
|
-
* If this entry has no traffic for ... seconds it will expire. The next request will recompute it.
|
|
135
|
-
*/
|
|
136
|
-
expire?: number
|
|
137
|
-
}): void
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
export { cacheTag as unstable_cacheTag } from 'next/dist/server/use-cache/cache-tag'
|
|
141
|
-
}
|
package/.next/types/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type": "module"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use server';
|
|
2
|
-
import type { ElementsDefinition } from 'cytoscape';
|
|
3
|
-
|
|
4
|
-
import { markCyclicPackagesWithEvidence } from '@/app/utils/markCyclicPackages';
|
|
5
|
-
import { getParsedFileStructure } from '@/app/utils/getParsedFileStructure';
|
|
6
|
-
import { buildGraph } from '@/app/utils/buildGraph';
|
|
7
|
-
import { relative } from 'node:path';
|
|
8
|
-
import { detectLanguage } from '@/shared/utils/detectLanguage';
|
|
9
|
-
import { resolveRoot } from '@/app/utils/getParsedFileStructure';
|
|
10
|
-
import { parseProjectPath } from '@/shared/utils/parseProjectPath';
|
|
11
|
-
|
|
12
|
-
export async function getGraphAction(): Promise<ElementsDefinition> {
|
|
13
|
-
const files = await getParsedFileStructure();
|
|
14
|
-
const graph = markCyclicPackagesWithEvidence(buildGraph(files), files);
|
|
15
|
-
|
|
16
|
-
return graph;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export async function getRootAction(): Promise<string> {
|
|
20
|
-
const projectRoot = parseProjectPath();
|
|
21
|
-
const { language } = await detectLanguage(projectRoot);
|
|
22
|
-
const relativeRootDir = relative(projectRoot, await resolveRoot(projectRoot, language));
|
|
23
|
-
|
|
24
|
-
return relativeRootDir;
|
|
25
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extracts the package/namespace from a C++ include statement
|
|
3
|
-
* For example: "myapp/utils/Helper.h" -> "myapp.utils"
|
|
4
|
-
*/
|
|
5
|
-
export function extractCppPackageFromImport(importPath: string): string {
|
|
6
|
-
// Remove file extension
|
|
7
|
-
const withoutExt = importPath.replace(/\.(h|hpp|hxx)$/, '');
|
|
8
|
-
|
|
9
|
-
// Split by path separator and take all but the last segment
|
|
10
|
-
const segments = withoutExt.split('/');
|
|
11
|
-
|
|
12
|
-
if (segments.length <= 1) {
|
|
13
|
-
return '';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// Join with dots to create package-like structure
|
|
17
|
-
return segments.slice(0, -1).join('.');
|
|
18
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extracts the package/unit name from a Delphi uses clause import.
|
|
3
|
-
*
|
|
4
|
-
* Delphi imports are in the format:
|
|
5
|
-
* - uses UnitName;
|
|
6
|
-
* - uses UnitName in 'path/to/UnitName.pas';
|
|
7
|
-
* - uses Vcl.Forms, System.SysUtils;
|
|
8
|
-
*
|
|
9
|
-
* @param importStatement - The full import statement (e.g., "System.SysUtils")
|
|
10
|
-
* @returns The package/namespace name
|
|
11
|
-
*/
|
|
12
|
-
export function extractPackageFromImport(importStatement: string): string {
|
|
13
|
-
const trimmed = importStatement.trim();
|
|
14
|
-
|
|
15
|
-
// Handle dotted notation (e.g., "System.SysUtils" -> "System")
|
|
16
|
-
const parts = trimmed.split('.');
|
|
17
|
-
if (parts.length > 1) return parts[0];
|
|
18
|
-
|
|
19
|
-
// For single unit names without namespace, return as-is
|
|
20
|
-
return trimmed;
|
|
21
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extracts the package from a reversed import array
|
|
3
|
-
* @example ['B', 'A', 'java', 'com'] => 'com.java'
|
|
4
|
-
*/
|
|
5
|
-
export function extractJavaPackageFromReversedImportArray(segments: string[]): string {
|
|
6
|
-
let collecting = false;
|
|
7
|
-
const pkgSegments: string[] = [];
|
|
8
|
-
|
|
9
|
-
for (const segment of segments) {
|
|
10
|
-
if (!collecting && /^[A-Z]/.test(segment)) continue;
|
|
11
|
-
collecting = true;
|
|
12
|
-
pkgSegments.push(segment);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
return pkgSegments.reverse().join('.');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Extracts the package name from an import string
|
|
20
|
-
* @example import 'some.package.*' => 'some.package'
|
|
21
|
-
* @example import 'some.package.A' => 'some.package'
|
|
22
|
-
* @example import 'some.package.A.B' => 'some.package'
|
|
23
|
-
*/
|
|
24
|
-
export function extractJavaPackageFromImport(imp: string) {
|
|
25
|
-
// Remove trailing '.*' if present
|
|
26
|
-
const cleaned = imp.replace(/\.\*$/, '');
|
|
27
|
-
|
|
28
|
-
// Reverse '.' splitted segments to work more easily
|
|
29
|
-
const segments = cleaned.split('.').reverse();
|
|
30
|
-
|
|
31
|
-
// No package nesting means done
|
|
32
|
-
if (segments.length < 2) return cleaned;
|
|
33
|
-
|
|
34
|
-
// If last segment starts with lowerCase means done
|
|
35
|
-
if (segments[0].toLowerCase() === segments[0]) return cleaned;
|
|
36
|
-
|
|
37
|
-
// Strip class(es) and return pure package name
|
|
38
|
-
return extractJavaPackageFromReversedImportArray(segments);
|
|
39
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use server';
|
|
2
|
-
import { readdirSync } from 'node:fs';
|
|
3
|
-
import { relative, resolve } from 'node:path';
|
|
4
|
-
import { parseProjectPath } from '@/shared/utils/parseProjectPath';
|
|
5
|
-
import { JAVA_ROOT } from '@/shared/constants';
|
|
6
|
-
|
|
7
|
-
export async function getIntrinsicPackagesRecursive(
|
|
8
|
-
root: string = parseProjectPath(),
|
|
9
|
-
currentPath?: string,
|
|
10
|
-
results: string[] = []
|
|
11
|
-
) {
|
|
12
|
-
const basePath = resolve(root, JAVA_ROOT);
|
|
13
|
-
const dirPath = currentPath ?? basePath;
|
|
14
|
-
|
|
15
|
-
const entries = readdirSync(dirPath, { withFileTypes: true });
|
|
16
|
-
|
|
17
|
-
const subdirs = entries.filter(e => e.isDirectory());
|
|
18
|
-
const javaFiles = entries.filter(e => e.isFile() && e.name.endsWith('.java'));
|
|
19
|
-
|
|
20
|
-
// Only include if it has .java files and no subdirectories
|
|
21
|
-
if (javaFiles.length > 0 && subdirs.length === 0) {
|
|
22
|
-
const relPath = relative(basePath, dirPath).replace(/\//g, '.');
|
|
23
|
-
results.push(relPath);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Recurse into subdirectories
|
|
27
|
-
for (const dir of subdirs) {
|
|
28
|
-
const fullPath = resolve(dirPath, dir.name);
|
|
29
|
-
await getIntrinsicPackagesRecursive(root, fullPath, results);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return results;
|
|
33
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extract the package name from a Kotlin import statement.
|
|
3
|
-
* Examples:
|
|
4
|
-
* - "com.example.models.User" -> "com.example.models"
|
|
5
|
-
* - "kotlinx.coroutines.launch" -> "kotlinx.coroutines"
|
|
6
|
-
* - "java.util.Date" -> "java.util"
|
|
7
|
-
*/
|
|
8
|
-
export function extractPackageFromImport(importPath: string): string {
|
|
9
|
-
// Remove any wildcard imports
|
|
10
|
-
const cleanPath = importPath.replace(/\.\*$/, '');
|
|
11
|
-
|
|
12
|
-
// Split by dots and remove the last part (class/function name)
|
|
13
|
-
const parts = cleanPath.split('.');
|
|
14
|
-
|
|
15
|
-
if (parts.length <= 1) return cleanPath;
|
|
16
|
-
|
|
17
|
-
// Return all but the last part
|
|
18
|
-
return parts.slice(0, -1).join('.');
|
|
19
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extracts package name from Python import statement.
|
|
3
|
-
*
|
|
4
|
-
* Examples:
|
|
5
|
-
* "from flask import Flask" -> "flask"
|
|
6
|
-
* "import numpy as np" -> "numpy"
|
|
7
|
-
* "from utils.helpers import format_date" -> "utils"
|
|
8
|
-
* "from .models import User" -> "" (relative import, intrinsic)
|
|
9
|
-
*/
|
|
10
|
-
export function extractPythonPackageFromImport(importName: string): string {
|
|
11
|
-
// Handle relative imports (. or ..)
|
|
12
|
-
if (importName.startsWith('.')) return '';
|
|
13
|
-
|
|
14
|
-
// Extract the base package (first part before any dots)
|
|
15
|
-
const parts = importName.split('.');
|
|
16
|
-
|
|
17
|
-
return parts[0] || importName;
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { toPosix } from '@/shared/utils/toPosix';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Extracts the package path from an import string.
|
|
5
|
-
* @example 'lodash/debounce' => 'lodash'
|
|
6
|
-
* @example '@nestjs/common' => '@nestjs/common'
|
|
7
|
-
* @example './components/Button' => './components'
|
|
8
|
-
*/
|
|
9
|
-
export function extractTypeScriptPackageFromImport(imp: string): string {
|
|
10
|
-
const segments = toPosix(imp).split('/');
|
|
11
|
-
const pathSegments = segments.slice(0, -1).join('/'); // Remove file name
|
|
12
|
-
const replacedAlias = pathSegments.startsWith('@/')
|
|
13
|
-
? pathSegments.replace(/^@/, 'src')
|
|
14
|
-
: pathSegments;
|
|
15
|
-
|
|
16
|
-
// Remove file/class-like suffixes (e.g., 'Button.tsx')
|
|
17
|
-
return replacedAlias.split('/').join('.');
|
|
18
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import type { ElementsDefinition } from 'cytoscape';
|
|
3
|
-
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { useCytoscape } from '@/components/useCytoscape';
|
|
6
|
-
import ZoomInput from '@/components/ZoomInput';
|
|
7
|
-
|
|
8
|
-
export function Cytoscape({ currentPackage, packageGraph, setCurrentPackage }: CytoscapeProps) {
|
|
9
|
-
const { cyRef, cyInstance } = useCytoscape(packageGraph, currentPackage, setCurrentPackage);
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<div className="flex flex-col w-full px-8 flex-1 gap-2">
|
|
13
|
-
<div ref={cyRef} className="h-[calc(100%-65px)]" />
|
|
14
|
-
<ZoomInput cyInstance={cyInstance} />
|
|
15
|
-
</div>
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface CytoscapeProps {
|
|
20
|
-
readonly currentPackage: string;
|
|
21
|
-
readonly packageGraph: ElementsDefinition | null;
|
|
22
|
-
readonly setCurrentPackage: (path: string) => void;
|
|
23
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const Setting: React.FC<SettingProps> = ({ children }) => {
|
|
4
|
-
return (
|
|
5
|
-
<div className="ml-[.8rem] px-[.8rem] py-2 bg-white dark:bg-neutral-900 border-b border-b-neutral-200 dark:border-b-neutral-800">
|
|
6
|
-
{children}
|
|
7
|
-
</div>
|
|
8
|
-
);
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
Setting.displayName = 'Setting';
|
|
12
|
-
|
|
13
|
-
export default Setting;
|
|
14
|
-
|
|
15
|
-
interface SettingProps {
|
|
16
|
-
readonly children: React.ReactNode;
|
|
17
|
-
}
|