@manojkmfsi/monodog 1.1.37 → 1.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/monodog-dashboard/dist/assets/index-C08ciT3A.js +20 -0
- package/monodog-dashboard/dist/assets/index-C08ciT3A.js.map +1 -0
- package/monodog-dashboard/dist/assets/index-Dc2vaUOq.css +1 -0
- package/monodog-dashboard/{index.html → dist/index.html} +2 -1
- package/monodog-dashboard/package.json +0 -3
- package/package.json +2 -2
- package/monodog-dashboard/THEME_SYSTEM.md +0 -309
- package/monodog-dashboard/__tests__/AuthCallbackPage.test.ts +0 -138
- package/monodog-dashboard/__tests__/ConfigInspector.test.ts +0 -33
- package/monodog-dashboard/__tests__/DependencyGraph.test.ts +0 -72
- package/monodog-dashboard/__tests__/HealthStatus.test.ts +0 -69
- package/monodog-dashboard/__tests__/LoginPage.test.ts +0 -79
- package/monodog-dashboard/__tests__/PackageDetail.test.ts +0 -22
- package/monodog-dashboard/__tests__/ReleaseManager.test.tsx +0 -510
- package/monodog-dashboard/__tests__/api-client.test.ts +0 -475
- package/monodog-dashboard/__tests__/components.test.ts +0 -117
- package/monodog-dashboard/__tests__/dashboard.utils.test.ts +0 -144
- package/monodog-dashboard/__tests__/dependency.utils.test.ts +0 -125
- package/monodog-dashboard/__tests__/monorepoService.unit.test.ts +0 -103
- package/monodog-dashboard/__tests__/packages.utils.test.ts +0 -37
- package/monodog-dashboard/__tests__/pages.test.ts +0 -103
- package/monodog-dashboard/package-lock.json +0 -4587
- package/monodog-dashboard/postcss.config.js +0 -6
- package/monodog-dashboard/src/components/App.tsx +0 -36
- package/monodog-dashboard/src/components/LoadingState.tsx +0 -18
- package/monodog-dashboard/src/components/PermissionGuard.tsx +0 -92
- package/monodog-dashboard/src/components/ProtectedRoute.tsx +0 -24
- package/monodog-dashboard/src/components/configuration/Configuration.tsx +0 -91
- package/monodog-dashboard/src/components/configuration/components/BrandingSettings.tsx +0 -128
- package/monodog-dashboard/src/components/configuration/components/ConfigurationHeader.tsx +0 -34
- package/monodog-dashboard/src/components/configuration/components/ConfigurationModal.tsx +0 -20
- package/monodog-dashboard/src/components/configuration/components/ConfigurationTabs.tsx +0 -30
- package/monodog-dashboard/src/components/configuration/components/FeatureToggles.tsx +0 -66
- package/monodog-dashboard/src/components/configuration/components/GeneralSettings.tsx +0 -77
- package/monodog-dashboard/src/components/configuration/components/MonorepoSettings.tsx +0 -179
- package/monodog-dashboard/src/components/configuration/components/index.ts +0 -8
- package/monodog-dashboard/src/components/configuration/types/config.types.ts +0 -52
- package/monodog-dashboard/src/components/configuration/utils/config.utils.tsx +0 -115
- package/monodog-dashboard/src/components/main-dashboard/Dashboard.tsx +0 -242
- package/monodog-dashboard/src/components/main-dashboard/Layout.tsx +0 -112
- package/monodog-dashboard/src/components/main-dashboard/components/Header.tsx +0 -47
- package/monodog-dashboard/src/components/main-dashboard/components/PackageDistribution.tsx +0 -35
- package/monodog-dashboard/src/components/main-dashboard/components/PackageSearchFilter.tsx +0 -47
- package/monodog-dashboard/src/components/main-dashboard/components/PackageTable.tsx +0 -87
- package/monodog-dashboard/src/components/main-dashboard/components/QuickActions.tsx +0 -60
- package/monodog-dashboard/src/components/main-dashboard/components/StatsCards.tsx +0 -73
- package/monodog-dashboard/src/components/main-dashboard/components/index.ts +0 -7
- package/monodog-dashboard/src/components/main-dashboard/types/dashboard.types.ts +0 -33
- package/monodog-dashboard/src/components/main-dashboard/utils/dashboard.utils.tsx +0 -70
- package/monodog-dashboard/src/components/modules/ci-integration/CIIntegration.tsx +0 -277
- package/monodog-dashboard/src/components/modules/ci-integration/components/BuildDetails.tsx +0 -228
- package/monodog-dashboard/src/components/modules/ci-integration/components/BuildList.tsx +0 -212
- package/monodog-dashboard/src/components/modules/ci-integration/components/BuildOverview.tsx +0 -158
- package/monodog-dashboard/src/components/modules/ci-integration/components/CIIntegrationHeader.tsx +0 -38
- package/monodog-dashboard/src/components/modules/ci-integration/components/ErrorState.tsx +0 -25
- package/monodog-dashboard/src/components/modules/ci-integration/components/LoadingState.tsx +0 -16
- package/monodog-dashboard/src/components/modules/ci-integration/components/PipelineStatus.tsx +0 -223
- package/monodog-dashboard/src/components/modules/ci-integration/components/index.ts +0 -8
- package/monodog-dashboard/src/components/modules/ci-integration/types/ci.types.ts +0 -97
- package/monodog-dashboard/src/components/modules/ci-integration/utils/ci.utils.tsx +0 -264
- package/monodog-dashboard/src/components/modules/config-inspector/ConfigInspector.tsx +0 -324
- package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigEditor.tsx +0 -93
- package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigInspectorHeader.tsx +0 -36
- package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigPreview.tsx +0 -89
- package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigSidebar.tsx +0 -141
- package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigToolbar.tsx +0 -184
- package/monodog-dashboard/src/components/modules/config-inspector/components/ErrorState.tsx +0 -25
- package/monodog-dashboard/src/components/modules/config-inspector/components/LoadingState.tsx +0 -16
- package/monodog-dashboard/src/components/modules/config-inspector/components/ValidationPanel.tsx +0 -155
- package/monodog-dashboard/src/components/modules/config-inspector/components/index.ts +0 -9
- package/monodog-dashboard/src/components/modules/config-inspector/types/config.types.ts +0 -100
- package/monodog-dashboard/src/components/modules/config-inspector/utils/config.utils.tsx +0 -704
- package/monodog-dashboard/src/components/modules/dependency-graph/DependencyGraph.tsx +0 -224
- package/monodog-dashboard/src/components/modules/dependency-graph/components/CircularDependencies.tsx +0 -177
- package/monodog-dashboard/src/components/modules/dependency-graph/components/DependencyDetails.tsx +0 -192
- package/monodog-dashboard/src/components/modules/dependency-graph/components/DependencyGraphHeader.tsx +0 -30
- package/monodog-dashboard/src/components/modules/dependency-graph/components/DependencyList.tsx +0 -177
- package/monodog-dashboard/src/components/modules/dependency-graph/components/ErrorState.tsx +0 -25
- package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphLegend.tsx +0 -89
- package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphStats.tsx +0 -141
- package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphToolbar.tsx +0 -107
- package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphVisualization.tsx +0 -179
- package/monodog-dashboard/src/components/modules/dependency-graph/components/LoadingState.tsx +0 -16
- package/monodog-dashboard/src/components/modules/dependency-graph/components/index.ts +0 -11
- package/monodog-dashboard/src/components/modules/dependency-graph/types/dependency.types.ts +0 -105
- package/monodog-dashboard/src/components/modules/dependency-graph/utils/dependency.utils.tsx +0 -433
- package/monodog-dashboard/src/components/modules/health-status/HealthStatus.tsx +0 -739
- package/monodog-dashboard/src/components/modules/health-status/components/ErrorState.tsx +0 -25
- package/monodog-dashboard/src/components/modules/health-status/components/HealthActions.tsx +0 -122
- package/monodog-dashboard/src/components/modules/health-status/components/HealthAlerts.tsx +0 -151
- package/monodog-dashboard/src/components/modules/health-status/components/HealthMetrics.tsx +0 -132
- package/monodog-dashboard/src/components/modules/health-status/components/HealthStatusHeader.tsx +0 -30
- package/monodog-dashboard/src/components/modules/health-status/components/LoadingState.tsx +0 -16
- package/monodog-dashboard/src/components/modules/health-status/components/OverallHealthScore.tsx +0 -122
- package/monodog-dashboard/src/components/modules/health-status/components/PackageHealthList.tsx +0 -195
- package/monodog-dashboard/src/components/modules/health-status/types/health.types.ts +0 -80
- package/monodog-dashboard/src/components/modules/health-status/utils/health.utils.tsx +0 -220
- package/monodog-dashboard/src/components/modules/packages/PackageDetail.tsx +0 -255
- package/monodog-dashboard/src/components/modules/packages/PackagesOverview.tsx +0 -166
- package/monodog-dashboard/src/components/modules/packages/components/ConfigurationTab.tsx +0 -311
- package/monodog-dashboard/src/components/modules/packages/components/DependenciesTab.tsx +0 -154
- package/monodog-dashboard/src/components/modules/packages/components/ErrorState.tsx +0 -21
- package/monodog-dashboard/src/components/modules/packages/components/HealthMetricsTab.tsx +0 -275
- package/monodog-dashboard/src/components/modules/packages/components/LoadingState.tsx +0 -14
- package/monodog-dashboard/src/components/modules/packages/components/PackageDetailHeader.tsx +0 -167
- package/monodog-dashboard/src/components/modules/packages/components/PackageDetailTabs.tsx +0 -49
- package/monodog-dashboard/src/components/modules/packages/components/PackageStats.tsx +0 -70
- package/monodog-dashboard/src/components/modules/packages/components/PackagesTable.tsx +0 -163
- package/monodog-dashboard/src/components/modules/packages/components/RecentCommitsTab.tsx +0 -90
- package/monodog-dashboard/src/components/modules/packages/components/SearchAndFilter.tsx +0 -66
- package/monodog-dashboard/src/components/modules/packages/components/index.ts +0 -12
- package/monodog-dashboard/src/components/modules/packages/types/packages.types.ts +0 -101
- package/monodog-dashboard/src/components/modules/packages/utils/packages.utils.tsx +0 -178
- package/monodog-dashboard/src/components/pipeline/JobsList.tsx +0 -83
- package/monodog-dashboard/src/components/pipeline/LogViewer.tsx +0 -392
- package/monodog-dashboard/src/components/pipeline/PipelineManager.tsx +0 -562
- package/monodog-dashboard/src/components/pipeline/WorkflowRunsList.tsx +0 -272
- package/monodog-dashboard/src/components/pipeline/WorkflowTrigger.tsx +0 -182
- package/monodog-dashboard/src/components/pipeline/utils/pipeline.utils.tsx +0 -11
- package/monodog-dashboard/src/components/publish-control/PublishControl.tsx +0 -229
- package/monodog-dashboard/src/components/publish-control/components/ChangelogViewer.tsx +0 -103
- package/monodog-dashboard/src/components/publish-control/components/ErrorState.tsx +0 -23
- package/monodog-dashboard/src/components/publish-control/components/LoadingState.tsx +0 -10
- package/monodog-dashboard/src/components/publish-control/components/PackageReleaseTable.tsx +0 -140
- package/monodog-dashboard/src/components/publish-control/components/PublishHeader.tsx +0 -30
- package/monodog-dashboard/src/components/publish-control/components/QuickActionCards.tsx +0 -56
- package/monodog-dashboard/src/components/publish-control/components/ReleaseSchedule.tsx +0 -104
- package/monodog-dashboard/src/components/publish-control/components/index.ts +0 -8
- package/monodog-dashboard/src/components/publish-control/types/publish.types.ts +0 -39
- package/monodog-dashboard/src/components/publish-control/utils/publish.utils.ts +0 -59
- package/monodog-dashboard/src/components/release-manager/ReleaseManager.tsx +0 -342
- package/monodog-dashboard/src/components/release-manager/components/ChangesetPreview.tsx +0 -123
- package/monodog-dashboard/src/components/release-manager/components/ErrorState.tsx +0 -38
- package/monodog-dashboard/src/components/release-manager/components/LoadingState.tsx +0 -18
- package/monodog-dashboard/src/components/release-manager/components/PackageSelector.tsx +0 -137
- package/monodog-dashboard/src/components/release-manager/components/PublishConfirmation.tsx +0 -150
- package/monodog-dashboard/src/components/release-manager/components/ReleaseValidation.tsx +0 -138
- package/monodog-dashboard/src/components/release-manager/components/VersionBumpSelector.tsx +0 -142
- package/monodog-dashboard/src/components/release-manager/types/index.ts +0 -9
- package/monodog-dashboard/src/components/release-manager/types/release-manager.types.ts +0 -29
- package/monodog-dashboard/src/components/setup-guide/SetupGuide.tsx +0 -96
- package/monodog-dashboard/src/components/setup-guide/components/SetupHeader.tsx +0 -24
- package/monodog-dashboard/src/components/setup-guide/components/SetupModal.tsx +0 -24
- package/monodog-dashboard/src/components/setup-guide/components/SetupProgress.tsx +0 -29
- package/monodog-dashboard/src/components/setup-guide/components/StepContent.tsx +0 -272
- package/monodog-dashboard/src/components/setup-guide/components/StepNavigation.tsx +0 -62
- package/monodog-dashboard/src/components/setup-guide/components/index.ts +0 -6
- package/monodog-dashboard/src/components/setup-guide/types/setup.types.ts +0 -38
- package/monodog-dashboard/src/components/setup-guide/utils/setup.utils.ts +0 -79
- package/monodog-dashboard/src/constants/api-config.ts +0 -81
- package/monodog-dashboard/src/constants/index.ts +0 -9
- package/monodog-dashboard/src/constants/messages.ts +0 -40
- package/monodog-dashboard/src/icons/heroicons.ts +0 -65
- package/monodog-dashboard/src/icons/index.tsx +0 -1788
- package/monodog-dashboard/src/index.css +0 -175
- package/monodog-dashboard/src/main.tsx +0 -9
- package/monodog-dashboard/src/pages/AuthCallbackPage.tsx +0 -103
- package/monodog-dashboard/src/pages/CIPage.tsx +0 -6
- package/monodog-dashboard/src/pages/ConfigPage.tsx +0 -6
- package/monodog-dashboard/src/pages/DashboardPage.tsx +0 -6
- package/monodog-dashboard/src/pages/DependenciesPage.tsx +0 -6
- package/monodog-dashboard/src/pages/HealthPage.tsx +0 -6
- package/monodog-dashboard/src/pages/LoginPage.tsx +0 -77
- package/monodog-dashboard/src/pages/PackageDetailPage.tsx +0 -6
- package/monodog-dashboard/src/pages/PackagesPage.tsx +0 -6
- package/monodog-dashboard/src/pages/PipelinePage.tsx +0 -22
- package/monodog-dashboard/src/pages/PublishPage.tsx +0 -6
- package/monodog-dashboard/src/pages/ReleaseManagerPage.tsx +0 -9
- package/monodog-dashboard/src/pages/index.ts +0 -28
- package/monodog-dashboard/src/routes/AppRouter.tsx +0 -89
- package/monodog-dashboard/src/routes/AppRouterPages.tsx +0 -56
- package/monodog-dashboard/src/routes/index.ts +0 -10
- package/monodog-dashboard/src/routes/routes.config.ts +0 -94
- package/monodog-dashboard/src/services/api/api-client.ts +0 -189
- package/monodog-dashboard/src/services/api/index.ts +0 -30
- package/monodog-dashboard/src/services/api/types/api.types.ts +0 -63
- package/monodog-dashboard/src/services/auth-context.tsx +0 -344
- package/monodog-dashboard/src/services/monorepoService.ts +0 -733
- package/monodog-dashboard/src/services/permission-context.tsx +0 -193
- package/monodog-dashboard/src/theme/COMPONENT_UPDATES.md +0 -273
- package/monodog-dashboard/src/theme/INTEGRATION.md +0 -381
- package/monodog-dashboard/src/theme/README.md +0 -239
- package/monodog-dashboard/src/theme/examples.tsx +0 -386
- package/monodog-dashboard/src/theme/index.ts +0 -402
- package/monodog-dashboard/src/theme/migration-guide.md +0 -335
- package/monodog-dashboard/src/types/auth-context.types.ts +0 -51
- package/monodog-dashboard/src/types/component.types.ts +0 -96
- package/monodog-dashboard/src/types/icons.types.ts +0 -13
- package/monodog-dashboard/src/types/index.ts +0 -68
- package/monodog-dashboard/src/types/monorepo-service.types.ts +0 -53
- package/monodog-dashboard/src/types/permission-context.types.ts +0 -49
- package/monodog-dashboard/src/types/pipeline.types.ts +0 -89
- package/monodog-dashboard/src/types/routes.types.ts +0 -12
- package/monodog-dashboard/src/utils/cookies.ts +0 -47
- package/monodog-dashboard/tailwind.config.js +0 -68
- package/monodog-dashboard/tsconfig.app.json +0 -14
- package/monodog-dashboard/tsconfig.json +0 -17
- package/monodog-dashboard/tsconfig.node.json +0 -10
- package/monodog-dashboard/vite.config.ts +0 -9
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react';
|
|
2
|
-
import { useParams } from 'react-router-dom';
|
|
3
|
-
// No additional icons needed - using sub-components
|
|
4
|
-
|
|
5
|
-
// Import sub-components
|
|
6
|
-
import {
|
|
7
|
-
LoadingState,
|
|
8
|
-
PackageDetailHeader,
|
|
9
|
-
PackageDetailTabs,
|
|
10
|
-
DependenciesTab,
|
|
11
|
-
RecentCommitsTab,
|
|
12
|
-
HealthMetricsTab,
|
|
13
|
-
ConfigurationTab,
|
|
14
|
-
} from './components';
|
|
15
|
-
|
|
16
|
-
// Import types
|
|
17
|
-
import {
|
|
18
|
-
PackageDetail as PackageDetailType,
|
|
19
|
-
PackageDetailTab,
|
|
20
|
-
} from './types/packages.types';
|
|
21
|
-
|
|
22
|
-
import { monorepoService } from '../../../services/monorepoService';
|
|
23
|
-
|
|
24
|
-
// Re-export types for backward compatibility
|
|
25
|
-
export type { PackageDetail as PackageDetailType } from './types/packages.types';
|
|
26
|
-
|
|
27
|
-
// Mock data (in real implementation, this would come from an API)
|
|
28
|
-
// const mockPackageDetail: PackageDetailType = {
|
|
29
|
-
// name: '@myorg/ui-components',
|
|
30
|
-
// version: '2.1.0',
|
|
31
|
-
// type: 'lib',
|
|
32
|
-
// status: 'healthy',
|
|
33
|
-
// description: 'Reusable UI components library for our design system',
|
|
34
|
-
// lastUpdated: '2024-01-15',
|
|
35
|
-
// dependencies: [
|
|
36
|
-
// {
|
|
37
|
-
// name: 'react',
|
|
38
|
-
// version: '18.2.0',
|
|
39
|
-
// latest: '18.2.0',
|
|
40
|
-
// status: 'up-to-date',
|
|
41
|
-
// },
|
|
42
|
-
// {
|
|
43
|
-
// name: 'typescript',
|
|
44
|
-
// version: '5.0.0',
|
|
45
|
-
// latest: '5.3.0',
|
|
46
|
-
// status: 'outdated',
|
|
47
|
-
// },
|
|
48
|
-
// {
|
|
49
|
-
// name: '@types/react',
|
|
50
|
-
// version: '18.0.0',
|
|
51
|
-
// latest: '18.2.0',
|
|
52
|
-
// status: 'outdated',
|
|
53
|
-
// },
|
|
54
|
-
// {
|
|
55
|
-
// name: 'tailwindcss',
|
|
56
|
-
// version: '3.3.0',
|
|
57
|
-
// latest: '4.0.0',
|
|
58
|
-
// status: 'major-update',
|
|
59
|
-
// },
|
|
60
|
-
// ],
|
|
61
|
-
// devDependencies: [
|
|
62
|
-
// { name: 'jest', version: '29.0.0', latest: '29.7.0', status: 'outdated' },
|
|
63
|
-
// {
|
|
64
|
-
// name: '@testing-library/react',
|
|
65
|
-
// version: '13.0.0',
|
|
66
|
-
// latest: '14.1.0',
|
|
67
|
-
// status: 'major-update',
|
|
68
|
-
// },
|
|
69
|
-
// {
|
|
70
|
-
// name: 'storybook',
|
|
71
|
-
// version: '7.0.0',
|
|
72
|
-
// latest: '7.6.0',
|
|
73
|
-
// status: 'outdated',
|
|
74
|
-
// },
|
|
75
|
-
// ],
|
|
76
|
-
// maintainers: ['john.doe@company.com', 'jane.smith@company.com'],
|
|
77
|
-
// tags: ['ui', 'components', 'design-system', 'react'],
|
|
78
|
-
// repository: 'https://github.com/myorg/monorepo',
|
|
79
|
-
// license: 'MIT',
|
|
80
|
-
// scripts: {
|
|
81
|
-
// build: 'tsc && vite build',
|
|
82
|
-
// dev: 'vite',
|
|
83
|
-
// test: 'jest',
|
|
84
|
-
// 'test:watch': 'jest --watch',
|
|
85
|
-
// lint: 'eslint src --ext .ts,.tsx',
|
|
86
|
-
// 'lint:fix': 'eslint src --ext .ts,.tsx --fix',
|
|
87
|
-
// storybook: 'storybook dev -p 6006',
|
|
88
|
-
// 'build-storybook': 'storybook build',
|
|
89
|
-
// },
|
|
90
|
-
// commits: [
|
|
91
|
-
// {
|
|
92
|
-
// hash: '1a2b3c4',
|
|
93
|
-
// message: 'feat: add new Button variant with loading state',
|
|
94
|
-
// author: 'John Doe',
|
|
95
|
-
// date: '2024-01-15',
|
|
96
|
-
// type: 'feature',
|
|
97
|
-
// },
|
|
98
|
-
// {
|
|
99
|
-
// hash: '5d6e7f8',
|
|
100
|
-
// message: 'fix: resolve accessibility issues in Modal component',
|
|
101
|
-
// author: 'Jane Smith',
|
|
102
|
-
// date: '2024-01-14',
|
|
103
|
-
// type: 'fix',
|
|
104
|
-
// },
|
|
105
|
-
// {
|
|
106
|
-
// hash: '9g0h1i2',
|
|
107
|
-
// message: 'chore: update dependencies',
|
|
108
|
-
// author: 'Bob Wilson',
|
|
109
|
-
// date: '2024-01-13',
|
|
110
|
-
// type: 'chore',
|
|
111
|
-
// },
|
|
112
|
-
// ],
|
|
113
|
-
// healthScore: 85,
|
|
114
|
-
// buildStatus: 'success',
|
|
115
|
-
// testCoverage: 78,
|
|
116
|
-
// lintStatus: 'pass',
|
|
117
|
-
// };
|
|
118
|
-
|
|
119
|
-
export default function PackageDetail() {
|
|
120
|
-
const { name } = useParams<{ name: string }>();
|
|
121
|
-
const [packageData, setPackageData] = useState<PackageDetailType | null>(
|
|
122
|
-
null
|
|
123
|
-
);
|
|
124
|
-
const [activeTab, setActiveTab] = useState<PackageDetailTab>('overview');
|
|
125
|
-
|
|
126
|
-
useEffect(() => {
|
|
127
|
-
const fetchPackage = async () => {
|
|
128
|
-
try {
|
|
129
|
-
const data = await monorepoService.getPackage(name ?? '');
|
|
130
|
-
setPackageData(data);
|
|
131
|
-
} catch (err) {
|
|
132
|
-
console.error('Error fetching packages:', err);
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
fetchPackage();
|
|
137
|
-
}, [name]);
|
|
138
|
-
|
|
139
|
-
// Loading state
|
|
140
|
-
if (!packageData) {
|
|
141
|
-
return <LoadingState message="Loading package details..." />;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// Render tab content
|
|
145
|
-
const renderTabContent = () => {
|
|
146
|
-
switch (activeTab) {
|
|
147
|
-
case 'overview':
|
|
148
|
-
return (
|
|
149
|
-
<div className="py-6">
|
|
150
|
-
<div className="bg-white border rounded-lg p-6">
|
|
151
|
-
<h3 className="text-lg font-medium text-gray-900 mb-4">
|
|
152
|
-
Package Overview
|
|
153
|
-
</h3>
|
|
154
|
-
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
155
|
-
<div>
|
|
156
|
-
<h4 className="text-sm font-medium text-gray-700 mb-2">
|
|
157
|
-
Description
|
|
158
|
-
</h4>
|
|
159
|
-
<p className="text-gray-600 mb-4">
|
|
160
|
-
{packageData.description}
|
|
161
|
-
</p>
|
|
162
|
-
|
|
163
|
-
<h4 className="hidden text-sm font-medium text-gray-700 mb-2">
|
|
164
|
-
Maintainers
|
|
165
|
-
</h4>
|
|
166
|
-
<div className="space-y-1">
|
|
167
|
-
{Object.keys(packageData.maintainers).map(maintainer => (
|
|
168
|
-
<div key={maintainer} className="text-sm text-gray-600">
|
|
169
|
-
{maintainer}
|
|
170
|
-
</div>
|
|
171
|
-
))}
|
|
172
|
-
</div>
|
|
173
|
-
</div>
|
|
174
|
-
|
|
175
|
-
<div>
|
|
176
|
-
<h4 className="text-sm font-medium text-gray-700 mb-2">
|
|
177
|
-
Quick Stats
|
|
178
|
-
</h4>
|
|
179
|
-
<div className="space-y-2 text-sm">
|
|
180
|
-
<div className="flex justify-between">
|
|
181
|
-
<span className="text-gray-600">Dependencies:</span>
|
|
182
|
-
<span className="font-medium">
|
|
183
|
-
{
|
|
184
|
-
packageData.dependenciesInfo.filter(
|
|
185
|
-
d => d.type == 'dependency'
|
|
186
|
-
).length
|
|
187
|
-
}
|
|
188
|
-
</span>
|
|
189
|
-
</div>
|
|
190
|
-
<div className="flex justify-between">
|
|
191
|
-
<span className="text-gray-600">Dev Dependencies:</span>
|
|
192
|
-
<span className="font-medium">
|
|
193
|
-
{
|
|
194
|
-
packageData.dependenciesInfo.filter(
|
|
195
|
-
d => d.type == 'devDependency'
|
|
196
|
-
).length
|
|
197
|
-
}
|
|
198
|
-
</span>
|
|
199
|
-
</div>
|
|
200
|
-
<div className="flex justify-between">
|
|
201
|
-
<span className="text-gray-600">Peer Dependencies:</span>
|
|
202
|
-
<span className="font-medium">
|
|
203
|
-
{
|
|
204
|
-
packageData.dependenciesInfo.filter(
|
|
205
|
-
d => d.type == 'peerDependency'
|
|
206
|
-
).length
|
|
207
|
-
}
|
|
208
|
-
</span>
|
|
209
|
-
</div>
|
|
210
|
-
<div className="flex justify-between">
|
|
211
|
-
<span className="text-gray-600">Scripts:</span>
|
|
212
|
-
<span className="font-medium">
|
|
213
|
-
{Object.keys(packageData.scripts).length}
|
|
214
|
-
</span>
|
|
215
|
-
</div>
|
|
216
|
-
<div className="flex justify-between">
|
|
217
|
-
<span className="text-gray-600">Recent Commits:</span>
|
|
218
|
-
<span className="font-medium">
|
|
219
|
-
{packageData.commits?.length}
|
|
220
|
-
</span>
|
|
221
|
-
</div>
|
|
222
|
-
</div>
|
|
223
|
-
</div>
|
|
224
|
-
</div>
|
|
225
|
-
</div>
|
|
226
|
-
</div>
|
|
227
|
-
);
|
|
228
|
-
case 'dependencies':
|
|
229
|
-
return <DependenciesTab packageData={packageData} />;
|
|
230
|
-
case 'commits':
|
|
231
|
-
return <RecentCommitsTab packageData={packageData} />;
|
|
232
|
-
case 'health':
|
|
233
|
-
return <HealthMetricsTab packageData={packageData} />;
|
|
234
|
-
case 'config':
|
|
235
|
-
return <ConfigurationTab packageData={packageData} />;
|
|
236
|
-
default:
|
|
237
|
-
return null;
|
|
238
|
-
}
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
return (
|
|
242
|
-
<div className="space-y-6">
|
|
243
|
-
{/* Package Header */}
|
|
244
|
-
<PackageDetailHeader packageData={packageData} />
|
|
245
|
-
|
|
246
|
-
{/* Tabs */}
|
|
247
|
-
<div className="bg-white rounded-lg shadow border">
|
|
248
|
-
<PackageDetailTabs activeTab={activeTab} onTabChange={setActiveTab} />
|
|
249
|
-
|
|
250
|
-
{/* Tab Content */}
|
|
251
|
-
<div className="px-6">{renderTabContent()}</div>
|
|
252
|
-
</div>
|
|
253
|
-
</div>
|
|
254
|
-
);
|
|
255
|
-
}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react';
|
|
2
|
-
import { PlusIcon } from '../../../icons/heroicons';
|
|
3
|
-
import { CubeIcon } from '../../../icons/heroicons';
|
|
4
|
-
import { DASHBOARD_ERROR_MESSAGES } from '../../../constants/messages';
|
|
5
|
-
// Import sub-components
|
|
6
|
-
import {
|
|
7
|
-
LoadingState,
|
|
8
|
-
ErrorState,
|
|
9
|
-
PackageStats,
|
|
10
|
-
SearchAndFilter,
|
|
11
|
-
PackagesTable,
|
|
12
|
-
} from './components';
|
|
13
|
-
|
|
14
|
-
// Import types and utilities
|
|
15
|
-
import {
|
|
16
|
-
Package,
|
|
17
|
-
PackageFilters,
|
|
18
|
-
PackageSorting,
|
|
19
|
-
} from './types/packages.types';
|
|
20
|
-
import {
|
|
21
|
-
calculatePackageStats,
|
|
22
|
-
getUniquePackageTypes,
|
|
23
|
-
getUniquePackageStatuses,
|
|
24
|
-
filterPackages,
|
|
25
|
-
sortPackages,
|
|
26
|
-
} from './utils/packages.utils';
|
|
27
|
-
|
|
28
|
-
// Import service
|
|
29
|
-
import { monorepoService } from '../../../services/monorepoService';
|
|
30
|
-
|
|
31
|
-
// Re-export types for backward compatibility
|
|
32
|
-
export type { Package } from './types/packages.types';
|
|
33
|
-
|
|
34
|
-
export default function PackagesOverview() {
|
|
35
|
-
const [packages, setPackages] = useState<Package[]>([]);
|
|
36
|
-
const [loading, setLoading] = useState(true);
|
|
37
|
-
const [error, setError] = useState<string | null>(null);
|
|
38
|
-
|
|
39
|
-
// Filters and sorting state
|
|
40
|
-
const [filters, setFilters] = useState<PackageFilters>({
|
|
41
|
-
search: '',
|
|
42
|
-
type: 'all',
|
|
43
|
-
status: 'all',
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
const [sorting, setSorting] = useState<PackageSorting>({
|
|
47
|
-
field: 'name',
|
|
48
|
-
order: 'asc',
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
// Fetch packages
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
const fetchPackages = async () => {
|
|
54
|
-
try {
|
|
55
|
-
setLoading(true);
|
|
56
|
-
const data = await monorepoService.getPackages();
|
|
57
|
-
setPackages(data);
|
|
58
|
-
setError(null);
|
|
59
|
-
} catch (err) {
|
|
60
|
-
setError(DASHBOARD_ERROR_MESSAGES.FAILED_TO_FETCH_PACKAGES);
|
|
61
|
-
console.error('Error fetching packages:', err);
|
|
62
|
-
} finally {
|
|
63
|
-
setLoading(false);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
fetchPackages();
|
|
68
|
-
}, []);
|
|
69
|
-
|
|
70
|
-
// Handle retry
|
|
71
|
-
const handleRetry = () => {
|
|
72
|
-
window.location.reload();
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
// Process packages for display
|
|
76
|
-
const filteredPackages = filterPackages(packages, filters);
|
|
77
|
-
const sortedPackages = sortPackages(filteredPackages, sorting);
|
|
78
|
-
const stats = calculatePackageStats(packages);
|
|
79
|
-
const availableTypes = getUniquePackageTypes(packages);
|
|
80
|
-
const availableStatuses = getUniquePackageStatuses(packages);
|
|
81
|
-
|
|
82
|
-
// Loading state
|
|
83
|
-
if (loading) {
|
|
84
|
-
return <LoadingState />;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// Error state
|
|
88
|
-
if (error) {
|
|
89
|
-
return <ErrorState error={error} onRetry={handleRetry} />;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return (
|
|
93
|
-
<div className="space-y-6">
|
|
94
|
-
{/* Header */}
|
|
95
|
-
<div className="flex items-center justify-between">
|
|
96
|
-
<div>
|
|
97
|
-
<h1 className="text-heading text-2xl">Packages Overview</h1>
|
|
98
|
-
<p className="text-body mt-1">
|
|
99
|
-
Manage and monitor all packages in your monorepo
|
|
100
|
-
</p>
|
|
101
|
-
</div>
|
|
102
|
-
{/* <button className="btn-primary flex items-center space-x-2">
|
|
103
|
-
<PlusIcon className="w-5 h-5" />
|
|
104
|
-
<span>Add Package</span>
|
|
105
|
-
</button> */}
|
|
106
|
-
</div>
|
|
107
|
-
|
|
108
|
-
{/* Stats Cards */}
|
|
109
|
-
<PackageStats stats={stats} />
|
|
110
|
-
|
|
111
|
-
{/* Search and Filters */}
|
|
112
|
-
<SearchAndFilter
|
|
113
|
-
filters={filters}
|
|
114
|
-
onFiltersChange={setFilters}
|
|
115
|
-
availableTypes={availableTypes}
|
|
116
|
-
availableStatuses={availableStatuses}
|
|
117
|
-
/>
|
|
118
|
-
|
|
119
|
-
{/* Results Summary */}
|
|
120
|
-
<div className="flex items-center justify-between text-sm text-gray-600">
|
|
121
|
-
<span>
|
|
122
|
-
Showing {sortedPackages.length} of {packages.length} packages
|
|
123
|
-
{filters.search && ` matching "${filters.search}"`}
|
|
124
|
-
</span>
|
|
125
|
-
<span>
|
|
126
|
-
{filters.type !== 'all' && `Filtered by type: ${filters.type}`}
|
|
127
|
-
{filters.status !== 'all' && ` • status: ${filters.status}`}
|
|
128
|
-
</span>
|
|
129
|
-
</div>
|
|
130
|
-
|
|
131
|
-
{/* Packages Table */}
|
|
132
|
-
<PackagesTable
|
|
133
|
-
packages={sortedPackages}
|
|
134
|
-
sorting={sorting}
|
|
135
|
-
onSortChange={setSorting}
|
|
136
|
-
/>
|
|
137
|
-
|
|
138
|
-
{/* Empty State */}
|
|
139
|
-
{sortedPackages.length === 0 && !loading && (
|
|
140
|
-
<div className="text-center py-12">
|
|
141
|
-
<div className="text-neutral-400 text-6xl mb-4 flex justify-center"><CubeIcon className="w-6 h-6 text-primary-600" /></div>
|
|
142
|
-
<h3 className="text-heading text-lg mb-2">No packages found</h3>
|
|
143
|
-
<p className="text-body mb-4">
|
|
144
|
-
{filters.search ||
|
|
145
|
-
filters.type !== 'all' ||
|
|
146
|
-
filters.status !== 'all'
|
|
147
|
-
? 'Try adjusting your filters to see more results.'
|
|
148
|
-
: 'Get started by adding your first package to the monorepo.'}
|
|
149
|
-
</p>
|
|
150
|
-
{(filters.search ||
|
|
151
|
-
filters.type !== 'all' ||
|
|
152
|
-
filters.status !== 'all') && (
|
|
153
|
-
<button
|
|
154
|
-
onClick={() =>
|
|
155
|
-
setFilters({ search: '', type: 'all', status: 'all' })
|
|
156
|
-
}
|
|
157
|
-
className="text-primary-600 hover:text-primary-500"
|
|
158
|
-
>
|
|
159
|
-
Clear Filters
|
|
160
|
-
</button>
|
|
161
|
-
)}
|
|
162
|
-
</div>
|
|
163
|
-
)}
|
|
164
|
-
</div>
|
|
165
|
-
);
|
|
166
|
-
}
|