From d9a1e2b7ace4b02eeefa013f569324ee1dc7abe3 Mon Sep 17 00:00:00 2001 From: shenlan Date: Tue, 11 Nov 2025 10:45:37 +0800 Subject: [PATCH] refactor(dashboard): adopt src app router layout (#667) --- .../app/panel/account/ThemePreferenceCard.tsx | 1 - dashboard/app/panel/components/Card.tsx | 1 - dashboard/cms/templates/default/index.tsx | 2 - dashboard/next.config.js.bak | 16 ++++---- dashboard/next.config.mjs | 16 ++++---- dashboard/package.json | 6 +-- dashboard/pages/_app.tsx | 14 ------- dashboard/{ => scripts/dev}/proxy.ts | 0 dashboard/scripts/gen-runtime-config.sh | 4 +- .../{setup_20.x => scripts/setup_node.sh} | 0 dashboard/scripts/sync-content.sh | 2 +- .../EmailVerificationContent.tsx | 0 .../app/(auth)/email-verification/page.tsx | 0 dashboard/{ => src}/app/(auth)/layout.tsx | 0 .../app/(auth)/login/LoginContent.tsx | 0 .../{ => src}/app/(auth)/login/LoginForm.tsx | 0 dashboard/{ => src}/app/(auth)/login/page.tsx | 0 .../app/(auth)/register/RegisterContent.tsx | 0 .../{ => src}/app/(auth)/register/page.tsx | 0 .../app/(tenant)/[slug]/mail/compose/page.tsx | 0 .../[slug]/mail/message/[id]/page.tsx | 0 .../app/(tenant)/[slug]/mail/page.tsx | 0 .../(tenant)/[slug]/mail/settings/page.tsx | 0 dashboard/{ => src}/app/404/page.tsx | 0 .../{pages/500.tsx => src/app/500/page.tsx} | 0 dashboard/{ => src}/app/AppProviders.tsx | 2 +- dashboard/{ => src}/app/[slug]/Client.tsx | 0 dashboard/{ => src}/app/[slug]/page.tsx | 0 .../{ => src}/app/api/admin/settings/route.ts | 0 .../api/admin/users/[userId]/role/route.ts | 0 .../app/api/admin/users/metrics/route.ts | 0 .../app/api/agent/[...segments]/route.ts | 0 dashboard/{ => src}/app/api/askai/route.ts | 0 .../{ => src}/app/api/auth/login/route.ts | 0 .../app/api/auth/mfa/disable/route.ts | 0 .../{ => src}/app/api/auth/mfa/setup/route.ts | 0 .../app/api/auth/mfa/status/route.ts | 0 .../app/api/auth/mfa/verify/route.ts | 0 .../{ => src}/app/api/auth/register/route.ts | 0 .../app/api/auth/register/send/route.ts | 0 .../app/api/auth/register/verify/route.ts | 0 .../{ => src}/app/api/auth/session/route.ts | 0 .../app/api/auth/verify-email/route.ts | 0 .../app/api/auth/verify-email/send/route.ts | 0 .../{ => src}/app/api/content-meta/route.ts | 2 +- .../app/api/mail/ai/classify/route.ts | 0 .../app/api/mail/ai/reply-suggest/route.ts | 0 .../app/api/mail/ai/summarize/route.ts | 0 .../{ => src}/app/api/mail/inbox/route.ts | 0 .../app/api/mail/message/[id]/route.ts | 0 dashboard/{ => src}/app/api/mail/mockData.ts | 0 .../{ => src}/app/api/mail/namespace/route.ts | 0 .../{ => src}/app/api/mail/send/route.ts | 0 dashboard/{ => src}/app/api/ping/route.ts | 0 .../{ => src}/app/api/rag/query/route.ts | 0 .../app/api/render-markdown/route.ts | 2 +- .../app/api/task/[...segments]/route.ts | 0 dashboard/{ => src}/app/api/users/route.ts | 0 dashboard/{ => src}/app/cloud_iac/README.md | 0 .../cloud_iac/[provider]/[service]/page.tsx | 0 .../app/cloud_iac/[provider]/page.tsx | 0 dashboard/{ => src}/app/cloud_iac/page.tsx | 0 .../{ => src}/app/components/ClientTime.tsx | 0 .../app/components/icons/WeChatIcon.tsx | 0 .../app/components/insight/ai/Assistant.tsx | 0 .../insight/explore/ExploreBuilder.tsx | 0 .../insight/layout/BreadcrumbBar.tsx | 0 .../app/components/insight/layout/Sidebar.tsx | 0 .../insight/layout/TimeRangePicker.tsx | 0 .../insight/layout/WorkspaceGrid.tsx | 0 .../insight/layout/WorkspaceHeader.tsx | 0 .../insight/services/adapters/logs.ts | 0 .../insight/services/adapters/openobserve.ts | 0 .../insight/services/adapters/prometheus.ts | 0 .../insight/services/adapters/traces.ts | 0 .../components/insight/services/correlator.ts | 0 .../app/components/insight/services/gitops.ts | 0 .../components/insight/slo/AlertWizard.tsx | 0 .../app/components/insight/slo/SLOPanel.tsx | 0 .../insight/snippets/SnippetLibrary.tsx | 0 .../app/components/insight/store/urlState.ts | 0 .../insight/store/useInsightState.ts | 0 .../insight/topology/NetworkTopologyPanel.tsx | 0 .../insight/topology/TopologyCanvas.tsx | 0 .../app/components/insight/topology/types.ts | 0 .../app/components/insight/viz/LogsTable.tsx | 0 .../components/insight/viz/LogsTopStats.tsx | 0 .../app/components/insight/viz/LogsViewer.tsx | 0 .../components/insight/viz/MetricsChart.tsx | 0 .../components/insight/viz/MetricsTable.tsx | 0 .../insight/viz/MetricsTopStats.tsx | 0 .../components/insight/viz/TracesTable.tsx | 0 .../components/insight/viz/TracesTopStats.tsx | 0 .../insight/viz/TracesWaterfall.tsx | 0 .../app/components/insight/viz/VizArea.tsx | 0 .../app/components/mail/ComposeForm.tsx | 0 .../{ => src}/app/components/mail/Inbox.tsx | 0 .../app/components/mail/MailCenter.tsx | 0 .../app/components/mail/MailDashboard.tsx | 0 .../app/components/mail/MailSettings.tsx | 0 .../app/components/mail/MessageItem.tsx | 0 .../app/components/mail/MessageView.tsx | 0 .../{ => src}/app/components/mail/Toolbar.tsx | 0 dashboard/{ => src}/app/demo/DemoContent.tsx | 0 .../{ => src}/app/demo/markdown/page.tsx | 2 +- dashboard/{ => src}/app/demo/page.tsx | 0 dashboard/{ => src}/app/demo/theme/page.tsx | 4 +- .../{ => src}/app/docs/DocCollectionCard.tsx | 0 .../[version]/DocCollectionView.tsx | 0 .../docs/[collection]/[version]/DocReader.tsx | 0 .../[collection]/[version]/DocViewSection.tsx | 0 .../app/docs/[collection]/[version]/page.tsx | 0 .../{ => src}/app/docs/[collection]/page.tsx | 0 dashboard/{ => src}/app/docs/page.tsx | 0 .../{ => src}/app/docs/resources.server.ts | 0 dashboard/{ => src}/app/docs/types.ts | 0 dashboard/{ => src}/app/docs/utils.ts | 0 .../app/download/[...segments]/page.tsx | 0 dashboard/{ => src}/app/download/page.tsx | 0 dashboard/{ => src}/app/globals.css | 0 .../app/insight/InsightWorkbench.tsx | 0 dashboard/{ => src}/app/insight/page.tsx | 0 dashboard/{ => src}/app/layout.tsx | 0 .../{ => src}/app/logout/LogoutClient.tsx | 0 dashboard/{ => src}/app/logout/page.tsx | 0 dashboard/{ => src}/app/page.tsx | 4 +- .../app/panel/account/ThemePreferenceCard.tsx | 1 + .../{ => src}/app/panel/account/page.tsx | 0 dashboard/{ => src}/app/panel/agent/page.tsx | 0 dashboard/{ => src}/app/panel/api/page.tsx | 0 .../{ => src}/app/panel/appearance/page.tsx | 0 dashboard/src/app/panel/components/Card.tsx | 1 + .../{ => src}/app/panel/components/Header.tsx | 0 .../app/panel/components/Sidebar.tsx | 0 dashboard/{ => src}/app/panel/layout.tsx | 0 dashboard/{ => src}/app/panel/ldp/page.tsx | 0 dashboard/{ => src}/app/panel/loading.tsx | 0 dashboard/{ => src}/app/panel/mail/page.tsx | 0 .../{ => src}/app/panel/management/page.tsx | 0 dashboard/{ => src}/app/panel/page.tsx | 0 .../{ => src}/app/panel/subscription/page.tsx | 0 dashboard/{ => src}/app/store/mail.store.ts | 0 .../{ => src}/components/AskAIButton.tsx | 0 .../{ => src}/components/AskAIDialog.tsx | 0 dashboard/{ => src}/components/ChatBubble.tsx | 0 dashboard/{ => src}/components/Contact.tsx | 0 .../{ => src}/components/DownloadSection.tsx | 0 dashboard/{ => src}/components/Features.tsx | 0 dashboard/{ => src}/components/Footer.tsx | 0 dashboard/{ => src}/components/Hero.tsx | 0 .../{ => src}/components/LanguageToggle.tsx | 0 .../components/MarkdownSection.tsx | 2 +- dashboard/{ => src}/components/Navbar.tsx | 0 dashboard/{ => src}/components/OpenSource.tsx | 0 .../components/ReleaseChannelSelector.tsx | 0 dashboard/{ => src}/components/SourceHint.tsx | 0 dashboard/{ => src}/components/Terms.tsx | 0 .../{ => src}/components/auth/AuthLayout.tsx | 0 .../components/common/QueryChips.tsx | 0 .../components/common/QueryHistoryPanel.tsx | 0 .../components/download/Breadcrumbs.tsx | 0 .../components/download/CardGrid.tsx | 0 .../components/download/CopyButton.tsx | 0 .../components/download/DownloadBrowser.tsx | 0 .../download/DownloadListingContent.tsx | 0 .../components/download/DownloadNotFound.tsx | 0 .../components/download/DownloadSummary.tsx | 0 .../components/download/FileTable.tsx | 0 .../components/download/MarkdownPanel.tsx | 0 .../{ => src}/components/home/ArticleFeed.tsx | 0 .../components/home/ArticleFeedClient.tsx | 0 .../components/home/CommunityFeed.tsx | 0 .../components/home/ContactPanel.tsx | 0 .../components/home/ContactPanelClient.tsx | 0 .../{ => src}/components/home/HeroBanner.tsx | 0 .../components/home/HeroBannerClient.tsx | 0 .../components/home/HeroProductTabs.tsx | 0 .../components/home/ProductMatrix.tsx | 0 .../components/home/ProductMatrixClient.tsx | 0 .../{ => src}/components/home/Sidebar.tsx | 0 .../{ => src}/components/home/SidebarCard.tsx | 0 .../components/iac/CloudIacCatalog.tsx | 0 .../{ => src}/components/iac/RunModal.tsx | 0 .../components/iac/ServiceDetailView.tsx | 0 .../components/marketing/ProductCommunity.tsx | 0 .../components/marketing/ProductDocs.tsx | 0 .../components/marketing/ProductDownload.tsx | 0 .../components/marketing/ProductEditions.tsx | 0 .../components/marketing/ProductFaq.tsx | 0 .../components/marketing/ProductFeatures.tsx | 0 .../components/marketing/ProductHero.tsx | 0 .../components/marketing/ProductScenarios.tsx | 0 .../{ => components}/theme/ThemeProvider.tsx | 0 dashboard/src/{ => components}/theme/dark.ts | 0 .../{ => components}/theme/designTokens.ts | 0 dashboard/src/{ => components}/theme/index.ts | 0 dashboard/src/{ => components}/theme/light.ts | 0 dashboard/src/{ => components}/theme/types.ts | 0 .../src/{ => components}/theme/useTheme.ts | 0 .../{ => src}/config/feature-toggles.json | 0 dashboard/{ => src}/config/index.ts | 0 dashboard/{ => src}/config/runtime-client.ts | 0 dashboard/{ => src}/config/runtime-loader.ts | 0 .../config/runtime-service-config.base.yaml | 0 .../config/runtime-service-config.prod.yaml | 0 .../config/runtime-service-config.sit.yaml | 0 dashboard/{ => src}/content/about/team.md | 0 .../content/homepage/en/community.md | 0 .../{ => src}/content/homepage/en/news.md | 0 .../content/homepage/en/operations.md | 0 .../{ => src}/content/homepage/en/products.md | 0 .../content/homepage/en/resources.md | 0 .../{ => src}/content/homepage/en/support.md | 0 .../content/homepage/zh/community.md | 0 .../{ => src}/content/homepage/zh/news.md | 0 .../content/homepage/zh/operations.md | 0 .../{ => src}/content/homepage/zh/products.md | 0 .../content/homepage/zh/resources.md | 0 .../{ => src}/content/homepage/zh/support.md | 0 dashboard/{ => src}/i18n/LanguageProvider.tsx | 0 dashboard/{ => src}/i18n/translations.ts | 0 dashboard/{ => src}/lib/accessControl.ts | 0 dashboard/{ => src}/lib/apiProxy.ts | 0 dashboard/{ => src}/lib/appShellBypass.tsx | 0 dashboard/{ => src}/lib/authGateway.ts | 0 dashboard/{ => src/lib}/cms/client.ts | 0 dashboard/{ => src/lib}/cms/config.ts | 0 .../lib}/cms/content/ContentContext.tsx | 0 .../lib}/cms/content/getting-started.md | 0 .../{ => src/lib}/cms/content/homepage.ts | 0 .../homepage/contact/items/github-star.md | 0 .../content/homepage/contact/items/support.md | 0 .../homepage/contact/items/wechat-group.md | 0 .../homepage/contact/items/wechat-official.md | 0 .../cms/content/homepage/contact/panel.md | 0 .../lib}/cms/content/homepage/hero.md | 0 .../posts/2024-07-12-community-events.md | 0 .../posts/2024-07-30-observability-insight.md | 0 .../posts/2024-08-15-release-notes.md | 0 .../cms/content/homepage/sidebar/community.md | 0 .../cms/content/homepage/sidebar/resources.md | 0 .../lib}/cms/content/homepage/sidebar/tags.md | 0 .../content/homepage/solutions/xcloudflow.md | 0 .../content/homepage/solutions/xcontrol.md | 0 .../content/homepage/solutions/xscopehub.md | 0 .../cms/content/homepage/solutions/xstream.md | 0 dashboard/{ => src/lib}/cms/content/index.ts | 0 dashboard/{ => src/lib}/cms/content/source.ts | 9 ++++- dashboard/{ => src/lib}/cms/contentSources.ts | 0 .../{ => src/lib}/cms/extensionRuntime.ts | 0 .../{ => src/lib}/cms/extensions/appShell.tsx | 0 .../lib}/cms/extensions/markdownSync.tsx | 0 dashboard/{ => src/lib}/cms/index.ts | 2 +- dashboard/{ => src/lib}/cms/package.json | 0 .../lib}/cms/templates/default/config.ts | 0 .../src/lib/cms/templates/default/index.tsx | 2 + .../lib}/cms/themes/default/index.tsx | 0 dashboard/{ => src/lib}/cms/types.ts | 2 +- dashboard/{ => src}/lib/download-data.ts | 0 dashboard/{ => src}/lib/download-manifest.ts | 0 dashboard/{ => src}/lib/featureFlags.ts | 0 dashboard/{ => src}/lib/featureToggles.ts | 0 dashboard/{ => src}/lib/format.ts | 0 dashboard/{ => src}/lib/iac/actions.ts | 0 dashboard/{ => src}/lib/iac/catalog.ts | 0 dashboard/{ => src}/lib/iac/detail-presets.ts | 0 dashboard/{ => src}/lib/iac/types.ts | 0 dashboard/{ => src}/lib/knowledgeBase.ts | 0 dashboard/{ => src}/lib/mail/apiClient.ts | 0 dashboard/{ => src}/lib/mail/auth.ts | 0 dashboard/{ => src}/lib/mail/types.ts | 0 dashboard/{ => src}/lib/markdown.ts | 2 +- dashboard/{ => src}/lib/rbac.ts | 0 dashboard/{ui/lib => src/lib/ui}/markdown.ts | 8 ++-- dashboard/{ => src}/lib/userStore.tsx | 0 .../extensions/__tests__/loader.test.ts | 0 .../{ => modules}/extensions/builtin/index.ts | 0 .../user-center/account/MfaSetupPanel.tsx | 0 .../account/ThemePreferenceCard.tsx | 0 .../builtin/user-center/components/Card.tsx | 0 .../user-center/components/UserOverview.tsx | 0 .../user-center/components/VlessQrCard.tsx | 0 .../extensions/builtin/user-center/index.ts | 0 .../extensions/builtin/user-center/lib/api.ts | 0 .../builtin/user-center/lib/vless.ts | 0 .../__tests__/ManagementComponents.test.tsx | 0 .../management/components/OverviewCards.tsx | 0 .../components/PermissionMatrixEditor.tsx | 0 .../management/components/TrendChart.tsx | 0 .../components/UserGroupManagement.tsx | 0 .../builtin/user-center/routes/account.tsx | 0 .../builtin/user-center/routes/agent.tsx | 0 .../builtin/user-center/routes/api.tsx | 0 .../builtin/user-center/routes/home.tsx | 0 .../builtin/user-center/routes/ldp.tsx | 0 .../builtin/user-center/routes/mail.tsx | 0 .../builtin/user-center/routes/management.tsx | 0 .../user-center/routes/subscription.tsx | 0 .../builtin/user-center/routes/theme.tsx | 0 .../src/{ => modules}/extensions/loader.ts | 0 .../src/{ => modules}/extensions/types.ts | 0 .../{ui => src/modules}/homepage/page.tsx | 0 .../{ => modules}/products/registry.test.ts | 0 .../src/{ => modules}/products/registry.ts | 0 .../src/{ => modules}/products/xcloudflow.ts | 0 .../src/{ => modules}/products/xscopehub.ts | 0 .../src/{ => modules}/products/xstream.ts | 0 .../src/{ => modules}/templateRegistry.ts | 2 +- .../{ => modules}/templates/default/index.tsx | 0 .../templates/layouts/commonHome.tsx | 0 .../src/{ => modules}/templates/types.ts | 0 dashboard/{ => src}/server/account/session.ts | 0 dashboard/{api => src/server}/content-meta.ts | 0 .../{api => src/server}/content-utils.ts | 2 +- .../{api => src/server}/render-markdown.ts | 0 dashboard/{ => src}/server/runtime-loader.ts | 4 +- dashboard/{ => src}/server/serviceConfig.ts | 0 .../{ => tests/e2e}/playwright.config.ts | 2 +- .../e2e => tests/e2e/ui}/auth-pages.spec.ts | 0 .../e2e => tests/e2e/ui}/homepage.spec.ts | 0 .../unit/components}/MarkdownSection.test.tsx | 2 +- .../unit}/templateRegistry.test.ts | 10 +++-- dashboard/tests/unit/vitest.config.ts | 40 +++++++++++++++++++ dashboard/{ => tests/unit}/vitest.setup.ts | 0 dashboard/theme | 1 - dashboard/tsconfig.json | 31 +++++++------- dashboard/vitest.config.ts | 40 ------------------- 327 files changed, 118 insertions(+), 123 deletions(-) delete mode 100644 dashboard/app/panel/account/ThemePreferenceCard.tsx delete mode 100644 dashboard/app/panel/components/Card.tsx delete mode 100644 dashboard/cms/templates/default/index.tsx delete mode 100644 dashboard/pages/_app.tsx rename dashboard/{ => scripts/dev}/proxy.ts (100%) rename dashboard/{setup_20.x => scripts/setup_node.sh} (100%) rename dashboard/{ => src}/app/(auth)/email-verification/EmailVerificationContent.tsx (100%) rename dashboard/{ => src}/app/(auth)/email-verification/page.tsx (100%) rename dashboard/{ => src}/app/(auth)/layout.tsx (100%) rename dashboard/{ => src}/app/(auth)/login/LoginContent.tsx (100%) rename dashboard/{ => src}/app/(auth)/login/LoginForm.tsx (100%) rename dashboard/{ => src}/app/(auth)/login/page.tsx (100%) rename dashboard/{ => src}/app/(auth)/register/RegisterContent.tsx (100%) rename dashboard/{ => src}/app/(auth)/register/page.tsx (100%) rename dashboard/{ => src}/app/(tenant)/[slug]/mail/compose/page.tsx (100%) rename dashboard/{ => src}/app/(tenant)/[slug]/mail/message/[id]/page.tsx (100%) rename dashboard/{ => src}/app/(tenant)/[slug]/mail/page.tsx (100%) rename dashboard/{ => src}/app/(tenant)/[slug]/mail/settings/page.tsx (100%) rename dashboard/{ => src}/app/404/page.tsx (100%) rename dashboard/{pages/500.tsx => src/app/500/page.tsx} (100%) rename dashboard/{ => src}/app/AppProviders.tsx (92%) rename dashboard/{ => src}/app/[slug]/Client.tsx (100%) rename dashboard/{ => src}/app/[slug]/page.tsx (100%) rename dashboard/{ => src}/app/api/admin/settings/route.ts (100%) rename dashboard/{ => src}/app/api/admin/users/[userId]/role/route.ts (100%) rename dashboard/{ => src}/app/api/admin/users/metrics/route.ts (100%) rename dashboard/{ => src}/app/api/agent/[...segments]/route.ts (100%) rename dashboard/{ => src}/app/api/askai/route.ts (100%) rename dashboard/{ => src}/app/api/auth/login/route.ts (100%) rename dashboard/{ => src}/app/api/auth/mfa/disable/route.ts (100%) rename dashboard/{ => src}/app/api/auth/mfa/setup/route.ts (100%) rename dashboard/{ => src}/app/api/auth/mfa/status/route.ts (100%) rename dashboard/{ => src}/app/api/auth/mfa/verify/route.ts (100%) rename dashboard/{ => src}/app/api/auth/register/route.ts (100%) rename dashboard/{ => src}/app/api/auth/register/send/route.ts (100%) rename dashboard/{ => src}/app/api/auth/register/verify/route.ts (100%) rename dashboard/{ => src}/app/api/auth/session/route.ts (100%) rename dashboard/{ => src}/app/api/auth/verify-email/route.ts (100%) rename dashboard/{ => src}/app/api/auth/verify-email/send/route.ts (100%) rename dashboard/{ => src}/app/api/content-meta/route.ts (89%) rename dashboard/{ => src}/app/api/mail/ai/classify/route.ts (100%) rename dashboard/{ => src}/app/api/mail/ai/reply-suggest/route.ts (100%) rename dashboard/{ => src}/app/api/mail/ai/summarize/route.ts (100%) rename dashboard/{ => src}/app/api/mail/inbox/route.ts (100%) rename dashboard/{ => src}/app/api/mail/message/[id]/route.ts (100%) rename dashboard/{ => src}/app/api/mail/mockData.ts (100%) rename dashboard/{ => src}/app/api/mail/namespace/route.ts (100%) rename dashboard/{ => src}/app/api/mail/send/route.ts (100%) rename dashboard/{ => src}/app/api/ping/route.ts (100%) rename dashboard/{ => src}/app/api/rag/query/route.ts (100%) rename dashboard/{ => src}/app/api/render-markdown/route.ts (89%) rename dashboard/{ => src}/app/api/task/[...segments]/route.ts (100%) rename dashboard/{ => src}/app/api/users/route.ts (100%) rename dashboard/{ => src}/app/cloud_iac/README.md (100%) rename dashboard/{ => src}/app/cloud_iac/[provider]/[service]/page.tsx (100%) rename dashboard/{ => src}/app/cloud_iac/[provider]/page.tsx (100%) rename dashboard/{ => src}/app/cloud_iac/page.tsx (100%) rename dashboard/{ => src}/app/components/ClientTime.tsx (100%) rename dashboard/{ => src}/app/components/icons/WeChatIcon.tsx (100%) rename dashboard/{ => src}/app/components/insight/ai/Assistant.tsx (100%) rename dashboard/{ => src}/app/components/insight/explore/ExploreBuilder.tsx (100%) rename dashboard/{ => src}/app/components/insight/layout/BreadcrumbBar.tsx (100%) rename dashboard/{ => src}/app/components/insight/layout/Sidebar.tsx (100%) rename dashboard/{ => src}/app/components/insight/layout/TimeRangePicker.tsx (100%) rename dashboard/{ => src}/app/components/insight/layout/WorkspaceGrid.tsx (100%) rename dashboard/{ => src}/app/components/insight/layout/WorkspaceHeader.tsx (100%) rename dashboard/{ => src}/app/components/insight/services/adapters/logs.ts (100%) rename dashboard/{ => src}/app/components/insight/services/adapters/openobserve.ts (100%) rename dashboard/{ => src}/app/components/insight/services/adapters/prometheus.ts (100%) rename dashboard/{ => src}/app/components/insight/services/adapters/traces.ts (100%) rename dashboard/{ => src}/app/components/insight/services/correlator.ts (100%) rename dashboard/{ => src}/app/components/insight/services/gitops.ts (100%) rename dashboard/{ => src}/app/components/insight/slo/AlertWizard.tsx (100%) rename dashboard/{ => src}/app/components/insight/slo/SLOPanel.tsx (100%) rename dashboard/{ => src}/app/components/insight/snippets/SnippetLibrary.tsx (100%) rename dashboard/{ => src}/app/components/insight/store/urlState.ts (100%) rename dashboard/{ => src}/app/components/insight/store/useInsightState.ts (100%) rename dashboard/{ => src}/app/components/insight/topology/NetworkTopologyPanel.tsx (100%) rename dashboard/{ => src}/app/components/insight/topology/TopologyCanvas.tsx (100%) rename dashboard/{ => src}/app/components/insight/topology/types.ts (100%) rename dashboard/{ => src}/app/components/insight/viz/LogsTable.tsx (100%) rename dashboard/{ => src}/app/components/insight/viz/LogsTopStats.tsx (100%) rename dashboard/{ => src}/app/components/insight/viz/LogsViewer.tsx (100%) rename dashboard/{ => src}/app/components/insight/viz/MetricsChart.tsx (100%) rename dashboard/{ => src}/app/components/insight/viz/MetricsTable.tsx (100%) rename dashboard/{ => src}/app/components/insight/viz/MetricsTopStats.tsx (100%) rename dashboard/{ => src}/app/components/insight/viz/TracesTable.tsx (100%) rename dashboard/{ => src}/app/components/insight/viz/TracesTopStats.tsx (100%) rename dashboard/{ => src}/app/components/insight/viz/TracesWaterfall.tsx (100%) rename dashboard/{ => src}/app/components/insight/viz/VizArea.tsx (100%) rename dashboard/{ => src}/app/components/mail/ComposeForm.tsx (100%) rename dashboard/{ => src}/app/components/mail/Inbox.tsx (100%) rename dashboard/{ => src}/app/components/mail/MailCenter.tsx (100%) rename dashboard/{ => src}/app/components/mail/MailDashboard.tsx (100%) rename dashboard/{ => src}/app/components/mail/MailSettings.tsx (100%) rename dashboard/{ => src}/app/components/mail/MessageItem.tsx (100%) rename dashboard/{ => src}/app/components/mail/MessageView.tsx (100%) rename dashboard/{ => src}/app/components/mail/Toolbar.tsx (100%) rename dashboard/{ => src}/app/demo/DemoContent.tsx (100%) rename dashboard/{ => src}/app/demo/markdown/page.tsx (67%) rename dashboard/{ => src}/app/demo/page.tsx (100%) rename dashboard/{ => src}/app/demo/theme/page.tsx (96%) rename dashboard/{ => src}/app/docs/DocCollectionCard.tsx (100%) rename dashboard/{ => src}/app/docs/[collection]/[version]/DocCollectionView.tsx (100%) rename dashboard/{ => src}/app/docs/[collection]/[version]/DocReader.tsx (100%) rename dashboard/{ => src}/app/docs/[collection]/[version]/DocViewSection.tsx (100%) rename dashboard/{ => src}/app/docs/[collection]/[version]/page.tsx (100%) rename dashboard/{ => src}/app/docs/[collection]/page.tsx (100%) rename dashboard/{ => src}/app/docs/page.tsx (100%) rename dashboard/{ => src}/app/docs/resources.server.ts (100%) rename dashboard/{ => src}/app/docs/types.ts (100%) rename dashboard/{ => src}/app/docs/utils.ts (100%) rename dashboard/{ => src}/app/download/[...segments]/page.tsx (100%) rename dashboard/{ => src}/app/download/page.tsx (100%) rename dashboard/{ => src}/app/globals.css (100%) rename dashboard/{ => src}/app/insight/InsightWorkbench.tsx (100%) rename dashboard/{ => src}/app/insight/page.tsx (100%) rename dashboard/{ => src}/app/layout.tsx (100%) rename dashboard/{ => src}/app/logout/LogoutClient.tsx (100%) rename dashboard/{ => src}/app/logout/page.tsx (100%) rename dashboard/{ => src}/app/page.tsx (84%) create mode 100644 dashboard/src/app/panel/account/ThemePreferenceCard.tsx rename dashboard/{ => src}/app/panel/account/page.tsx (100%) rename dashboard/{ => src}/app/panel/agent/page.tsx (100%) rename dashboard/{ => src}/app/panel/api/page.tsx (100%) rename dashboard/{ => src}/app/panel/appearance/page.tsx (100%) create mode 100644 dashboard/src/app/panel/components/Card.tsx rename dashboard/{ => src}/app/panel/components/Header.tsx (100%) rename dashboard/{ => src}/app/panel/components/Sidebar.tsx (100%) rename dashboard/{ => src}/app/panel/layout.tsx (100%) rename dashboard/{ => src}/app/panel/ldp/page.tsx (100%) rename dashboard/{ => src}/app/panel/loading.tsx (100%) rename dashboard/{ => src}/app/panel/mail/page.tsx (100%) rename dashboard/{ => src}/app/panel/management/page.tsx (100%) rename dashboard/{ => src}/app/panel/page.tsx (100%) rename dashboard/{ => src}/app/panel/subscription/page.tsx (100%) rename dashboard/{ => src}/app/store/mail.store.ts (100%) rename dashboard/{ => src}/components/AskAIButton.tsx (100%) rename dashboard/{ => src}/components/AskAIDialog.tsx (100%) rename dashboard/{ => src}/components/ChatBubble.tsx (100%) rename dashboard/{ => src}/components/Contact.tsx (100%) rename dashboard/{ => src}/components/DownloadSection.tsx (100%) rename dashboard/{ => src}/components/Features.tsx (100%) rename dashboard/{ => src}/components/Footer.tsx (100%) rename dashboard/{ => src}/components/Hero.tsx (100%) rename dashboard/{ => src}/components/LanguageToggle.tsx (100%) rename dashboard/{ui => src}/components/MarkdownSection.tsx (98%) rename dashboard/{ => src}/components/Navbar.tsx (100%) rename dashboard/{ => src}/components/OpenSource.tsx (100%) rename dashboard/{ => src}/components/ReleaseChannelSelector.tsx (100%) rename dashboard/{ => src}/components/SourceHint.tsx (100%) rename dashboard/{ => src}/components/Terms.tsx (100%) rename dashboard/{ => src}/components/auth/AuthLayout.tsx (100%) rename dashboard/{ => src}/components/common/QueryChips.tsx (100%) rename dashboard/{ => src}/components/common/QueryHistoryPanel.tsx (100%) rename dashboard/{ => src}/components/download/Breadcrumbs.tsx (100%) rename dashboard/{ => src}/components/download/CardGrid.tsx (100%) rename dashboard/{ => src}/components/download/CopyButton.tsx (100%) rename dashboard/{ => src}/components/download/DownloadBrowser.tsx (100%) rename dashboard/{ => src}/components/download/DownloadListingContent.tsx (100%) rename dashboard/{ => src}/components/download/DownloadNotFound.tsx (100%) rename dashboard/{ => src}/components/download/DownloadSummary.tsx (100%) rename dashboard/{ => src}/components/download/FileTable.tsx (100%) rename dashboard/{ => src}/components/download/MarkdownPanel.tsx (100%) rename dashboard/{ => src}/components/home/ArticleFeed.tsx (100%) rename dashboard/{ => src}/components/home/ArticleFeedClient.tsx (100%) rename dashboard/{ => src}/components/home/CommunityFeed.tsx (100%) rename dashboard/{ => src}/components/home/ContactPanel.tsx (100%) rename dashboard/{ => src}/components/home/ContactPanelClient.tsx (100%) rename dashboard/{ => src}/components/home/HeroBanner.tsx (100%) rename dashboard/{ => src}/components/home/HeroBannerClient.tsx (100%) rename dashboard/{ => src}/components/home/HeroProductTabs.tsx (100%) rename dashboard/{ => src}/components/home/ProductMatrix.tsx (100%) rename dashboard/{ => src}/components/home/ProductMatrixClient.tsx (100%) rename dashboard/{ => src}/components/home/Sidebar.tsx (100%) rename dashboard/{ => src}/components/home/SidebarCard.tsx (100%) rename dashboard/{ => src}/components/iac/CloudIacCatalog.tsx (100%) rename dashboard/{ => src}/components/iac/RunModal.tsx (100%) rename dashboard/{ => src}/components/iac/ServiceDetailView.tsx (100%) rename dashboard/{ => src}/components/marketing/ProductCommunity.tsx (100%) rename dashboard/{ => src}/components/marketing/ProductDocs.tsx (100%) rename dashboard/{ => src}/components/marketing/ProductDownload.tsx (100%) rename dashboard/{ => src}/components/marketing/ProductEditions.tsx (100%) rename dashboard/{ => src}/components/marketing/ProductFaq.tsx (100%) rename dashboard/{ => src}/components/marketing/ProductFeatures.tsx (100%) rename dashboard/{ => src}/components/marketing/ProductHero.tsx (100%) rename dashboard/{ => src}/components/marketing/ProductScenarios.tsx (100%) rename dashboard/src/{ => components}/theme/ThemeProvider.tsx (100%) rename dashboard/src/{ => components}/theme/dark.ts (100%) rename dashboard/src/{ => components}/theme/designTokens.ts (100%) rename dashboard/src/{ => components}/theme/index.ts (100%) rename dashboard/src/{ => components}/theme/light.ts (100%) rename dashboard/src/{ => components}/theme/types.ts (100%) rename dashboard/src/{ => components}/theme/useTheme.ts (100%) rename dashboard/{ => src}/config/feature-toggles.json (100%) rename dashboard/{ => src}/config/index.ts (100%) rename dashboard/{ => src}/config/runtime-client.ts (100%) rename dashboard/{ => src}/config/runtime-loader.ts (100%) rename dashboard/{ => src}/config/runtime-service-config.base.yaml (100%) rename dashboard/{ => src}/config/runtime-service-config.prod.yaml (100%) rename dashboard/{ => src}/config/runtime-service-config.sit.yaml (100%) rename dashboard/{ => src}/content/about/team.md (100%) rename dashboard/{ => src}/content/homepage/en/community.md (100%) rename dashboard/{ => src}/content/homepage/en/news.md (100%) rename dashboard/{ => src}/content/homepage/en/operations.md (100%) rename dashboard/{ => src}/content/homepage/en/products.md (100%) rename dashboard/{ => src}/content/homepage/en/resources.md (100%) rename dashboard/{ => src}/content/homepage/en/support.md (100%) rename dashboard/{ => src}/content/homepage/zh/community.md (100%) rename dashboard/{ => src}/content/homepage/zh/news.md (100%) rename dashboard/{ => src}/content/homepage/zh/operations.md (100%) rename dashboard/{ => src}/content/homepage/zh/products.md (100%) rename dashboard/{ => src}/content/homepage/zh/resources.md (100%) rename dashboard/{ => src}/content/homepage/zh/support.md (100%) rename dashboard/{ => src}/i18n/LanguageProvider.tsx (100%) rename dashboard/{ => src}/i18n/translations.ts (100%) rename dashboard/{ => src}/lib/accessControl.ts (100%) rename dashboard/{ => src}/lib/apiProxy.ts (100%) rename dashboard/{ => src}/lib/appShellBypass.tsx (100%) rename dashboard/{ => src}/lib/authGateway.ts (100%) rename dashboard/{ => src/lib}/cms/client.ts (100%) rename dashboard/{ => src/lib}/cms/config.ts (100%) rename dashboard/{ => src/lib}/cms/content/ContentContext.tsx (100%) rename dashboard/{ => src/lib}/cms/content/getting-started.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage.ts (100%) rename dashboard/{ => src/lib}/cms/content/homepage/contact/items/github-star.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage/contact/items/support.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage/contact/items/wechat-group.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage/contact/items/wechat-official.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage/contact/panel.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage/hero.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage/posts/2024-07-12-community-events.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage/posts/2024-07-30-observability-insight.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage/posts/2024-08-15-release-notes.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage/sidebar/community.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage/sidebar/resources.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage/sidebar/tags.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage/solutions/xcloudflow.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage/solutions/xcontrol.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage/solutions/xscopehub.md (100%) rename dashboard/{ => src/lib}/cms/content/homepage/solutions/xstream.md (100%) rename dashboard/{ => src/lib}/cms/content/index.ts (100%) rename dashboard/{ => src/lib}/cms/content/source.ts (86%) rename dashboard/{ => src/lib}/cms/contentSources.ts (100%) rename dashboard/{ => src/lib}/cms/extensionRuntime.ts (100%) rename dashboard/{ => src/lib}/cms/extensions/appShell.tsx (100%) rename dashboard/{ => src/lib}/cms/extensions/markdownSync.tsx (100%) rename dashboard/{ => src/lib}/cms/index.ts (89%) rename dashboard/{ => src/lib}/cms/package.json (100%) rename dashboard/{ => src/lib}/cms/templates/default/config.ts (100%) create mode 100644 dashboard/src/lib/cms/templates/default/index.tsx rename dashboard/{ => src/lib}/cms/themes/default/index.tsx (100%) rename dashboard/{ => src/lib}/cms/types.ts (95%) rename dashboard/{ => src}/lib/download-data.ts (100%) rename dashboard/{ => src}/lib/download-manifest.ts (100%) rename dashboard/{ => src}/lib/featureFlags.ts (100%) rename dashboard/{ => src}/lib/featureToggles.ts (100%) rename dashboard/{ => src}/lib/format.ts (100%) rename dashboard/{ => src}/lib/iac/actions.ts (100%) rename dashboard/{ => src}/lib/iac/catalog.ts (100%) rename dashboard/{ => src}/lib/iac/detail-presets.ts (100%) rename dashboard/{ => src}/lib/iac/types.ts (100%) rename dashboard/{ => src}/lib/knowledgeBase.ts (100%) rename dashboard/{ => src}/lib/mail/apiClient.ts (100%) rename dashboard/{ => src}/lib/mail/auth.ts (100%) rename dashboard/{ => src}/lib/mail/types.ts (100%) rename dashboard/{ => src}/lib/markdown.ts (97%) rename dashboard/{ => src}/lib/rbac.ts (100%) rename dashboard/{ui/lib => src/lib/ui}/markdown.ts (50%) rename dashboard/{ => src}/lib/userStore.tsx (100%) rename dashboard/src/{ => modules}/extensions/__tests__/loader.test.ts (100%) rename dashboard/src/{ => modules}/extensions/builtin/index.ts (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/account/MfaSetupPanel.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/account/ThemePreferenceCard.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/components/Card.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/components/UserOverview.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/components/VlessQrCard.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/index.ts (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/lib/api.ts (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/lib/vless.ts (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/management/__tests__/ManagementComponents.test.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/management/components/OverviewCards.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/management/components/PermissionMatrixEditor.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/management/components/TrendChart.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/management/components/UserGroupManagement.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/routes/account.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/routes/agent.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/routes/api.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/routes/home.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/routes/ldp.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/routes/mail.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/routes/management.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/routes/subscription.tsx (100%) rename dashboard/src/{ => modules}/extensions/builtin/user-center/routes/theme.tsx (100%) rename dashboard/src/{ => modules}/extensions/loader.ts (100%) rename dashboard/src/{ => modules}/extensions/types.ts (100%) rename dashboard/{ui => src/modules}/homepage/page.tsx (100%) rename dashboard/src/{ => modules}/products/registry.test.ts (100%) rename dashboard/src/{ => modules}/products/registry.ts (100%) rename dashboard/src/{ => modules}/products/xcloudflow.ts (100%) rename dashboard/src/{ => modules}/products/xscopehub.ts (100%) rename dashboard/src/{ => modules}/products/xstream.ts (100%) rename dashboard/src/{ => modules}/templateRegistry.ts (98%) rename dashboard/src/{ => modules}/templates/default/index.tsx (100%) rename dashboard/src/{ => modules}/templates/layouts/commonHome.tsx (100%) rename dashboard/src/{ => modules}/templates/types.ts (100%) rename dashboard/{ => src}/server/account/session.ts (100%) rename dashboard/{api => src/server}/content-meta.ts (100%) rename dashboard/{api => src/server}/content-utils.ts (95%) rename dashboard/{api => src/server}/render-markdown.ts (100%) rename dashboard/{ => src}/server/runtime-loader.ts (98%) rename dashboard/{ => src}/server/serviceConfig.ts (100%) rename dashboard/{ => tests/e2e}/playwright.config.ts (96%) rename dashboard/{ui/tests/e2e => tests/e2e/ui}/auth-pages.spec.ts (100%) rename dashboard/{ui/tests/e2e => tests/e2e/ui}/homepage.spec.ts (100%) rename dashboard/{ui/components/__tests__ => tests/unit/components}/MarkdownSection.test.tsx (96%) rename dashboard/{src/__tests__ => tests/unit}/templateRegistry.test.ts (92%) create mode 100644 dashboard/tests/unit/vitest.config.ts rename dashboard/{ => tests/unit}/vitest.setup.ts (100%) delete mode 120000 dashboard/theme delete mode 100644 dashboard/vitest.config.ts diff --git a/dashboard/app/panel/account/ThemePreferenceCard.tsx b/dashboard/app/panel/account/ThemePreferenceCard.tsx deleted file mode 100644 index e03e471..0000000 --- a/dashboard/app/panel/account/ThemePreferenceCard.tsx +++ /dev/null @@ -1 +0,0 @@ -export { default } from '../../../src/extensions/builtin/user-center/account/ThemePreferenceCard' diff --git a/dashboard/app/panel/components/Card.tsx b/dashboard/app/panel/components/Card.tsx deleted file mode 100644 index 11dd3ec..0000000 --- a/dashboard/app/panel/components/Card.tsx +++ /dev/null @@ -1 +0,0 @@ -export { default } from '../../../src/extensions/builtin/user-center/components/Card' diff --git a/dashboard/cms/templates/default/index.tsx b/dashboard/cms/templates/default/index.tsx deleted file mode 100644 index 138778d..0000000 --- a/dashboard/cms/templates/default/index.tsx +++ /dev/null @@ -1,2 +0,0 @@ -export { default } from '../../../src/templates/default' -export { defaultHomeLayoutConfig } from './config' diff --git a/dashboard/next.config.js.bak b/dashboard/next.config.js.bak index 4813b1a..15fc014 100644 --- a/dashboard/next.config.js.bak +++ b/dashboard/next.config.js.bak @@ -85,14 +85,16 @@ const nextConfig = { config.resolve.alias = { ...(config.resolve.alias ?? {}), - '@cms': path.join(__dirname, 'cms'), - '@components': path.join(__dirname, 'components'), - '@i18n': path.join(__dirname, 'i18n'), - '@lib': path.join(__dirname, 'lib'), + '@cms': path.join(__dirname, 'src', 'lib', 'cms'), + '@components': path.join(__dirname, 'src', 'components'), + '@i18n': path.join(__dirname, 'src', 'i18n'), + '@lib': path.join(__dirname, 'src', 'lib'), '@types': path.join(__dirname, 'types'), - '@server': path.join(__dirname, 'server'), - '@theme': path.join(__dirname, 'src', 'theme'), - '@templates': path.join(__dirname, 'src', 'templates'), + '@server': path.join(__dirname, 'src', 'server'), + '@modules': path.join(__dirname, 'src', 'modules'), + '@extensions': path.join(__dirname, 'src', 'modules', 'extensions'), + '@theme': path.join(__dirname, 'src', 'components', 'theme'), + '@templates': path.join(__dirname, 'src', 'modules', 'templates'), '@src': path.join(__dirname, 'src'), } return config diff --git a/dashboard/next.config.mjs b/dashboard/next.config.mjs index e0e6971..97e6975 100644 --- a/dashboard/next.config.mjs +++ b/dashboard/next.config.mjs @@ -33,14 +33,16 @@ const nextConfig = { // 显式 alias,保证 Turbopack 也能解析 config.resolve.alias = { ...(config.resolve.alias ?? {}), - "@cms": path.join(__dirname, "cms"), - "@components": path.join(__dirname, "components"), - "@i18n": path.join(__dirname, "i18n"), - "@lib": path.join(__dirname, "lib"), + "@cms": path.join(__dirname, "src", "lib", "cms"), + "@components": path.join(__dirname, "src", "components"), + "@i18n": path.join(__dirname, "src", "i18n"), + "@lib": path.join(__dirname, "src", "lib"), "@types": path.join(__dirname, "types"), - "@server": path.join(__dirname, "server"), - "@theme": path.join(__dirname, "src", "theme"), - "@templates": path.join(__dirname, "src", "templates"), + "@server": path.join(__dirname, "src", "server"), + "@modules": path.join(__dirname, "src", "modules"), + "@extensions": path.join(__dirname, "src", "modules", "extensions"), + "@theme": path.join(__dirname, "src", "components", "theme"), + "@templates": path.join(__dirname, "src", "modules", "templates"), "@src": path.join(__dirname, "src"), }; diff --git a/dashboard/package.json b/dashboard/package.json index 9506d2d..b4c6c9f 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -15,9 +15,9 @@ "typecheck": "tsc --noEmit", "format": "prettier --write .", "preview": "next build && next start", - "test": "vitest run", - "test:unit": "vitest run", - "test:e2e": "playwright test" + "test": "vitest run --config tests/unit/vitest.config.ts", + "test:unit": "vitest run --config tests/unit/vitest.config.ts", + "test:e2e": "playwright test --config tests/e2e/playwright.config.ts" }, "dependencies": { "dompurify": "^3.2.6", diff --git a/dashboard/pages/_app.tsx b/dashboard/pages/_app.tsx deleted file mode 100644 index 4316313..0000000 --- a/dashboard/pages/_app.tsx +++ /dev/null @@ -1,14 +0,0 @@ -'use client' - -import type { AppProps } from 'next/app' - -import '../app/globals.css' -import { AppProviders } from '../app/AppProviders' - -export default function HomepageApp({ Component, pageProps }: AppProps) { - return ( - - - - ) -} diff --git a/dashboard/proxy.ts b/dashboard/scripts/dev/proxy.ts similarity index 100% rename from dashboard/proxy.ts rename to dashboard/scripts/dev/proxy.ts diff --git a/dashboard/scripts/gen-runtime-config.sh b/dashboard/scripts/gen-runtime-config.sh index 6b9d765..03efefc 100755 --- a/dashboard/scripts/gen-runtime-config.sh +++ b/dashboard/scripts/gen-runtime-config.sh @@ -2,7 +2,7 @@ set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -CONFIG_DIR="${ROOT_DIR}/config" +CONFIG_DIR="${ROOT_DIR}/src/config" BASE_FILE="${CONFIG_DIR}/runtime-service-config.base.yaml" SIT_FILE="${CONFIG_DIR}/runtime-service-config.sit.yaml" PROD_FILE="${CONFIG_DIR}/runtime-service-config.prod.yaml" @@ -18,7 +18,7 @@ Usage: scripts/gen-runtime-config.sh [--hostname ] [--env ] [--ou Options: --hostname Override the hostname used for environment detection. --env Explicitly set the environment (prod|sit). Overrides hostname detection. - --output Output path for the merged runtime configuration. Defaults to config/runtime-service-config.yaml. + --output Output path for the merged runtime configuration. Defaults to src/config/runtime-service-config.yaml. -h, --help Show this help message. USAGE } diff --git a/dashboard/setup_20.x b/dashboard/scripts/setup_node.sh similarity index 100% rename from dashboard/setup_20.x rename to dashboard/scripts/setup_node.sh diff --git a/dashboard/scripts/sync-content.sh b/dashboard/scripts/sync-content.sh index f8f232b..5a5591d 100755 --- a/dashboard/scripts/sync-content.sh +++ b/dashboard/scripts/sync-content.sh @@ -3,7 +3,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) REPO_ROOT=$(cd "${SCRIPT_DIR}/.." && pwd) -CONTENT_DIR="${REPO_ROOT}/content" +CONTENT_DIR="${REPO_ROOT}/src/content" REMOTE_REPO="${CONTENT_REMOTE_REPO:-}" REMOTE_BRANCH="${CONTENT_REMOTE_BRANCH:-main}" REMOTE_SUBDIR="${CONTENT_REMOTE_SUBDIR:-content}" diff --git a/dashboard/app/(auth)/email-verification/EmailVerificationContent.tsx b/dashboard/src/app/(auth)/email-verification/EmailVerificationContent.tsx similarity index 100% rename from dashboard/app/(auth)/email-verification/EmailVerificationContent.tsx rename to dashboard/src/app/(auth)/email-verification/EmailVerificationContent.tsx diff --git a/dashboard/app/(auth)/email-verification/page.tsx b/dashboard/src/app/(auth)/email-verification/page.tsx similarity index 100% rename from dashboard/app/(auth)/email-verification/page.tsx rename to dashboard/src/app/(auth)/email-verification/page.tsx diff --git a/dashboard/app/(auth)/layout.tsx b/dashboard/src/app/(auth)/layout.tsx similarity index 100% rename from dashboard/app/(auth)/layout.tsx rename to dashboard/src/app/(auth)/layout.tsx diff --git a/dashboard/app/(auth)/login/LoginContent.tsx b/dashboard/src/app/(auth)/login/LoginContent.tsx similarity index 100% rename from dashboard/app/(auth)/login/LoginContent.tsx rename to dashboard/src/app/(auth)/login/LoginContent.tsx diff --git a/dashboard/app/(auth)/login/LoginForm.tsx b/dashboard/src/app/(auth)/login/LoginForm.tsx similarity index 100% rename from dashboard/app/(auth)/login/LoginForm.tsx rename to dashboard/src/app/(auth)/login/LoginForm.tsx diff --git a/dashboard/app/(auth)/login/page.tsx b/dashboard/src/app/(auth)/login/page.tsx similarity index 100% rename from dashboard/app/(auth)/login/page.tsx rename to dashboard/src/app/(auth)/login/page.tsx diff --git a/dashboard/app/(auth)/register/RegisterContent.tsx b/dashboard/src/app/(auth)/register/RegisterContent.tsx similarity index 100% rename from dashboard/app/(auth)/register/RegisterContent.tsx rename to dashboard/src/app/(auth)/register/RegisterContent.tsx diff --git a/dashboard/app/(auth)/register/page.tsx b/dashboard/src/app/(auth)/register/page.tsx similarity index 100% rename from dashboard/app/(auth)/register/page.tsx rename to dashboard/src/app/(auth)/register/page.tsx diff --git a/dashboard/app/(tenant)/[slug]/mail/compose/page.tsx b/dashboard/src/app/(tenant)/[slug]/mail/compose/page.tsx similarity index 100% rename from dashboard/app/(tenant)/[slug]/mail/compose/page.tsx rename to dashboard/src/app/(tenant)/[slug]/mail/compose/page.tsx diff --git a/dashboard/app/(tenant)/[slug]/mail/message/[id]/page.tsx b/dashboard/src/app/(tenant)/[slug]/mail/message/[id]/page.tsx similarity index 100% rename from dashboard/app/(tenant)/[slug]/mail/message/[id]/page.tsx rename to dashboard/src/app/(tenant)/[slug]/mail/message/[id]/page.tsx diff --git a/dashboard/app/(tenant)/[slug]/mail/page.tsx b/dashboard/src/app/(tenant)/[slug]/mail/page.tsx similarity index 100% rename from dashboard/app/(tenant)/[slug]/mail/page.tsx rename to dashboard/src/app/(tenant)/[slug]/mail/page.tsx diff --git a/dashboard/app/(tenant)/[slug]/mail/settings/page.tsx b/dashboard/src/app/(tenant)/[slug]/mail/settings/page.tsx similarity index 100% rename from dashboard/app/(tenant)/[slug]/mail/settings/page.tsx rename to dashboard/src/app/(tenant)/[slug]/mail/settings/page.tsx diff --git a/dashboard/app/404/page.tsx b/dashboard/src/app/404/page.tsx similarity index 100% rename from dashboard/app/404/page.tsx rename to dashboard/src/app/404/page.tsx diff --git a/dashboard/pages/500.tsx b/dashboard/src/app/500/page.tsx similarity index 100% rename from dashboard/pages/500.tsx rename to dashboard/src/app/500/page.tsx diff --git a/dashboard/app/AppProviders.tsx b/dashboard/src/app/AppProviders.tsx similarity index 92% rename from dashboard/app/AppProviders.tsx rename to dashboard/src/app/AppProviders.tsx index c0417b1..db8bc6c 100644 --- a/dashboard/app/AppProviders.tsx +++ b/dashboard/src/app/AppProviders.tsx @@ -5,7 +5,7 @@ import type { ReactNode } from 'react' import { collectExtensionProviders } from '@cms/client' import { LanguageProvider } from '@i18n/LanguageProvider' import { UserProvider } from '@lib/userStore' -import { ThemeProvider } from '../src/theme' +import { ThemeProvider } from '@components/theme' const extensionProviders = collectExtensionProviders() diff --git a/dashboard/app/[slug]/Client.tsx b/dashboard/src/app/[slug]/Client.tsx similarity index 100% rename from dashboard/app/[slug]/Client.tsx rename to dashboard/src/app/[slug]/Client.tsx diff --git a/dashboard/app/[slug]/page.tsx b/dashboard/src/app/[slug]/page.tsx similarity index 100% rename from dashboard/app/[slug]/page.tsx rename to dashboard/src/app/[slug]/page.tsx diff --git a/dashboard/app/api/admin/settings/route.ts b/dashboard/src/app/api/admin/settings/route.ts similarity index 100% rename from dashboard/app/api/admin/settings/route.ts rename to dashboard/src/app/api/admin/settings/route.ts diff --git a/dashboard/app/api/admin/users/[userId]/role/route.ts b/dashboard/src/app/api/admin/users/[userId]/role/route.ts similarity index 100% rename from dashboard/app/api/admin/users/[userId]/role/route.ts rename to dashboard/src/app/api/admin/users/[userId]/role/route.ts diff --git a/dashboard/app/api/admin/users/metrics/route.ts b/dashboard/src/app/api/admin/users/metrics/route.ts similarity index 100% rename from dashboard/app/api/admin/users/metrics/route.ts rename to dashboard/src/app/api/admin/users/metrics/route.ts diff --git a/dashboard/app/api/agent/[...segments]/route.ts b/dashboard/src/app/api/agent/[...segments]/route.ts similarity index 100% rename from dashboard/app/api/agent/[...segments]/route.ts rename to dashboard/src/app/api/agent/[...segments]/route.ts diff --git a/dashboard/app/api/askai/route.ts b/dashboard/src/app/api/askai/route.ts similarity index 100% rename from dashboard/app/api/askai/route.ts rename to dashboard/src/app/api/askai/route.ts diff --git a/dashboard/app/api/auth/login/route.ts b/dashboard/src/app/api/auth/login/route.ts similarity index 100% rename from dashboard/app/api/auth/login/route.ts rename to dashboard/src/app/api/auth/login/route.ts diff --git a/dashboard/app/api/auth/mfa/disable/route.ts b/dashboard/src/app/api/auth/mfa/disable/route.ts similarity index 100% rename from dashboard/app/api/auth/mfa/disable/route.ts rename to dashboard/src/app/api/auth/mfa/disable/route.ts diff --git a/dashboard/app/api/auth/mfa/setup/route.ts b/dashboard/src/app/api/auth/mfa/setup/route.ts similarity index 100% rename from dashboard/app/api/auth/mfa/setup/route.ts rename to dashboard/src/app/api/auth/mfa/setup/route.ts diff --git a/dashboard/app/api/auth/mfa/status/route.ts b/dashboard/src/app/api/auth/mfa/status/route.ts similarity index 100% rename from dashboard/app/api/auth/mfa/status/route.ts rename to dashboard/src/app/api/auth/mfa/status/route.ts diff --git a/dashboard/app/api/auth/mfa/verify/route.ts b/dashboard/src/app/api/auth/mfa/verify/route.ts similarity index 100% rename from dashboard/app/api/auth/mfa/verify/route.ts rename to dashboard/src/app/api/auth/mfa/verify/route.ts diff --git a/dashboard/app/api/auth/register/route.ts b/dashboard/src/app/api/auth/register/route.ts similarity index 100% rename from dashboard/app/api/auth/register/route.ts rename to dashboard/src/app/api/auth/register/route.ts diff --git a/dashboard/app/api/auth/register/send/route.ts b/dashboard/src/app/api/auth/register/send/route.ts similarity index 100% rename from dashboard/app/api/auth/register/send/route.ts rename to dashboard/src/app/api/auth/register/send/route.ts diff --git a/dashboard/app/api/auth/register/verify/route.ts b/dashboard/src/app/api/auth/register/verify/route.ts similarity index 100% rename from dashboard/app/api/auth/register/verify/route.ts rename to dashboard/src/app/api/auth/register/verify/route.ts diff --git a/dashboard/app/api/auth/session/route.ts b/dashboard/src/app/api/auth/session/route.ts similarity index 100% rename from dashboard/app/api/auth/session/route.ts rename to dashboard/src/app/api/auth/session/route.ts diff --git a/dashboard/app/api/auth/verify-email/route.ts b/dashboard/src/app/api/auth/verify-email/route.ts similarity index 100% rename from dashboard/app/api/auth/verify-email/route.ts rename to dashboard/src/app/api/auth/verify-email/route.ts diff --git a/dashboard/app/api/auth/verify-email/send/route.ts b/dashboard/src/app/api/auth/verify-email/send/route.ts similarity index 100% rename from dashboard/app/api/auth/verify-email/send/route.ts rename to dashboard/src/app/api/auth/verify-email/send/route.ts diff --git a/dashboard/app/api/content-meta/route.ts b/dashboard/src/app/api/content-meta/route.ts similarity index 89% rename from dashboard/app/api/content-meta/route.ts rename to dashboard/src/app/api/content-meta/route.ts index 6aafdc9..1762de5 100644 --- a/dashboard/app/api/content-meta/route.ts +++ b/dashboard/src/app/api/content-meta/route.ts @@ -1,6 +1,6 @@ import { NextRequest, NextResponse } from 'next/server' -import { ContentNotFoundError, getContentCommitMeta } from '../../../api/content-meta' +import { ContentNotFoundError, getContentCommitMeta } from '@server/content-meta' export const runtime = 'nodejs' diff --git a/dashboard/app/api/mail/ai/classify/route.ts b/dashboard/src/app/api/mail/ai/classify/route.ts similarity index 100% rename from dashboard/app/api/mail/ai/classify/route.ts rename to dashboard/src/app/api/mail/ai/classify/route.ts diff --git a/dashboard/app/api/mail/ai/reply-suggest/route.ts b/dashboard/src/app/api/mail/ai/reply-suggest/route.ts similarity index 100% rename from dashboard/app/api/mail/ai/reply-suggest/route.ts rename to dashboard/src/app/api/mail/ai/reply-suggest/route.ts diff --git a/dashboard/app/api/mail/ai/summarize/route.ts b/dashboard/src/app/api/mail/ai/summarize/route.ts similarity index 100% rename from dashboard/app/api/mail/ai/summarize/route.ts rename to dashboard/src/app/api/mail/ai/summarize/route.ts diff --git a/dashboard/app/api/mail/inbox/route.ts b/dashboard/src/app/api/mail/inbox/route.ts similarity index 100% rename from dashboard/app/api/mail/inbox/route.ts rename to dashboard/src/app/api/mail/inbox/route.ts diff --git a/dashboard/app/api/mail/message/[id]/route.ts b/dashboard/src/app/api/mail/message/[id]/route.ts similarity index 100% rename from dashboard/app/api/mail/message/[id]/route.ts rename to dashboard/src/app/api/mail/message/[id]/route.ts diff --git a/dashboard/app/api/mail/mockData.ts b/dashboard/src/app/api/mail/mockData.ts similarity index 100% rename from dashboard/app/api/mail/mockData.ts rename to dashboard/src/app/api/mail/mockData.ts diff --git a/dashboard/app/api/mail/namespace/route.ts b/dashboard/src/app/api/mail/namespace/route.ts similarity index 100% rename from dashboard/app/api/mail/namespace/route.ts rename to dashboard/src/app/api/mail/namespace/route.ts diff --git a/dashboard/app/api/mail/send/route.ts b/dashboard/src/app/api/mail/send/route.ts similarity index 100% rename from dashboard/app/api/mail/send/route.ts rename to dashboard/src/app/api/mail/send/route.ts diff --git a/dashboard/app/api/ping/route.ts b/dashboard/src/app/api/ping/route.ts similarity index 100% rename from dashboard/app/api/ping/route.ts rename to dashboard/src/app/api/ping/route.ts diff --git a/dashboard/app/api/rag/query/route.ts b/dashboard/src/app/api/rag/query/route.ts similarity index 100% rename from dashboard/app/api/rag/query/route.ts rename to dashboard/src/app/api/rag/query/route.ts diff --git a/dashboard/app/api/render-markdown/route.ts b/dashboard/src/app/api/render-markdown/route.ts similarity index 89% rename from dashboard/app/api/render-markdown/route.ts rename to dashboard/src/app/api/render-markdown/route.ts index a3fc8a2..90618b9 100644 --- a/dashboard/app/api/render-markdown/route.ts +++ b/dashboard/src/app/api/render-markdown/route.ts @@ -1,6 +1,6 @@ import { NextRequest, NextResponse } from 'next/server' -import { ContentNotFoundError, renderMarkdownFile } from '../../../api/render-markdown' +import { ContentNotFoundError, renderMarkdownFile } from '@server/render-markdown' export const runtime = 'nodejs' diff --git a/dashboard/app/api/task/[...segments]/route.ts b/dashboard/src/app/api/task/[...segments]/route.ts similarity index 100% rename from dashboard/app/api/task/[...segments]/route.ts rename to dashboard/src/app/api/task/[...segments]/route.ts diff --git a/dashboard/app/api/users/route.ts b/dashboard/src/app/api/users/route.ts similarity index 100% rename from dashboard/app/api/users/route.ts rename to dashboard/src/app/api/users/route.ts diff --git a/dashboard/app/cloud_iac/README.md b/dashboard/src/app/cloud_iac/README.md similarity index 100% rename from dashboard/app/cloud_iac/README.md rename to dashboard/src/app/cloud_iac/README.md diff --git a/dashboard/app/cloud_iac/[provider]/[service]/page.tsx b/dashboard/src/app/cloud_iac/[provider]/[service]/page.tsx similarity index 100% rename from dashboard/app/cloud_iac/[provider]/[service]/page.tsx rename to dashboard/src/app/cloud_iac/[provider]/[service]/page.tsx diff --git a/dashboard/app/cloud_iac/[provider]/page.tsx b/dashboard/src/app/cloud_iac/[provider]/page.tsx similarity index 100% rename from dashboard/app/cloud_iac/[provider]/page.tsx rename to dashboard/src/app/cloud_iac/[provider]/page.tsx diff --git a/dashboard/app/cloud_iac/page.tsx b/dashboard/src/app/cloud_iac/page.tsx similarity index 100% rename from dashboard/app/cloud_iac/page.tsx rename to dashboard/src/app/cloud_iac/page.tsx diff --git a/dashboard/app/components/ClientTime.tsx b/dashboard/src/app/components/ClientTime.tsx similarity index 100% rename from dashboard/app/components/ClientTime.tsx rename to dashboard/src/app/components/ClientTime.tsx diff --git a/dashboard/app/components/icons/WeChatIcon.tsx b/dashboard/src/app/components/icons/WeChatIcon.tsx similarity index 100% rename from dashboard/app/components/icons/WeChatIcon.tsx rename to dashboard/src/app/components/icons/WeChatIcon.tsx diff --git a/dashboard/app/components/insight/ai/Assistant.tsx b/dashboard/src/app/components/insight/ai/Assistant.tsx similarity index 100% rename from dashboard/app/components/insight/ai/Assistant.tsx rename to dashboard/src/app/components/insight/ai/Assistant.tsx diff --git a/dashboard/app/components/insight/explore/ExploreBuilder.tsx b/dashboard/src/app/components/insight/explore/ExploreBuilder.tsx similarity index 100% rename from dashboard/app/components/insight/explore/ExploreBuilder.tsx rename to dashboard/src/app/components/insight/explore/ExploreBuilder.tsx diff --git a/dashboard/app/components/insight/layout/BreadcrumbBar.tsx b/dashboard/src/app/components/insight/layout/BreadcrumbBar.tsx similarity index 100% rename from dashboard/app/components/insight/layout/BreadcrumbBar.tsx rename to dashboard/src/app/components/insight/layout/BreadcrumbBar.tsx diff --git a/dashboard/app/components/insight/layout/Sidebar.tsx b/dashboard/src/app/components/insight/layout/Sidebar.tsx similarity index 100% rename from dashboard/app/components/insight/layout/Sidebar.tsx rename to dashboard/src/app/components/insight/layout/Sidebar.tsx diff --git a/dashboard/app/components/insight/layout/TimeRangePicker.tsx b/dashboard/src/app/components/insight/layout/TimeRangePicker.tsx similarity index 100% rename from dashboard/app/components/insight/layout/TimeRangePicker.tsx rename to dashboard/src/app/components/insight/layout/TimeRangePicker.tsx diff --git a/dashboard/app/components/insight/layout/WorkspaceGrid.tsx b/dashboard/src/app/components/insight/layout/WorkspaceGrid.tsx similarity index 100% rename from dashboard/app/components/insight/layout/WorkspaceGrid.tsx rename to dashboard/src/app/components/insight/layout/WorkspaceGrid.tsx diff --git a/dashboard/app/components/insight/layout/WorkspaceHeader.tsx b/dashboard/src/app/components/insight/layout/WorkspaceHeader.tsx similarity index 100% rename from dashboard/app/components/insight/layout/WorkspaceHeader.tsx rename to dashboard/src/app/components/insight/layout/WorkspaceHeader.tsx diff --git a/dashboard/app/components/insight/services/adapters/logs.ts b/dashboard/src/app/components/insight/services/adapters/logs.ts similarity index 100% rename from dashboard/app/components/insight/services/adapters/logs.ts rename to dashboard/src/app/components/insight/services/adapters/logs.ts diff --git a/dashboard/app/components/insight/services/adapters/openobserve.ts b/dashboard/src/app/components/insight/services/adapters/openobserve.ts similarity index 100% rename from dashboard/app/components/insight/services/adapters/openobserve.ts rename to dashboard/src/app/components/insight/services/adapters/openobserve.ts diff --git a/dashboard/app/components/insight/services/adapters/prometheus.ts b/dashboard/src/app/components/insight/services/adapters/prometheus.ts similarity index 100% rename from dashboard/app/components/insight/services/adapters/prometheus.ts rename to dashboard/src/app/components/insight/services/adapters/prometheus.ts diff --git a/dashboard/app/components/insight/services/adapters/traces.ts b/dashboard/src/app/components/insight/services/adapters/traces.ts similarity index 100% rename from dashboard/app/components/insight/services/adapters/traces.ts rename to dashboard/src/app/components/insight/services/adapters/traces.ts diff --git a/dashboard/app/components/insight/services/correlator.ts b/dashboard/src/app/components/insight/services/correlator.ts similarity index 100% rename from dashboard/app/components/insight/services/correlator.ts rename to dashboard/src/app/components/insight/services/correlator.ts diff --git a/dashboard/app/components/insight/services/gitops.ts b/dashboard/src/app/components/insight/services/gitops.ts similarity index 100% rename from dashboard/app/components/insight/services/gitops.ts rename to dashboard/src/app/components/insight/services/gitops.ts diff --git a/dashboard/app/components/insight/slo/AlertWizard.tsx b/dashboard/src/app/components/insight/slo/AlertWizard.tsx similarity index 100% rename from dashboard/app/components/insight/slo/AlertWizard.tsx rename to dashboard/src/app/components/insight/slo/AlertWizard.tsx diff --git a/dashboard/app/components/insight/slo/SLOPanel.tsx b/dashboard/src/app/components/insight/slo/SLOPanel.tsx similarity index 100% rename from dashboard/app/components/insight/slo/SLOPanel.tsx rename to dashboard/src/app/components/insight/slo/SLOPanel.tsx diff --git a/dashboard/app/components/insight/snippets/SnippetLibrary.tsx b/dashboard/src/app/components/insight/snippets/SnippetLibrary.tsx similarity index 100% rename from dashboard/app/components/insight/snippets/SnippetLibrary.tsx rename to dashboard/src/app/components/insight/snippets/SnippetLibrary.tsx diff --git a/dashboard/app/components/insight/store/urlState.ts b/dashboard/src/app/components/insight/store/urlState.ts similarity index 100% rename from dashboard/app/components/insight/store/urlState.ts rename to dashboard/src/app/components/insight/store/urlState.ts diff --git a/dashboard/app/components/insight/store/useInsightState.ts b/dashboard/src/app/components/insight/store/useInsightState.ts similarity index 100% rename from dashboard/app/components/insight/store/useInsightState.ts rename to dashboard/src/app/components/insight/store/useInsightState.ts diff --git a/dashboard/app/components/insight/topology/NetworkTopologyPanel.tsx b/dashboard/src/app/components/insight/topology/NetworkTopologyPanel.tsx similarity index 100% rename from dashboard/app/components/insight/topology/NetworkTopologyPanel.tsx rename to dashboard/src/app/components/insight/topology/NetworkTopologyPanel.tsx diff --git a/dashboard/app/components/insight/topology/TopologyCanvas.tsx b/dashboard/src/app/components/insight/topology/TopologyCanvas.tsx similarity index 100% rename from dashboard/app/components/insight/topology/TopologyCanvas.tsx rename to dashboard/src/app/components/insight/topology/TopologyCanvas.tsx diff --git a/dashboard/app/components/insight/topology/types.ts b/dashboard/src/app/components/insight/topology/types.ts similarity index 100% rename from dashboard/app/components/insight/topology/types.ts rename to dashboard/src/app/components/insight/topology/types.ts diff --git a/dashboard/app/components/insight/viz/LogsTable.tsx b/dashboard/src/app/components/insight/viz/LogsTable.tsx similarity index 100% rename from dashboard/app/components/insight/viz/LogsTable.tsx rename to dashboard/src/app/components/insight/viz/LogsTable.tsx diff --git a/dashboard/app/components/insight/viz/LogsTopStats.tsx b/dashboard/src/app/components/insight/viz/LogsTopStats.tsx similarity index 100% rename from dashboard/app/components/insight/viz/LogsTopStats.tsx rename to dashboard/src/app/components/insight/viz/LogsTopStats.tsx diff --git a/dashboard/app/components/insight/viz/LogsViewer.tsx b/dashboard/src/app/components/insight/viz/LogsViewer.tsx similarity index 100% rename from dashboard/app/components/insight/viz/LogsViewer.tsx rename to dashboard/src/app/components/insight/viz/LogsViewer.tsx diff --git a/dashboard/app/components/insight/viz/MetricsChart.tsx b/dashboard/src/app/components/insight/viz/MetricsChart.tsx similarity index 100% rename from dashboard/app/components/insight/viz/MetricsChart.tsx rename to dashboard/src/app/components/insight/viz/MetricsChart.tsx diff --git a/dashboard/app/components/insight/viz/MetricsTable.tsx b/dashboard/src/app/components/insight/viz/MetricsTable.tsx similarity index 100% rename from dashboard/app/components/insight/viz/MetricsTable.tsx rename to dashboard/src/app/components/insight/viz/MetricsTable.tsx diff --git a/dashboard/app/components/insight/viz/MetricsTopStats.tsx b/dashboard/src/app/components/insight/viz/MetricsTopStats.tsx similarity index 100% rename from dashboard/app/components/insight/viz/MetricsTopStats.tsx rename to dashboard/src/app/components/insight/viz/MetricsTopStats.tsx diff --git a/dashboard/app/components/insight/viz/TracesTable.tsx b/dashboard/src/app/components/insight/viz/TracesTable.tsx similarity index 100% rename from dashboard/app/components/insight/viz/TracesTable.tsx rename to dashboard/src/app/components/insight/viz/TracesTable.tsx diff --git a/dashboard/app/components/insight/viz/TracesTopStats.tsx b/dashboard/src/app/components/insight/viz/TracesTopStats.tsx similarity index 100% rename from dashboard/app/components/insight/viz/TracesTopStats.tsx rename to dashboard/src/app/components/insight/viz/TracesTopStats.tsx diff --git a/dashboard/app/components/insight/viz/TracesWaterfall.tsx b/dashboard/src/app/components/insight/viz/TracesWaterfall.tsx similarity index 100% rename from dashboard/app/components/insight/viz/TracesWaterfall.tsx rename to dashboard/src/app/components/insight/viz/TracesWaterfall.tsx diff --git a/dashboard/app/components/insight/viz/VizArea.tsx b/dashboard/src/app/components/insight/viz/VizArea.tsx similarity index 100% rename from dashboard/app/components/insight/viz/VizArea.tsx rename to dashboard/src/app/components/insight/viz/VizArea.tsx diff --git a/dashboard/app/components/mail/ComposeForm.tsx b/dashboard/src/app/components/mail/ComposeForm.tsx similarity index 100% rename from dashboard/app/components/mail/ComposeForm.tsx rename to dashboard/src/app/components/mail/ComposeForm.tsx diff --git a/dashboard/app/components/mail/Inbox.tsx b/dashboard/src/app/components/mail/Inbox.tsx similarity index 100% rename from dashboard/app/components/mail/Inbox.tsx rename to dashboard/src/app/components/mail/Inbox.tsx diff --git a/dashboard/app/components/mail/MailCenter.tsx b/dashboard/src/app/components/mail/MailCenter.tsx similarity index 100% rename from dashboard/app/components/mail/MailCenter.tsx rename to dashboard/src/app/components/mail/MailCenter.tsx diff --git a/dashboard/app/components/mail/MailDashboard.tsx b/dashboard/src/app/components/mail/MailDashboard.tsx similarity index 100% rename from dashboard/app/components/mail/MailDashboard.tsx rename to dashboard/src/app/components/mail/MailDashboard.tsx diff --git a/dashboard/app/components/mail/MailSettings.tsx b/dashboard/src/app/components/mail/MailSettings.tsx similarity index 100% rename from dashboard/app/components/mail/MailSettings.tsx rename to dashboard/src/app/components/mail/MailSettings.tsx diff --git a/dashboard/app/components/mail/MessageItem.tsx b/dashboard/src/app/components/mail/MessageItem.tsx similarity index 100% rename from dashboard/app/components/mail/MessageItem.tsx rename to dashboard/src/app/components/mail/MessageItem.tsx diff --git a/dashboard/app/components/mail/MessageView.tsx b/dashboard/src/app/components/mail/MessageView.tsx similarity index 100% rename from dashboard/app/components/mail/MessageView.tsx rename to dashboard/src/app/components/mail/MessageView.tsx diff --git a/dashboard/app/components/mail/Toolbar.tsx b/dashboard/src/app/components/mail/Toolbar.tsx similarity index 100% rename from dashboard/app/components/mail/Toolbar.tsx rename to dashboard/src/app/components/mail/Toolbar.tsx diff --git a/dashboard/app/demo/DemoContent.tsx b/dashboard/src/app/demo/DemoContent.tsx similarity index 100% rename from dashboard/app/demo/DemoContent.tsx rename to dashboard/src/app/demo/DemoContent.tsx diff --git a/dashboard/app/demo/markdown/page.tsx b/dashboard/src/app/demo/markdown/page.tsx similarity index 67% rename from dashboard/app/demo/markdown/page.tsx rename to dashboard/src/app/demo/markdown/page.tsx index 2ecf54a..aef7f5d 100644 --- a/dashboard/app/demo/markdown/page.tsx +++ b/dashboard/src/app/demo/markdown/page.tsx @@ -1,4 +1,4 @@ -import HomepageLanding from '../../../ui/homepage/page' +import HomepageLanding from '@modules/homepage/page' export const dynamic = 'force-static' diff --git a/dashboard/app/demo/page.tsx b/dashboard/src/app/demo/page.tsx similarity index 100% rename from dashboard/app/demo/page.tsx rename to dashboard/src/app/demo/page.tsx diff --git a/dashboard/app/demo/theme/page.tsx b/dashboard/src/app/demo/theme/page.tsx similarity index 96% rename from dashboard/app/demo/theme/page.tsx rename to dashboard/src/app/demo/theme/page.tsx index 9c4f6bb..a67dc81 100644 --- a/dashboard/app/demo/theme/page.tsx +++ b/dashboard/src/app/demo/theme/page.tsx @@ -2,8 +2,8 @@ import ThemePreferenceCard from '../../panel/account/ThemePreferenceCard' import Card from '../../panel/components/Card' -import { useTheme } from '../../../src/theme' -import type { ThemeTokens } from '../../../src/theme' +import { useTheme } from '@components/theme' +import type { ThemeTokens } from '@components/theme' const COLOR_TOKENS: Array<{ key: keyof ThemeTokens['colors']; label: string }> = [ { key: 'background', label: '背景 Background' }, diff --git a/dashboard/app/docs/DocCollectionCard.tsx b/dashboard/src/app/docs/DocCollectionCard.tsx similarity index 100% rename from dashboard/app/docs/DocCollectionCard.tsx rename to dashboard/src/app/docs/DocCollectionCard.tsx diff --git a/dashboard/app/docs/[collection]/[version]/DocCollectionView.tsx b/dashboard/src/app/docs/[collection]/[version]/DocCollectionView.tsx similarity index 100% rename from dashboard/app/docs/[collection]/[version]/DocCollectionView.tsx rename to dashboard/src/app/docs/[collection]/[version]/DocCollectionView.tsx diff --git a/dashboard/app/docs/[collection]/[version]/DocReader.tsx b/dashboard/src/app/docs/[collection]/[version]/DocReader.tsx similarity index 100% rename from dashboard/app/docs/[collection]/[version]/DocReader.tsx rename to dashboard/src/app/docs/[collection]/[version]/DocReader.tsx diff --git a/dashboard/app/docs/[collection]/[version]/DocViewSection.tsx b/dashboard/src/app/docs/[collection]/[version]/DocViewSection.tsx similarity index 100% rename from dashboard/app/docs/[collection]/[version]/DocViewSection.tsx rename to dashboard/src/app/docs/[collection]/[version]/DocViewSection.tsx diff --git a/dashboard/app/docs/[collection]/[version]/page.tsx b/dashboard/src/app/docs/[collection]/[version]/page.tsx similarity index 100% rename from dashboard/app/docs/[collection]/[version]/page.tsx rename to dashboard/src/app/docs/[collection]/[version]/page.tsx diff --git a/dashboard/app/docs/[collection]/page.tsx b/dashboard/src/app/docs/[collection]/page.tsx similarity index 100% rename from dashboard/app/docs/[collection]/page.tsx rename to dashboard/src/app/docs/[collection]/page.tsx diff --git a/dashboard/app/docs/page.tsx b/dashboard/src/app/docs/page.tsx similarity index 100% rename from dashboard/app/docs/page.tsx rename to dashboard/src/app/docs/page.tsx diff --git a/dashboard/app/docs/resources.server.ts b/dashboard/src/app/docs/resources.server.ts similarity index 100% rename from dashboard/app/docs/resources.server.ts rename to dashboard/src/app/docs/resources.server.ts diff --git a/dashboard/app/docs/types.ts b/dashboard/src/app/docs/types.ts similarity index 100% rename from dashboard/app/docs/types.ts rename to dashboard/src/app/docs/types.ts diff --git a/dashboard/app/docs/utils.ts b/dashboard/src/app/docs/utils.ts similarity index 100% rename from dashboard/app/docs/utils.ts rename to dashboard/src/app/docs/utils.ts diff --git a/dashboard/app/download/[...segments]/page.tsx b/dashboard/src/app/download/[...segments]/page.tsx similarity index 100% rename from dashboard/app/download/[...segments]/page.tsx rename to dashboard/src/app/download/[...segments]/page.tsx diff --git a/dashboard/app/download/page.tsx b/dashboard/src/app/download/page.tsx similarity index 100% rename from dashboard/app/download/page.tsx rename to dashboard/src/app/download/page.tsx diff --git a/dashboard/app/globals.css b/dashboard/src/app/globals.css similarity index 100% rename from dashboard/app/globals.css rename to dashboard/src/app/globals.css diff --git a/dashboard/app/insight/InsightWorkbench.tsx b/dashboard/src/app/insight/InsightWorkbench.tsx similarity index 100% rename from dashboard/app/insight/InsightWorkbench.tsx rename to dashboard/src/app/insight/InsightWorkbench.tsx diff --git a/dashboard/app/insight/page.tsx b/dashboard/src/app/insight/page.tsx similarity index 100% rename from dashboard/app/insight/page.tsx rename to dashboard/src/app/insight/page.tsx diff --git a/dashboard/app/layout.tsx b/dashboard/src/app/layout.tsx similarity index 100% rename from dashboard/app/layout.tsx rename to dashboard/src/app/layout.tsx diff --git a/dashboard/app/logout/LogoutClient.tsx b/dashboard/src/app/logout/LogoutClient.tsx similarity index 100% rename from dashboard/app/logout/LogoutClient.tsx rename to dashboard/src/app/logout/LogoutClient.tsx diff --git a/dashboard/app/logout/page.tsx b/dashboard/src/app/logout/page.tsx similarity index 100% rename from dashboard/app/logout/page.tsx rename to dashboard/src/app/logout/page.tsx diff --git a/dashboard/app/page.tsx b/dashboard/src/app/page.tsx similarity index 84% rename from dashboard/app/page.tsx rename to dashboard/src/app/page.tsx index 7d8db33..4d23412 100644 --- a/dashboard/app/page.tsx +++ b/dashboard/src/app/page.tsx @@ -3,10 +3,10 @@ export const dynamic = 'error' import ArticleFeed from '@components/home/ArticleFeed' import ProductMatrix from '@components/home/ProductMatrix' import Sidebar from '@components/home/Sidebar' -import HomepageLanding from '../ui/homepage/page' +import HomepageLanding from '@modules/homepage/page' import { isFeatureEnabled } from '@lib/featureToggles' -import { getActiveTemplate } from '../src/templateRegistry' +import { getActiveTemplate } from '@modules/templateRegistry' export default function HomePage() { if (!isFeatureEnabled('cmsExperience', '/homepage/dynamic')) { diff --git a/dashboard/src/app/panel/account/ThemePreferenceCard.tsx b/dashboard/src/app/panel/account/ThemePreferenceCard.tsx new file mode 100644 index 0000000..4428a3b --- /dev/null +++ b/dashboard/src/app/panel/account/ThemePreferenceCard.tsx @@ -0,0 +1 @@ +export { default } from '@extensions/builtin/user-center/account/ThemePreferenceCard' diff --git a/dashboard/app/panel/account/page.tsx b/dashboard/src/app/panel/account/page.tsx similarity index 100% rename from dashboard/app/panel/account/page.tsx rename to dashboard/src/app/panel/account/page.tsx diff --git a/dashboard/app/panel/agent/page.tsx b/dashboard/src/app/panel/agent/page.tsx similarity index 100% rename from dashboard/app/panel/agent/page.tsx rename to dashboard/src/app/panel/agent/page.tsx diff --git a/dashboard/app/panel/api/page.tsx b/dashboard/src/app/panel/api/page.tsx similarity index 100% rename from dashboard/app/panel/api/page.tsx rename to dashboard/src/app/panel/api/page.tsx diff --git a/dashboard/app/panel/appearance/page.tsx b/dashboard/src/app/panel/appearance/page.tsx similarity index 100% rename from dashboard/app/panel/appearance/page.tsx rename to dashboard/src/app/panel/appearance/page.tsx diff --git a/dashboard/src/app/panel/components/Card.tsx b/dashboard/src/app/panel/components/Card.tsx new file mode 100644 index 0000000..5c35e11 --- /dev/null +++ b/dashboard/src/app/panel/components/Card.tsx @@ -0,0 +1 @@ +export { default } from '@extensions/builtin/user-center/components/Card' diff --git a/dashboard/app/panel/components/Header.tsx b/dashboard/src/app/panel/components/Header.tsx similarity index 100% rename from dashboard/app/panel/components/Header.tsx rename to dashboard/src/app/panel/components/Header.tsx diff --git a/dashboard/app/panel/components/Sidebar.tsx b/dashboard/src/app/panel/components/Sidebar.tsx similarity index 100% rename from dashboard/app/panel/components/Sidebar.tsx rename to dashboard/src/app/panel/components/Sidebar.tsx diff --git a/dashboard/app/panel/layout.tsx b/dashboard/src/app/panel/layout.tsx similarity index 100% rename from dashboard/app/panel/layout.tsx rename to dashboard/src/app/panel/layout.tsx diff --git a/dashboard/app/panel/ldp/page.tsx b/dashboard/src/app/panel/ldp/page.tsx similarity index 100% rename from dashboard/app/panel/ldp/page.tsx rename to dashboard/src/app/panel/ldp/page.tsx diff --git a/dashboard/app/panel/loading.tsx b/dashboard/src/app/panel/loading.tsx similarity index 100% rename from dashboard/app/panel/loading.tsx rename to dashboard/src/app/panel/loading.tsx diff --git a/dashboard/app/panel/mail/page.tsx b/dashboard/src/app/panel/mail/page.tsx similarity index 100% rename from dashboard/app/panel/mail/page.tsx rename to dashboard/src/app/panel/mail/page.tsx diff --git a/dashboard/app/panel/management/page.tsx b/dashboard/src/app/panel/management/page.tsx similarity index 100% rename from dashboard/app/panel/management/page.tsx rename to dashboard/src/app/panel/management/page.tsx diff --git a/dashboard/app/panel/page.tsx b/dashboard/src/app/panel/page.tsx similarity index 100% rename from dashboard/app/panel/page.tsx rename to dashboard/src/app/panel/page.tsx diff --git a/dashboard/app/panel/subscription/page.tsx b/dashboard/src/app/panel/subscription/page.tsx similarity index 100% rename from dashboard/app/panel/subscription/page.tsx rename to dashboard/src/app/panel/subscription/page.tsx diff --git a/dashboard/app/store/mail.store.ts b/dashboard/src/app/store/mail.store.ts similarity index 100% rename from dashboard/app/store/mail.store.ts rename to dashboard/src/app/store/mail.store.ts diff --git a/dashboard/components/AskAIButton.tsx b/dashboard/src/components/AskAIButton.tsx similarity index 100% rename from dashboard/components/AskAIButton.tsx rename to dashboard/src/components/AskAIButton.tsx diff --git a/dashboard/components/AskAIDialog.tsx b/dashboard/src/components/AskAIDialog.tsx similarity index 100% rename from dashboard/components/AskAIDialog.tsx rename to dashboard/src/components/AskAIDialog.tsx diff --git a/dashboard/components/ChatBubble.tsx b/dashboard/src/components/ChatBubble.tsx similarity index 100% rename from dashboard/components/ChatBubble.tsx rename to dashboard/src/components/ChatBubble.tsx diff --git a/dashboard/components/Contact.tsx b/dashboard/src/components/Contact.tsx similarity index 100% rename from dashboard/components/Contact.tsx rename to dashboard/src/components/Contact.tsx diff --git a/dashboard/components/DownloadSection.tsx b/dashboard/src/components/DownloadSection.tsx similarity index 100% rename from dashboard/components/DownloadSection.tsx rename to dashboard/src/components/DownloadSection.tsx diff --git a/dashboard/components/Features.tsx b/dashboard/src/components/Features.tsx similarity index 100% rename from dashboard/components/Features.tsx rename to dashboard/src/components/Features.tsx diff --git a/dashboard/components/Footer.tsx b/dashboard/src/components/Footer.tsx similarity index 100% rename from dashboard/components/Footer.tsx rename to dashboard/src/components/Footer.tsx diff --git a/dashboard/components/Hero.tsx b/dashboard/src/components/Hero.tsx similarity index 100% rename from dashboard/components/Hero.tsx rename to dashboard/src/components/Hero.tsx diff --git a/dashboard/components/LanguageToggle.tsx b/dashboard/src/components/LanguageToggle.tsx similarity index 100% rename from dashboard/components/LanguageToggle.tsx rename to dashboard/src/components/LanguageToggle.tsx diff --git a/dashboard/ui/components/MarkdownSection.tsx b/dashboard/src/components/MarkdownSection.tsx similarity index 98% rename from dashboard/ui/components/MarkdownSection.tsx rename to dashboard/src/components/MarkdownSection.tsx index 9c18c9d..7f8e043 100644 --- a/dashboard/ui/components/MarkdownSection.tsx +++ b/dashboard/src/components/MarkdownSection.tsx @@ -4,7 +4,7 @@ import { useEffect, useMemo, useState, type ReactNode } from 'react' import type { JSX } from 'react' import clsx from 'clsx' -import type { MarkdownRenderResult } from '../../api/render-markdown' +import type { MarkdownRenderResult } from '@server/render-markdown' type MarkdownSectionProps = { src: string diff --git a/dashboard/components/Navbar.tsx b/dashboard/src/components/Navbar.tsx similarity index 100% rename from dashboard/components/Navbar.tsx rename to dashboard/src/components/Navbar.tsx diff --git a/dashboard/components/OpenSource.tsx b/dashboard/src/components/OpenSource.tsx similarity index 100% rename from dashboard/components/OpenSource.tsx rename to dashboard/src/components/OpenSource.tsx diff --git a/dashboard/components/ReleaseChannelSelector.tsx b/dashboard/src/components/ReleaseChannelSelector.tsx similarity index 100% rename from dashboard/components/ReleaseChannelSelector.tsx rename to dashboard/src/components/ReleaseChannelSelector.tsx diff --git a/dashboard/components/SourceHint.tsx b/dashboard/src/components/SourceHint.tsx similarity index 100% rename from dashboard/components/SourceHint.tsx rename to dashboard/src/components/SourceHint.tsx diff --git a/dashboard/components/Terms.tsx b/dashboard/src/components/Terms.tsx similarity index 100% rename from dashboard/components/Terms.tsx rename to dashboard/src/components/Terms.tsx diff --git a/dashboard/components/auth/AuthLayout.tsx b/dashboard/src/components/auth/AuthLayout.tsx similarity index 100% rename from dashboard/components/auth/AuthLayout.tsx rename to dashboard/src/components/auth/AuthLayout.tsx diff --git a/dashboard/components/common/QueryChips.tsx b/dashboard/src/components/common/QueryChips.tsx similarity index 100% rename from dashboard/components/common/QueryChips.tsx rename to dashboard/src/components/common/QueryChips.tsx diff --git a/dashboard/components/common/QueryHistoryPanel.tsx b/dashboard/src/components/common/QueryHistoryPanel.tsx similarity index 100% rename from dashboard/components/common/QueryHistoryPanel.tsx rename to dashboard/src/components/common/QueryHistoryPanel.tsx diff --git a/dashboard/components/download/Breadcrumbs.tsx b/dashboard/src/components/download/Breadcrumbs.tsx similarity index 100% rename from dashboard/components/download/Breadcrumbs.tsx rename to dashboard/src/components/download/Breadcrumbs.tsx diff --git a/dashboard/components/download/CardGrid.tsx b/dashboard/src/components/download/CardGrid.tsx similarity index 100% rename from dashboard/components/download/CardGrid.tsx rename to dashboard/src/components/download/CardGrid.tsx diff --git a/dashboard/components/download/CopyButton.tsx b/dashboard/src/components/download/CopyButton.tsx similarity index 100% rename from dashboard/components/download/CopyButton.tsx rename to dashboard/src/components/download/CopyButton.tsx diff --git a/dashboard/components/download/DownloadBrowser.tsx b/dashboard/src/components/download/DownloadBrowser.tsx similarity index 100% rename from dashboard/components/download/DownloadBrowser.tsx rename to dashboard/src/components/download/DownloadBrowser.tsx diff --git a/dashboard/components/download/DownloadListingContent.tsx b/dashboard/src/components/download/DownloadListingContent.tsx similarity index 100% rename from dashboard/components/download/DownloadListingContent.tsx rename to dashboard/src/components/download/DownloadListingContent.tsx diff --git a/dashboard/components/download/DownloadNotFound.tsx b/dashboard/src/components/download/DownloadNotFound.tsx similarity index 100% rename from dashboard/components/download/DownloadNotFound.tsx rename to dashboard/src/components/download/DownloadNotFound.tsx diff --git a/dashboard/components/download/DownloadSummary.tsx b/dashboard/src/components/download/DownloadSummary.tsx similarity index 100% rename from dashboard/components/download/DownloadSummary.tsx rename to dashboard/src/components/download/DownloadSummary.tsx diff --git a/dashboard/components/download/FileTable.tsx b/dashboard/src/components/download/FileTable.tsx similarity index 100% rename from dashboard/components/download/FileTable.tsx rename to dashboard/src/components/download/FileTable.tsx diff --git a/dashboard/components/download/MarkdownPanel.tsx b/dashboard/src/components/download/MarkdownPanel.tsx similarity index 100% rename from dashboard/components/download/MarkdownPanel.tsx rename to dashboard/src/components/download/MarkdownPanel.tsx diff --git a/dashboard/components/home/ArticleFeed.tsx b/dashboard/src/components/home/ArticleFeed.tsx similarity index 100% rename from dashboard/components/home/ArticleFeed.tsx rename to dashboard/src/components/home/ArticleFeed.tsx diff --git a/dashboard/components/home/ArticleFeedClient.tsx b/dashboard/src/components/home/ArticleFeedClient.tsx similarity index 100% rename from dashboard/components/home/ArticleFeedClient.tsx rename to dashboard/src/components/home/ArticleFeedClient.tsx diff --git a/dashboard/components/home/CommunityFeed.tsx b/dashboard/src/components/home/CommunityFeed.tsx similarity index 100% rename from dashboard/components/home/CommunityFeed.tsx rename to dashboard/src/components/home/CommunityFeed.tsx diff --git a/dashboard/components/home/ContactPanel.tsx b/dashboard/src/components/home/ContactPanel.tsx similarity index 100% rename from dashboard/components/home/ContactPanel.tsx rename to dashboard/src/components/home/ContactPanel.tsx diff --git a/dashboard/components/home/ContactPanelClient.tsx b/dashboard/src/components/home/ContactPanelClient.tsx similarity index 100% rename from dashboard/components/home/ContactPanelClient.tsx rename to dashboard/src/components/home/ContactPanelClient.tsx diff --git a/dashboard/components/home/HeroBanner.tsx b/dashboard/src/components/home/HeroBanner.tsx similarity index 100% rename from dashboard/components/home/HeroBanner.tsx rename to dashboard/src/components/home/HeroBanner.tsx diff --git a/dashboard/components/home/HeroBannerClient.tsx b/dashboard/src/components/home/HeroBannerClient.tsx similarity index 100% rename from dashboard/components/home/HeroBannerClient.tsx rename to dashboard/src/components/home/HeroBannerClient.tsx diff --git a/dashboard/components/home/HeroProductTabs.tsx b/dashboard/src/components/home/HeroProductTabs.tsx similarity index 100% rename from dashboard/components/home/HeroProductTabs.tsx rename to dashboard/src/components/home/HeroProductTabs.tsx diff --git a/dashboard/components/home/ProductMatrix.tsx b/dashboard/src/components/home/ProductMatrix.tsx similarity index 100% rename from dashboard/components/home/ProductMatrix.tsx rename to dashboard/src/components/home/ProductMatrix.tsx diff --git a/dashboard/components/home/ProductMatrixClient.tsx b/dashboard/src/components/home/ProductMatrixClient.tsx similarity index 100% rename from dashboard/components/home/ProductMatrixClient.tsx rename to dashboard/src/components/home/ProductMatrixClient.tsx diff --git a/dashboard/components/home/Sidebar.tsx b/dashboard/src/components/home/Sidebar.tsx similarity index 100% rename from dashboard/components/home/Sidebar.tsx rename to dashboard/src/components/home/Sidebar.tsx diff --git a/dashboard/components/home/SidebarCard.tsx b/dashboard/src/components/home/SidebarCard.tsx similarity index 100% rename from dashboard/components/home/SidebarCard.tsx rename to dashboard/src/components/home/SidebarCard.tsx diff --git a/dashboard/components/iac/CloudIacCatalog.tsx b/dashboard/src/components/iac/CloudIacCatalog.tsx similarity index 100% rename from dashboard/components/iac/CloudIacCatalog.tsx rename to dashboard/src/components/iac/CloudIacCatalog.tsx diff --git a/dashboard/components/iac/RunModal.tsx b/dashboard/src/components/iac/RunModal.tsx similarity index 100% rename from dashboard/components/iac/RunModal.tsx rename to dashboard/src/components/iac/RunModal.tsx diff --git a/dashboard/components/iac/ServiceDetailView.tsx b/dashboard/src/components/iac/ServiceDetailView.tsx similarity index 100% rename from dashboard/components/iac/ServiceDetailView.tsx rename to dashboard/src/components/iac/ServiceDetailView.tsx diff --git a/dashboard/components/marketing/ProductCommunity.tsx b/dashboard/src/components/marketing/ProductCommunity.tsx similarity index 100% rename from dashboard/components/marketing/ProductCommunity.tsx rename to dashboard/src/components/marketing/ProductCommunity.tsx diff --git a/dashboard/components/marketing/ProductDocs.tsx b/dashboard/src/components/marketing/ProductDocs.tsx similarity index 100% rename from dashboard/components/marketing/ProductDocs.tsx rename to dashboard/src/components/marketing/ProductDocs.tsx diff --git a/dashboard/components/marketing/ProductDownload.tsx b/dashboard/src/components/marketing/ProductDownload.tsx similarity index 100% rename from dashboard/components/marketing/ProductDownload.tsx rename to dashboard/src/components/marketing/ProductDownload.tsx diff --git a/dashboard/components/marketing/ProductEditions.tsx b/dashboard/src/components/marketing/ProductEditions.tsx similarity index 100% rename from dashboard/components/marketing/ProductEditions.tsx rename to dashboard/src/components/marketing/ProductEditions.tsx diff --git a/dashboard/components/marketing/ProductFaq.tsx b/dashboard/src/components/marketing/ProductFaq.tsx similarity index 100% rename from dashboard/components/marketing/ProductFaq.tsx rename to dashboard/src/components/marketing/ProductFaq.tsx diff --git a/dashboard/components/marketing/ProductFeatures.tsx b/dashboard/src/components/marketing/ProductFeatures.tsx similarity index 100% rename from dashboard/components/marketing/ProductFeatures.tsx rename to dashboard/src/components/marketing/ProductFeatures.tsx diff --git a/dashboard/components/marketing/ProductHero.tsx b/dashboard/src/components/marketing/ProductHero.tsx similarity index 100% rename from dashboard/components/marketing/ProductHero.tsx rename to dashboard/src/components/marketing/ProductHero.tsx diff --git a/dashboard/components/marketing/ProductScenarios.tsx b/dashboard/src/components/marketing/ProductScenarios.tsx similarity index 100% rename from dashboard/components/marketing/ProductScenarios.tsx rename to dashboard/src/components/marketing/ProductScenarios.tsx diff --git a/dashboard/src/theme/ThemeProvider.tsx b/dashboard/src/components/theme/ThemeProvider.tsx similarity index 100% rename from dashboard/src/theme/ThemeProvider.tsx rename to dashboard/src/components/theme/ThemeProvider.tsx diff --git a/dashboard/src/theme/dark.ts b/dashboard/src/components/theme/dark.ts similarity index 100% rename from dashboard/src/theme/dark.ts rename to dashboard/src/components/theme/dark.ts diff --git a/dashboard/src/theme/designTokens.ts b/dashboard/src/components/theme/designTokens.ts similarity index 100% rename from dashboard/src/theme/designTokens.ts rename to dashboard/src/components/theme/designTokens.ts diff --git a/dashboard/src/theme/index.ts b/dashboard/src/components/theme/index.ts similarity index 100% rename from dashboard/src/theme/index.ts rename to dashboard/src/components/theme/index.ts diff --git a/dashboard/src/theme/light.ts b/dashboard/src/components/theme/light.ts similarity index 100% rename from dashboard/src/theme/light.ts rename to dashboard/src/components/theme/light.ts diff --git a/dashboard/src/theme/types.ts b/dashboard/src/components/theme/types.ts similarity index 100% rename from dashboard/src/theme/types.ts rename to dashboard/src/components/theme/types.ts diff --git a/dashboard/src/theme/useTheme.ts b/dashboard/src/components/theme/useTheme.ts similarity index 100% rename from dashboard/src/theme/useTheme.ts rename to dashboard/src/components/theme/useTheme.ts diff --git a/dashboard/config/feature-toggles.json b/dashboard/src/config/feature-toggles.json similarity index 100% rename from dashboard/config/feature-toggles.json rename to dashboard/src/config/feature-toggles.json diff --git a/dashboard/config/index.ts b/dashboard/src/config/index.ts similarity index 100% rename from dashboard/config/index.ts rename to dashboard/src/config/index.ts diff --git a/dashboard/config/runtime-client.ts b/dashboard/src/config/runtime-client.ts similarity index 100% rename from dashboard/config/runtime-client.ts rename to dashboard/src/config/runtime-client.ts diff --git a/dashboard/config/runtime-loader.ts b/dashboard/src/config/runtime-loader.ts similarity index 100% rename from dashboard/config/runtime-loader.ts rename to dashboard/src/config/runtime-loader.ts diff --git a/dashboard/config/runtime-service-config.base.yaml b/dashboard/src/config/runtime-service-config.base.yaml similarity index 100% rename from dashboard/config/runtime-service-config.base.yaml rename to dashboard/src/config/runtime-service-config.base.yaml diff --git a/dashboard/config/runtime-service-config.prod.yaml b/dashboard/src/config/runtime-service-config.prod.yaml similarity index 100% rename from dashboard/config/runtime-service-config.prod.yaml rename to dashboard/src/config/runtime-service-config.prod.yaml diff --git a/dashboard/config/runtime-service-config.sit.yaml b/dashboard/src/config/runtime-service-config.sit.yaml similarity index 100% rename from dashboard/config/runtime-service-config.sit.yaml rename to dashboard/src/config/runtime-service-config.sit.yaml diff --git a/dashboard/content/about/team.md b/dashboard/src/content/about/team.md similarity index 100% rename from dashboard/content/about/team.md rename to dashboard/src/content/about/team.md diff --git a/dashboard/content/homepage/en/community.md b/dashboard/src/content/homepage/en/community.md similarity index 100% rename from dashboard/content/homepage/en/community.md rename to dashboard/src/content/homepage/en/community.md diff --git a/dashboard/content/homepage/en/news.md b/dashboard/src/content/homepage/en/news.md similarity index 100% rename from dashboard/content/homepage/en/news.md rename to dashboard/src/content/homepage/en/news.md diff --git a/dashboard/content/homepage/en/operations.md b/dashboard/src/content/homepage/en/operations.md similarity index 100% rename from dashboard/content/homepage/en/operations.md rename to dashboard/src/content/homepage/en/operations.md diff --git a/dashboard/content/homepage/en/products.md b/dashboard/src/content/homepage/en/products.md similarity index 100% rename from dashboard/content/homepage/en/products.md rename to dashboard/src/content/homepage/en/products.md diff --git a/dashboard/content/homepage/en/resources.md b/dashboard/src/content/homepage/en/resources.md similarity index 100% rename from dashboard/content/homepage/en/resources.md rename to dashboard/src/content/homepage/en/resources.md diff --git a/dashboard/content/homepage/en/support.md b/dashboard/src/content/homepage/en/support.md similarity index 100% rename from dashboard/content/homepage/en/support.md rename to dashboard/src/content/homepage/en/support.md diff --git a/dashboard/content/homepage/zh/community.md b/dashboard/src/content/homepage/zh/community.md similarity index 100% rename from dashboard/content/homepage/zh/community.md rename to dashboard/src/content/homepage/zh/community.md diff --git a/dashboard/content/homepage/zh/news.md b/dashboard/src/content/homepage/zh/news.md similarity index 100% rename from dashboard/content/homepage/zh/news.md rename to dashboard/src/content/homepage/zh/news.md diff --git a/dashboard/content/homepage/zh/operations.md b/dashboard/src/content/homepage/zh/operations.md similarity index 100% rename from dashboard/content/homepage/zh/operations.md rename to dashboard/src/content/homepage/zh/operations.md diff --git a/dashboard/content/homepage/zh/products.md b/dashboard/src/content/homepage/zh/products.md similarity index 100% rename from dashboard/content/homepage/zh/products.md rename to dashboard/src/content/homepage/zh/products.md diff --git a/dashboard/content/homepage/zh/resources.md b/dashboard/src/content/homepage/zh/resources.md similarity index 100% rename from dashboard/content/homepage/zh/resources.md rename to dashboard/src/content/homepage/zh/resources.md diff --git a/dashboard/content/homepage/zh/support.md b/dashboard/src/content/homepage/zh/support.md similarity index 100% rename from dashboard/content/homepage/zh/support.md rename to dashboard/src/content/homepage/zh/support.md diff --git a/dashboard/i18n/LanguageProvider.tsx b/dashboard/src/i18n/LanguageProvider.tsx similarity index 100% rename from dashboard/i18n/LanguageProvider.tsx rename to dashboard/src/i18n/LanguageProvider.tsx diff --git a/dashboard/i18n/translations.ts b/dashboard/src/i18n/translations.ts similarity index 100% rename from dashboard/i18n/translations.ts rename to dashboard/src/i18n/translations.ts diff --git a/dashboard/lib/accessControl.ts b/dashboard/src/lib/accessControl.ts similarity index 100% rename from dashboard/lib/accessControl.ts rename to dashboard/src/lib/accessControl.ts diff --git a/dashboard/lib/apiProxy.ts b/dashboard/src/lib/apiProxy.ts similarity index 100% rename from dashboard/lib/apiProxy.ts rename to dashboard/src/lib/apiProxy.ts diff --git a/dashboard/lib/appShellBypass.tsx b/dashboard/src/lib/appShellBypass.tsx similarity index 100% rename from dashboard/lib/appShellBypass.tsx rename to dashboard/src/lib/appShellBypass.tsx diff --git a/dashboard/lib/authGateway.ts b/dashboard/src/lib/authGateway.ts similarity index 100% rename from dashboard/lib/authGateway.ts rename to dashboard/src/lib/authGateway.ts diff --git a/dashboard/cms/client.ts b/dashboard/src/lib/cms/client.ts similarity index 100% rename from dashboard/cms/client.ts rename to dashboard/src/lib/cms/client.ts diff --git a/dashboard/cms/config.ts b/dashboard/src/lib/cms/config.ts similarity index 100% rename from dashboard/cms/config.ts rename to dashboard/src/lib/cms/config.ts diff --git a/dashboard/cms/content/ContentContext.tsx b/dashboard/src/lib/cms/content/ContentContext.tsx similarity index 100% rename from dashboard/cms/content/ContentContext.tsx rename to dashboard/src/lib/cms/content/ContentContext.tsx diff --git a/dashboard/cms/content/getting-started.md b/dashboard/src/lib/cms/content/getting-started.md similarity index 100% rename from dashboard/cms/content/getting-started.md rename to dashboard/src/lib/cms/content/getting-started.md diff --git a/dashboard/cms/content/homepage.ts b/dashboard/src/lib/cms/content/homepage.ts similarity index 100% rename from dashboard/cms/content/homepage.ts rename to dashboard/src/lib/cms/content/homepage.ts diff --git a/dashboard/cms/content/homepage/contact/items/github-star.md b/dashboard/src/lib/cms/content/homepage/contact/items/github-star.md similarity index 100% rename from dashboard/cms/content/homepage/contact/items/github-star.md rename to dashboard/src/lib/cms/content/homepage/contact/items/github-star.md diff --git a/dashboard/cms/content/homepage/contact/items/support.md b/dashboard/src/lib/cms/content/homepage/contact/items/support.md similarity index 100% rename from dashboard/cms/content/homepage/contact/items/support.md rename to dashboard/src/lib/cms/content/homepage/contact/items/support.md diff --git a/dashboard/cms/content/homepage/contact/items/wechat-group.md b/dashboard/src/lib/cms/content/homepage/contact/items/wechat-group.md similarity index 100% rename from dashboard/cms/content/homepage/contact/items/wechat-group.md rename to dashboard/src/lib/cms/content/homepage/contact/items/wechat-group.md diff --git a/dashboard/cms/content/homepage/contact/items/wechat-official.md b/dashboard/src/lib/cms/content/homepage/contact/items/wechat-official.md similarity index 100% rename from dashboard/cms/content/homepage/contact/items/wechat-official.md rename to dashboard/src/lib/cms/content/homepage/contact/items/wechat-official.md diff --git a/dashboard/cms/content/homepage/contact/panel.md b/dashboard/src/lib/cms/content/homepage/contact/panel.md similarity index 100% rename from dashboard/cms/content/homepage/contact/panel.md rename to dashboard/src/lib/cms/content/homepage/contact/panel.md diff --git a/dashboard/cms/content/homepage/hero.md b/dashboard/src/lib/cms/content/homepage/hero.md similarity index 100% rename from dashboard/cms/content/homepage/hero.md rename to dashboard/src/lib/cms/content/homepage/hero.md diff --git a/dashboard/cms/content/homepage/posts/2024-07-12-community-events.md b/dashboard/src/lib/cms/content/homepage/posts/2024-07-12-community-events.md similarity index 100% rename from dashboard/cms/content/homepage/posts/2024-07-12-community-events.md rename to dashboard/src/lib/cms/content/homepage/posts/2024-07-12-community-events.md diff --git a/dashboard/cms/content/homepage/posts/2024-07-30-observability-insight.md b/dashboard/src/lib/cms/content/homepage/posts/2024-07-30-observability-insight.md similarity index 100% rename from dashboard/cms/content/homepage/posts/2024-07-30-observability-insight.md rename to dashboard/src/lib/cms/content/homepage/posts/2024-07-30-observability-insight.md diff --git a/dashboard/cms/content/homepage/posts/2024-08-15-release-notes.md b/dashboard/src/lib/cms/content/homepage/posts/2024-08-15-release-notes.md similarity index 100% rename from dashboard/cms/content/homepage/posts/2024-08-15-release-notes.md rename to dashboard/src/lib/cms/content/homepage/posts/2024-08-15-release-notes.md diff --git a/dashboard/cms/content/homepage/sidebar/community.md b/dashboard/src/lib/cms/content/homepage/sidebar/community.md similarity index 100% rename from dashboard/cms/content/homepage/sidebar/community.md rename to dashboard/src/lib/cms/content/homepage/sidebar/community.md diff --git a/dashboard/cms/content/homepage/sidebar/resources.md b/dashboard/src/lib/cms/content/homepage/sidebar/resources.md similarity index 100% rename from dashboard/cms/content/homepage/sidebar/resources.md rename to dashboard/src/lib/cms/content/homepage/sidebar/resources.md diff --git a/dashboard/cms/content/homepage/sidebar/tags.md b/dashboard/src/lib/cms/content/homepage/sidebar/tags.md similarity index 100% rename from dashboard/cms/content/homepage/sidebar/tags.md rename to dashboard/src/lib/cms/content/homepage/sidebar/tags.md diff --git a/dashboard/cms/content/homepage/solutions/xcloudflow.md b/dashboard/src/lib/cms/content/homepage/solutions/xcloudflow.md similarity index 100% rename from dashboard/cms/content/homepage/solutions/xcloudflow.md rename to dashboard/src/lib/cms/content/homepage/solutions/xcloudflow.md diff --git a/dashboard/cms/content/homepage/solutions/xcontrol.md b/dashboard/src/lib/cms/content/homepage/solutions/xcontrol.md similarity index 100% rename from dashboard/cms/content/homepage/solutions/xcontrol.md rename to dashboard/src/lib/cms/content/homepage/solutions/xcontrol.md diff --git a/dashboard/cms/content/homepage/solutions/xscopehub.md b/dashboard/src/lib/cms/content/homepage/solutions/xscopehub.md similarity index 100% rename from dashboard/cms/content/homepage/solutions/xscopehub.md rename to dashboard/src/lib/cms/content/homepage/solutions/xscopehub.md diff --git a/dashboard/cms/content/homepage/solutions/xstream.md b/dashboard/src/lib/cms/content/homepage/solutions/xstream.md similarity index 100% rename from dashboard/cms/content/homepage/solutions/xstream.md rename to dashboard/src/lib/cms/content/homepage/solutions/xstream.md diff --git a/dashboard/cms/content/index.ts b/dashboard/src/lib/cms/content/index.ts similarity index 100% rename from dashboard/cms/content/index.ts rename to dashboard/src/lib/cms/content/index.ts diff --git a/dashboard/cms/content/source.ts b/dashboard/src/lib/cms/content/source.ts similarity index 86% rename from dashboard/cms/content/source.ts rename to dashboard/src/lib/cms/content/source.ts index 77bb967..5831cbb 100644 --- a/dashboard/cms/content/source.ts +++ b/dashboard/src/lib/cms/content/source.ts @@ -18,7 +18,14 @@ export function resolveContentSource(namespace?: string): ResolvedContentSource const targetNamespace = namespace ?? cmsConfig.content.defaultNamespace const source = cmsConfig.content.sources[targetNamespace] if (!source) { - const fallbackRoot = path.join(process.cwd(), 'cms', 'content', targetNamespace) + const fallbackRoot = path.join( + process.cwd(), + 'src', + 'lib', + 'cms', + 'content', + targetNamespace + ) return { namespace: targetNamespace, absolutePath: fallbackRoot, diff --git a/dashboard/cms/contentSources.ts b/dashboard/src/lib/cms/contentSources.ts similarity index 100% rename from dashboard/cms/contentSources.ts rename to dashboard/src/lib/cms/contentSources.ts diff --git a/dashboard/cms/extensionRuntime.ts b/dashboard/src/lib/cms/extensionRuntime.ts similarity index 100% rename from dashboard/cms/extensionRuntime.ts rename to dashboard/src/lib/cms/extensionRuntime.ts diff --git a/dashboard/cms/extensions/appShell.tsx b/dashboard/src/lib/cms/extensions/appShell.tsx similarity index 100% rename from dashboard/cms/extensions/appShell.tsx rename to dashboard/src/lib/cms/extensions/appShell.tsx diff --git a/dashboard/cms/extensions/markdownSync.tsx b/dashboard/src/lib/cms/extensions/markdownSync.tsx similarity index 100% rename from dashboard/cms/extensions/markdownSync.tsx rename to dashboard/src/lib/cms/extensions/markdownSync.tsx diff --git a/dashboard/cms/index.ts b/dashboard/src/lib/cms/index.ts similarity index 89% rename from dashboard/cms/index.ts rename to dashboard/src/lib/cms/index.ts index f69e69a..f306acf 100644 --- a/dashboard/cms/index.ts +++ b/dashboard/src/lib/cms/index.ts @@ -10,5 +10,5 @@ export { listRegisteredTemplateNames, registerTemplate, registerTemplateLoader, -} from '../src/templateRegistry' +} from '@modules/templateRegistry' export { listContentSourcesMetadata } from './contentSources' diff --git a/dashboard/cms/package.json b/dashboard/src/lib/cms/package.json similarity index 100% rename from dashboard/cms/package.json rename to dashboard/src/lib/cms/package.json diff --git a/dashboard/cms/templates/default/config.ts b/dashboard/src/lib/cms/templates/default/config.ts similarity index 100% rename from dashboard/cms/templates/default/config.ts rename to dashboard/src/lib/cms/templates/default/config.ts diff --git a/dashboard/src/lib/cms/templates/default/index.tsx b/dashboard/src/lib/cms/templates/default/index.tsx new file mode 100644 index 0000000..7f0e43e --- /dev/null +++ b/dashboard/src/lib/cms/templates/default/index.tsx @@ -0,0 +1,2 @@ +export { default } from '@modules/templates/default' +export { defaultHomeLayoutConfig } from './config' diff --git a/dashboard/cms/themes/default/index.tsx b/dashboard/src/lib/cms/themes/default/index.tsx similarity index 100% rename from dashboard/cms/themes/default/index.tsx rename to dashboard/src/lib/cms/themes/default/index.tsx diff --git a/dashboard/cms/types.ts b/dashboard/src/lib/cms/types.ts similarity index 95% rename from dashboard/cms/types.ts rename to dashboard/src/lib/cms/types.ts index 4df7362..73e3c48 100644 --- a/dashboard/cms/types.ts +++ b/dashboard/src/lib/cms/types.ts @@ -1,6 +1,6 @@ import type { ComponentType, ReactNode } from 'react' -import type { HomePageTemplateSlots, TemplateRenderProps } from '../src/templates/types' +import type { HomePageTemplateSlots, TemplateRenderProps } from '@modules/templates/types' export interface CmsTemplate { name: string diff --git a/dashboard/lib/download-data.ts b/dashboard/src/lib/download-data.ts similarity index 100% rename from dashboard/lib/download-data.ts rename to dashboard/src/lib/download-data.ts diff --git a/dashboard/lib/download-manifest.ts b/dashboard/src/lib/download-manifest.ts similarity index 100% rename from dashboard/lib/download-manifest.ts rename to dashboard/src/lib/download-manifest.ts diff --git a/dashboard/lib/featureFlags.ts b/dashboard/src/lib/featureFlags.ts similarity index 100% rename from dashboard/lib/featureFlags.ts rename to dashboard/src/lib/featureFlags.ts diff --git a/dashboard/lib/featureToggles.ts b/dashboard/src/lib/featureToggles.ts similarity index 100% rename from dashboard/lib/featureToggles.ts rename to dashboard/src/lib/featureToggles.ts diff --git a/dashboard/lib/format.ts b/dashboard/src/lib/format.ts similarity index 100% rename from dashboard/lib/format.ts rename to dashboard/src/lib/format.ts diff --git a/dashboard/lib/iac/actions.ts b/dashboard/src/lib/iac/actions.ts similarity index 100% rename from dashboard/lib/iac/actions.ts rename to dashboard/src/lib/iac/actions.ts diff --git a/dashboard/lib/iac/catalog.ts b/dashboard/src/lib/iac/catalog.ts similarity index 100% rename from dashboard/lib/iac/catalog.ts rename to dashboard/src/lib/iac/catalog.ts diff --git a/dashboard/lib/iac/detail-presets.ts b/dashboard/src/lib/iac/detail-presets.ts similarity index 100% rename from dashboard/lib/iac/detail-presets.ts rename to dashboard/src/lib/iac/detail-presets.ts diff --git a/dashboard/lib/iac/types.ts b/dashboard/src/lib/iac/types.ts similarity index 100% rename from dashboard/lib/iac/types.ts rename to dashboard/src/lib/iac/types.ts diff --git a/dashboard/lib/knowledgeBase.ts b/dashboard/src/lib/knowledgeBase.ts similarity index 100% rename from dashboard/lib/knowledgeBase.ts rename to dashboard/src/lib/knowledgeBase.ts diff --git a/dashboard/lib/mail/apiClient.ts b/dashboard/src/lib/mail/apiClient.ts similarity index 100% rename from dashboard/lib/mail/apiClient.ts rename to dashboard/src/lib/mail/apiClient.ts diff --git a/dashboard/lib/mail/auth.ts b/dashboard/src/lib/mail/auth.ts similarity index 100% rename from dashboard/lib/mail/auth.ts rename to dashboard/src/lib/mail/auth.ts diff --git a/dashboard/lib/mail/types.ts b/dashboard/src/lib/mail/types.ts similarity index 100% rename from dashboard/lib/mail/types.ts rename to dashboard/src/lib/mail/types.ts diff --git a/dashboard/lib/markdown.ts b/dashboard/src/lib/markdown.ts similarity index 97% rename from dashboard/lib/markdown.ts rename to dashboard/src/lib/markdown.ts index 3b0e5f2..271d5c2 100644 --- a/dashboard/lib/markdown.ts +++ b/dashboard/src/lib/markdown.ts @@ -11,7 +11,7 @@ export interface MarkdownFile { slug: string } -const CONTENT_ROOT = path.join(process.cwd(), 'content') +const CONTENT_ROOT = path.join(process.cwd(), 'src', 'content') function normalizeQuotes(value: string): string { const trimmed = value.trim() diff --git a/dashboard/lib/rbac.ts b/dashboard/src/lib/rbac.ts similarity index 100% rename from dashboard/lib/rbac.ts rename to dashboard/src/lib/rbac.ts diff --git a/dashboard/ui/lib/markdown.ts b/dashboard/src/lib/ui/markdown.ts similarity index 50% rename from dashboard/ui/lib/markdown.ts rename to dashboard/src/lib/ui/markdown.ts index d0a5b5d..ee3ba0f 100644 --- a/dashboard/ui/lib/markdown.ts +++ b/dashboard/src/lib/ui/markdown.ts @@ -1,9 +1,9 @@ import 'server-only' -import type { ContentCommitMeta } from '../../api/content-meta' -import { getContentCommitMeta } from '../../api/content-meta' -import type { MarkdownRenderResult } from '../../api/render-markdown' -import { renderMarkdownFile } from '../../api/render-markdown' +import type { ContentCommitMeta } from '@server/content-meta' +import { getContentCommitMeta } from '@server/content-meta' +import type { MarkdownRenderResult } from '@server/render-markdown' +import { renderMarkdownFile } from '@server/render-markdown' export async function loadMarkdownSection(path: string): Promise { return renderMarkdownFile(path) diff --git a/dashboard/lib/userStore.tsx b/dashboard/src/lib/userStore.tsx similarity index 100% rename from dashboard/lib/userStore.tsx rename to dashboard/src/lib/userStore.tsx diff --git a/dashboard/src/extensions/__tests__/loader.test.ts b/dashboard/src/modules/extensions/__tests__/loader.test.ts similarity index 100% rename from dashboard/src/extensions/__tests__/loader.test.ts rename to dashboard/src/modules/extensions/__tests__/loader.test.ts diff --git a/dashboard/src/extensions/builtin/index.ts b/dashboard/src/modules/extensions/builtin/index.ts similarity index 100% rename from dashboard/src/extensions/builtin/index.ts rename to dashboard/src/modules/extensions/builtin/index.ts diff --git a/dashboard/src/extensions/builtin/user-center/account/MfaSetupPanel.tsx b/dashboard/src/modules/extensions/builtin/user-center/account/MfaSetupPanel.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/account/MfaSetupPanel.tsx rename to dashboard/src/modules/extensions/builtin/user-center/account/MfaSetupPanel.tsx diff --git a/dashboard/src/extensions/builtin/user-center/account/ThemePreferenceCard.tsx b/dashboard/src/modules/extensions/builtin/user-center/account/ThemePreferenceCard.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/account/ThemePreferenceCard.tsx rename to dashboard/src/modules/extensions/builtin/user-center/account/ThemePreferenceCard.tsx diff --git a/dashboard/src/extensions/builtin/user-center/components/Card.tsx b/dashboard/src/modules/extensions/builtin/user-center/components/Card.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/components/Card.tsx rename to dashboard/src/modules/extensions/builtin/user-center/components/Card.tsx diff --git a/dashboard/src/extensions/builtin/user-center/components/UserOverview.tsx b/dashboard/src/modules/extensions/builtin/user-center/components/UserOverview.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/components/UserOverview.tsx rename to dashboard/src/modules/extensions/builtin/user-center/components/UserOverview.tsx diff --git a/dashboard/src/extensions/builtin/user-center/components/VlessQrCard.tsx b/dashboard/src/modules/extensions/builtin/user-center/components/VlessQrCard.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/components/VlessQrCard.tsx rename to dashboard/src/modules/extensions/builtin/user-center/components/VlessQrCard.tsx diff --git a/dashboard/src/extensions/builtin/user-center/index.ts b/dashboard/src/modules/extensions/builtin/user-center/index.ts similarity index 100% rename from dashboard/src/extensions/builtin/user-center/index.ts rename to dashboard/src/modules/extensions/builtin/user-center/index.ts diff --git a/dashboard/src/extensions/builtin/user-center/lib/api.ts b/dashboard/src/modules/extensions/builtin/user-center/lib/api.ts similarity index 100% rename from dashboard/src/extensions/builtin/user-center/lib/api.ts rename to dashboard/src/modules/extensions/builtin/user-center/lib/api.ts diff --git a/dashboard/src/extensions/builtin/user-center/lib/vless.ts b/dashboard/src/modules/extensions/builtin/user-center/lib/vless.ts similarity index 100% rename from dashboard/src/extensions/builtin/user-center/lib/vless.ts rename to dashboard/src/modules/extensions/builtin/user-center/lib/vless.ts diff --git a/dashboard/src/extensions/builtin/user-center/management/__tests__/ManagementComponents.test.tsx b/dashboard/src/modules/extensions/builtin/user-center/management/__tests__/ManagementComponents.test.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/management/__tests__/ManagementComponents.test.tsx rename to dashboard/src/modules/extensions/builtin/user-center/management/__tests__/ManagementComponents.test.tsx diff --git a/dashboard/src/extensions/builtin/user-center/management/components/OverviewCards.tsx b/dashboard/src/modules/extensions/builtin/user-center/management/components/OverviewCards.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/management/components/OverviewCards.tsx rename to dashboard/src/modules/extensions/builtin/user-center/management/components/OverviewCards.tsx diff --git a/dashboard/src/extensions/builtin/user-center/management/components/PermissionMatrixEditor.tsx b/dashboard/src/modules/extensions/builtin/user-center/management/components/PermissionMatrixEditor.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/management/components/PermissionMatrixEditor.tsx rename to dashboard/src/modules/extensions/builtin/user-center/management/components/PermissionMatrixEditor.tsx diff --git a/dashboard/src/extensions/builtin/user-center/management/components/TrendChart.tsx b/dashboard/src/modules/extensions/builtin/user-center/management/components/TrendChart.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/management/components/TrendChart.tsx rename to dashboard/src/modules/extensions/builtin/user-center/management/components/TrendChart.tsx diff --git a/dashboard/src/extensions/builtin/user-center/management/components/UserGroupManagement.tsx b/dashboard/src/modules/extensions/builtin/user-center/management/components/UserGroupManagement.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/management/components/UserGroupManagement.tsx rename to dashboard/src/modules/extensions/builtin/user-center/management/components/UserGroupManagement.tsx diff --git a/dashboard/src/extensions/builtin/user-center/routes/account.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/account.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/routes/account.tsx rename to dashboard/src/modules/extensions/builtin/user-center/routes/account.tsx diff --git a/dashboard/src/extensions/builtin/user-center/routes/agent.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/agent.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/routes/agent.tsx rename to dashboard/src/modules/extensions/builtin/user-center/routes/agent.tsx diff --git a/dashboard/src/extensions/builtin/user-center/routes/api.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/api.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/routes/api.tsx rename to dashboard/src/modules/extensions/builtin/user-center/routes/api.tsx diff --git a/dashboard/src/extensions/builtin/user-center/routes/home.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/home.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/routes/home.tsx rename to dashboard/src/modules/extensions/builtin/user-center/routes/home.tsx diff --git a/dashboard/src/extensions/builtin/user-center/routes/ldp.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/ldp.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/routes/ldp.tsx rename to dashboard/src/modules/extensions/builtin/user-center/routes/ldp.tsx diff --git a/dashboard/src/extensions/builtin/user-center/routes/mail.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/mail.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/routes/mail.tsx rename to dashboard/src/modules/extensions/builtin/user-center/routes/mail.tsx diff --git a/dashboard/src/extensions/builtin/user-center/routes/management.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/management.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/routes/management.tsx rename to dashboard/src/modules/extensions/builtin/user-center/routes/management.tsx diff --git a/dashboard/src/extensions/builtin/user-center/routes/subscription.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/subscription.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/routes/subscription.tsx rename to dashboard/src/modules/extensions/builtin/user-center/routes/subscription.tsx diff --git a/dashboard/src/extensions/builtin/user-center/routes/theme.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/theme.tsx similarity index 100% rename from dashboard/src/extensions/builtin/user-center/routes/theme.tsx rename to dashboard/src/modules/extensions/builtin/user-center/routes/theme.tsx diff --git a/dashboard/src/extensions/loader.ts b/dashboard/src/modules/extensions/loader.ts similarity index 100% rename from dashboard/src/extensions/loader.ts rename to dashboard/src/modules/extensions/loader.ts diff --git a/dashboard/src/extensions/types.ts b/dashboard/src/modules/extensions/types.ts similarity index 100% rename from dashboard/src/extensions/types.ts rename to dashboard/src/modules/extensions/types.ts diff --git a/dashboard/ui/homepage/page.tsx b/dashboard/src/modules/homepage/page.tsx similarity index 100% rename from dashboard/ui/homepage/page.tsx rename to dashboard/src/modules/homepage/page.tsx diff --git a/dashboard/src/products/registry.test.ts b/dashboard/src/modules/products/registry.test.ts similarity index 100% rename from dashboard/src/products/registry.test.ts rename to dashboard/src/modules/products/registry.test.ts diff --git a/dashboard/src/products/registry.ts b/dashboard/src/modules/products/registry.ts similarity index 100% rename from dashboard/src/products/registry.ts rename to dashboard/src/modules/products/registry.ts diff --git a/dashboard/src/products/xcloudflow.ts b/dashboard/src/modules/products/xcloudflow.ts similarity index 100% rename from dashboard/src/products/xcloudflow.ts rename to dashboard/src/modules/products/xcloudflow.ts diff --git a/dashboard/src/products/xscopehub.ts b/dashboard/src/modules/products/xscopehub.ts similarity index 100% rename from dashboard/src/products/xscopehub.ts rename to dashboard/src/modules/products/xscopehub.ts diff --git a/dashboard/src/products/xstream.ts b/dashboard/src/modules/products/xstream.ts similarity index 100% rename from dashboard/src/products/xstream.ts rename to dashboard/src/modules/products/xstream.ts diff --git a/dashboard/src/templateRegistry.ts b/dashboard/src/modules/templateRegistry.ts similarity index 98% rename from dashboard/src/templateRegistry.ts rename to dashboard/src/modules/templateRegistry.ts index 7a0f228..ff0c60c 100644 --- a/dashboard/src/templateRegistry.ts +++ b/dashboard/src/modules/templateRegistry.ts @@ -99,7 +99,7 @@ function filesystemTemplateLoader(name: string): TemplateDefinition | null { } if (!name.startsWith(FILE_PREFIX)) { - const basePath = path.join(process.cwd(), 'src', 'templates', name) + const basePath = path.join(process.cwd(), 'src', 'modules', 'templates', name) const candidates = ['index.js', 'index.cjs'] for (const candidate of candidates) { const candidatePath = path.join(basePath, candidate) diff --git a/dashboard/src/templates/default/index.tsx b/dashboard/src/modules/templates/default/index.tsx similarity index 100% rename from dashboard/src/templates/default/index.tsx rename to dashboard/src/modules/templates/default/index.tsx diff --git a/dashboard/src/templates/layouts/commonHome.tsx b/dashboard/src/modules/templates/layouts/commonHome.tsx similarity index 100% rename from dashboard/src/templates/layouts/commonHome.tsx rename to dashboard/src/modules/templates/layouts/commonHome.tsx diff --git a/dashboard/src/templates/types.ts b/dashboard/src/modules/templates/types.ts similarity index 100% rename from dashboard/src/templates/types.ts rename to dashboard/src/modules/templates/types.ts diff --git a/dashboard/server/account/session.ts b/dashboard/src/server/account/session.ts similarity index 100% rename from dashboard/server/account/session.ts rename to dashboard/src/server/account/session.ts diff --git a/dashboard/api/content-meta.ts b/dashboard/src/server/content-meta.ts similarity index 100% rename from dashboard/api/content-meta.ts rename to dashboard/src/server/content-meta.ts diff --git a/dashboard/api/content-utils.ts b/dashboard/src/server/content-utils.ts similarity index 95% rename from dashboard/api/content-utils.ts rename to dashboard/src/server/content-utils.ts index 6c8b53c..987c151 100644 --- a/dashboard/api/content-utils.ts +++ b/dashboard/src/server/content-utils.ts @@ -8,7 +8,7 @@ export class ContentNotFoundError extends Error { } } -const CONTENT_ROOT = path.join(process.cwd(), 'content') +const CONTENT_ROOT = path.join(process.cwd(), 'src', 'content') export function getContentRoot(): string { return CONTENT_ROOT diff --git a/dashboard/api/render-markdown.ts b/dashboard/src/server/render-markdown.ts similarity index 100% rename from dashboard/api/render-markdown.ts rename to dashboard/src/server/render-markdown.ts diff --git a/dashboard/server/runtime-loader.ts b/dashboard/src/server/runtime-loader.ts similarity index 98% rename from dashboard/server/runtime-loader.ts rename to dashboard/src/server/runtime-loader.ts index 2c93464..d3b1be3 100644 --- a/dashboard/server/runtime-loader.ts +++ b/dashboard/src/server/runtime-loader.ts @@ -6,7 +6,7 @@ import path from 'path' import yaml from 'js-yaml' // 使用 process.cwd() 获取项目根目录,避免 __dirname 在生产环境的问题 -const configDir = path.join(process.cwd(), 'config') +const configDir = path.join(process.cwd(), 'src', 'config') function loadYamlSource(sourceKey: RuntimeSourceKey): string | undefined { try { @@ -289,7 +289,7 @@ export function readRuntimeEnvSettings(): RuntimeEnvSettings { }) candidates.push({ - path: path.resolve(process.cwd(), 'config', RUNTIME_ENV_CONFIG_BASENAME), + path: path.resolve(process.cwd(), 'src', 'config', RUNTIME_ENV_CONFIG_BASENAME), detectedBy: `file:config/${RUNTIME_ENV_CONFIG_BASENAME}`, }) diff --git a/dashboard/server/serviceConfig.ts b/dashboard/src/server/serviceConfig.ts similarity index 100% rename from dashboard/server/serviceConfig.ts rename to dashboard/src/server/serviceConfig.ts diff --git a/dashboard/playwright.config.ts b/dashboard/tests/e2e/playwright.config.ts similarity index 96% rename from dashboard/playwright.config.ts rename to dashboard/tests/e2e/playwright.config.ts index 60f4874..d4eb717 100644 --- a/dashboard/playwright.config.ts +++ b/dashboard/tests/e2e/playwright.config.ts @@ -3,7 +3,7 @@ import { defineConfig, devices } from '@playwright/test' const PORT = Number(process.env.PORT ?? 3000) export default defineConfig({ - testDir: './ui/tests/e2e', + testDir: './ui', timeout: 60_000, expect: { timeout: 10_000, diff --git a/dashboard/ui/tests/e2e/auth-pages.spec.ts b/dashboard/tests/e2e/ui/auth-pages.spec.ts similarity index 100% rename from dashboard/ui/tests/e2e/auth-pages.spec.ts rename to dashboard/tests/e2e/ui/auth-pages.spec.ts diff --git a/dashboard/ui/tests/e2e/homepage.spec.ts b/dashboard/tests/e2e/ui/homepage.spec.ts similarity index 100% rename from dashboard/ui/tests/e2e/homepage.spec.ts rename to dashboard/tests/e2e/ui/homepage.spec.ts diff --git a/dashboard/ui/components/__tests__/MarkdownSection.test.tsx b/dashboard/tests/unit/components/MarkdownSection.test.tsx similarity index 96% rename from dashboard/ui/components/__tests__/MarkdownSection.test.tsx rename to dashboard/tests/unit/components/MarkdownSection.test.tsx index c474261..a5e4928 100644 --- a/dashboard/ui/components/__tests__/MarkdownSection.test.tsx +++ b/dashboard/tests/unit/components/MarkdownSection.test.tsx @@ -1,7 +1,7 @@ import { render, screen, waitFor } from '@testing-library/react' import { afterEach, describe, expect, it, vi } from 'vitest' -import MarkdownSection, { type MarkdownRenderResult } from '../MarkdownSection' +import MarkdownSection, { type MarkdownRenderResult } from '@components/MarkdownSection' describe('MarkdownSection', () => { afterEach(() => { diff --git a/dashboard/src/__tests__/templateRegistry.test.ts b/dashboard/tests/unit/templateRegistry.test.ts similarity index 92% rename from dashboard/src/__tests__/templateRegistry.test.ts rename to dashboard/tests/unit/templateRegistry.test.ts index c283cae..22b1338 100644 --- a/dashboard/src/__tests__/templateRegistry.test.ts +++ b/dashboard/tests/unit/templateRegistry.test.ts @@ -7,7 +7,7 @@ import { cmsConfig } from '@cms/config' vi.mock('@cms/content/source', () => ({ resolveContentSource: () => ({ - absolutePath: 'cms/content', + absolutePath: 'src/lib/cms/content', }), })) @@ -19,10 +19,10 @@ import { registerTemplateLoader, resolveTemplateName, type TemplateDefinition, -} from '../templateRegistry' +} from '@modules/templateRegistry' const originalTemplateName = cmsConfig.template -const templateFixturesPath = path.join(process.cwd(), 'src', 'templates', 'fs-template') +const templateFixturesPath = path.join(process.cwd(), 'src', 'modules', 'templates', 'fs-template') const runtimeTemplate: TemplateDefinition = { name: 'runtime', @@ -99,7 +99,9 @@ describe('templateRegistry', () => { delete require.cache[templateModulePath] expect(fs.existsSync(templateModulePath)).toBe(true) - expect(path.join(process.cwd(), 'src', 'templates', 'fs-template', 'index.js')).toBe(templateModulePath) + expect( + path.join(process.cwd(), 'src', 'modules', 'templates', 'fs-template', 'index.js') + ).toBe(templateModulePath) cmsConfig.template = 'fs-template' const template = getActiveTemplate() diff --git a/dashboard/tests/unit/vitest.config.ts b/dashboard/tests/unit/vitest.config.ts new file mode 100644 index 0000000..5a7eb9c --- /dev/null +++ b/dashboard/tests/unit/vitest.config.ts @@ -0,0 +1,40 @@ +import path from 'node:path' +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { + environment: 'jsdom', + globals: true, + setupFiles: ['./vitest.setup.ts'], + include: [ + '../../src/**/*.test.{ts,tsx}', + '../../src/**/__tests__/**/*.{ts,tsx}', + './**/*.test.{ts,tsx}', + './**/__tests__/**/*.{ts,tsx}', + ], + environmentOptions: { + jsdom: { + url: 'http://localhost', + }, + }, + }, + resolve: { + alias: { + '@components': path.resolve(__dirname, '..', '..', 'src', 'components'), + '@cms': path.resolve(__dirname, '..', '..', 'src', 'lib', 'cms'), + '@i18n': path.resolve(__dirname, '..', '..', 'src', 'i18n'), + '@lib': path.resolve(__dirname, '..', '..', 'src', 'lib'), + '@types': path.resolve(__dirname, '..', '..', 'types'), + '@server': path.resolve(__dirname, '..', '..', 'src', 'server'), + '@modules': path.resolve(__dirname, '..', '..', 'src', 'modules'), + '@extensions': path.resolve(__dirname, '..', '..', 'src', 'modules', 'extensions'), + '@templates': path.resolve(__dirname, '..', '..', 'src', 'modules', 'templates'), + '@theme': path.resolve(__dirname, '..', '..', 'src', 'components', 'theme'), + '@src': path.resolve(__dirname, '..', '..', 'src'), + }, + }, + esbuild: { + loader: 'tsx', + jsx: 'automatic', + }, +}) diff --git a/dashboard/vitest.setup.ts b/dashboard/tests/unit/vitest.setup.ts similarity index 100% rename from dashboard/vitest.setup.ts rename to dashboard/tests/unit/vitest.setup.ts diff --git a/dashboard/theme b/dashboard/theme deleted file mode 120000 index 899bf7d..0000000 --- a/dashboard/theme +++ /dev/null @@ -1 +0,0 @@ -src/theme \ No newline at end of file diff --git a/dashboard/tsconfig.json b/dashboard/tsconfig.json index 0991da9..35f6602 100644 --- a/dashboard/tsconfig.json +++ b/dashboard/tsconfig.json @@ -17,34 +17,31 @@ "jsx": "react-jsx", "baseUrl": ".", // 👈 根路径基准 "paths": { - "@cms": ["cms/index.ts"], // 👈 增加这行以兼容 import "@cms" - "@cms/*": ["cms/*"], + "@cms": ["src/lib/cms/index.ts"], // 👈 增加这行以兼容 import "@cms" + "@cms/*": ["src/lib/cms/*"], - "@components/*": ["components/*"], - "@i18n/*": ["i18n/*"], - "@lib/*": ["lib/*"], + "@components/*": ["src/components/*"], + "@i18n/*": ["src/i18n/*"], + "@lib/*": ["src/lib/*"], "@types/*": ["types/*"], - "@server/*": ["server/*"], - "@extensions/*": ["src/extensions/*"], - "@theme/*": ["src/theme/*"], - "@templates/*": ["src/templates/*"], + "@server/*": ["src/server/*"], + "@modules/*": ["src/modules/*"], + "@extensions/*": ["src/modules/extensions/*"], + "@theme/*": ["src/components/theme/*"], + "@templates/*": ["src/modules/templates/*"], "@src/*": ["src/*"] }, "types": ["node", "vitest/globals", "@testing-library/jest-dom"], "plugins": [{ "name": "next" }] }, "include": [ - "app", - "cms", - "components", - "i18n", - "lib", - "ui", + "next-env.d.ts", "src", - "server", + "tests", + "scripts", "types", ".next/types/**/*.ts", ".next/dev/types/**/*.ts" ], - "exclude": ["node_modules", "config"] + "exclude": ["node_modules"] } diff --git a/dashboard/vitest.config.ts b/dashboard/vitest.config.ts deleted file mode 100644 index 1b22505..0000000 --- a/dashboard/vitest.config.ts +++ /dev/null @@ -1,40 +0,0 @@ -import path from 'node:path' -import { defineConfig } from 'vitest/config' - -export default defineConfig({ - test: { - environment: 'jsdom', - globals: true, - setupFiles: ['./vitest.setup.ts'], - include: [ - 'app/**/*.test.{ts,tsx}', - 'app/**/*.__tests__/*.{ts,tsx}', - 'app/**/__tests__/**/*.{ts,tsx}', - 'src/**/*.test.{ts,tsx}', - 'src/**/__tests__/**/*.{ts,tsx}', - 'ui/**/*.test.{ts,tsx}', - 'ui/**/__tests__/**/*.{ts,tsx}', - ], - environmentOptions: { - jsdom: { - url: 'http://localhost', - }, - }, - }, - resolve: { - alias: { - '@components': path.resolve(__dirname, 'components'), - '@cms': path.resolve(__dirname, 'cms'), - '@i18n': path.resolve(__dirname, 'i18n'), - '@lib': path.resolve(__dirname, 'lib'), - '@types': path.resolve(__dirname, 'types'), - '@extensions': path.resolve(__dirname, 'src/extensions'), - '@templates': path.resolve(__dirname, 'src/templates'), - '@src': path.resolve(__dirname, 'src'), - }, - }, - esbuild: { - loader: 'tsx', - jsx: 'automatic', - }, -})