@factorim/monotui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +36 -0
- package/.github/workflows/publish-to-npm.yml +36 -0
- package/.husky/commit-msg +2 -0
- package/.husky/pre-commit +2 -0
- package/.vscode/settings.json +34 -0
- package/LICENSE +21 -0
- package/README.md +78 -0
- package/biome.json +37 -0
- package/commitlint.config.cjs +3 -0
- package/dist/app/App.d.ts +2 -0
- package/dist/app/App.d.ts.map +1 -0
- package/dist/app/App.js +15 -0
- package/dist/app/App.js.map +1 -0
- package/dist/app/Layout.d.ts +2 -0
- package/dist/app/Layout.d.ts.map +1 -0
- package/dist/app/Layout.js +25 -0
- package/dist/app/Layout.js.map +1 -0
- package/dist/app/pages/About.d.ts +2 -0
- package/dist/app/pages/About.d.ts.map +1 -0
- package/dist/app/pages/About.js +6 -0
- package/dist/app/pages/About.js.map +1 -0
- package/dist/app/pages/AboutPage.d.ts +2 -0
- package/dist/app/pages/AboutPage.d.ts.map +1 -0
- package/dist/app/pages/AboutPage.js +6 -0
- package/dist/app/pages/AboutPage.js.map +1 -0
- package/dist/app/pages/Exit.d.ts +2 -0
- package/dist/app/pages/Exit.d.ts.map +1 -0
- package/dist/app/pages/Exit.js +6 -0
- package/dist/app/pages/Exit.js.map +1 -0
- package/dist/app/pages/ProjectPage.d.ts +2 -0
- package/dist/app/pages/ProjectPage.d.ts.map +1 -0
- package/dist/app/pages/ProjectPage.js +20 -0
- package/dist/app/pages/ProjectPage.js.map +1 -0
- package/dist/app/pages/Workspace.d.ts +2 -0
- package/dist/app/pages/Workspace.d.ts.map +1 -0
- package/dist/app/pages/Workspace.js +14 -0
- package/dist/app/pages/Workspace.js.map +1 -0
- package/dist/app/pages/WorkspacePage.d.ts +2 -0
- package/dist/app/pages/WorkspacePage.d.ts.map +1 -0
- package/dist/app/pages/WorkspacePage.js +16 -0
- package/dist/app/pages/WorkspacePage.js.map +1 -0
- package/dist/app/pages/Workspaces.d.ts +2 -0
- package/dist/app/pages/Workspaces.d.ts.map +1 -0
- package/dist/app/pages/Workspaces.js +16 -0
- package/dist/app/pages/Workspaces.js.map +1 -0
- package/dist/app/pages/WorkspacesPage.d.ts +2 -0
- package/dist/app/pages/WorkspacesPage.d.ts.map +1 -0
- package/dist/app/pages/WorkspacesPage.js +15 -0
- package/dist/app/pages/WorkspacesPage.js.map +1 -0
- package/dist/bin/init.d.ts +3 -0
- package/dist/bin/init.d.ts.map +1 -0
- package/dist/bin/init.js +7 -0
- package/dist/bin/init.js.map +1 -0
- package/dist/bin/trace-warnings.d.ts +3 -0
- package/dist/bin/trace-warnings.d.ts.map +1 -0
- package/dist/bin/trace-warnings.js +17 -0
- package/dist/bin/trace-warnings.js.map +1 -0
- package/dist/commands/init.d.ts +5 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +65 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/components/features/ProjectGrid/ColCompose.d.ts +12 -0
- package/dist/components/features/ProjectGrid/ColCompose.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/ColCompose.js +16 -0
- package/dist/components/features/ProjectGrid/ColCompose.js.map +1 -0
- package/dist/components/features/ProjectGrid/ColMakefile.d.ts +9 -0
- package/dist/components/features/ProjectGrid/ColMakefile.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/ColMakefile.js +8 -0
- package/dist/components/features/ProjectGrid/ColMakefile.js.map +1 -0
- package/dist/components/features/ProjectGrid/ColPackageJson.d.ts +11 -0
- package/dist/components/features/ProjectGrid/ColPackageJson.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/ColPackageJson.js +8 -0
- package/dist/components/features/ProjectGrid/ColPackageJson.js.map +1 -0
- package/dist/components/features/ProjectGrid/EmptyCol.d.ts +2 -0
- package/dist/components/features/ProjectGrid/EmptyCol.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/EmptyCol.js +8 -0
- package/dist/components/features/ProjectGrid/EmptyCol.js.map +1 -0
- package/dist/components/features/ProjectGrid/ProjectCommands.d.ts +2 -0
- package/dist/components/features/ProjectGrid/ProjectCommands.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/ProjectCommands.js +6 -0
- package/dist/components/features/ProjectGrid/ProjectCommands.js.map +1 -0
- package/dist/components/features/ProjectGrid/ProjectGrid.d.ts +2 -0
- package/dist/components/features/ProjectGrid/ProjectGrid.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/ProjectGrid.js +25 -0
- package/dist/components/features/ProjectGrid/ProjectGrid.js.map +1 -0
- package/dist/components/features/ProjectGrid/ProjectInfo.d.ts +2 -0
- package/dist/components/features/ProjectGrid/ProjectInfo.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/ProjectInfo.js +13 -0
- package/dist/components/features/ProjectGrid/ProjectInfo.js.map +1 -0
- package/dist/components/features/ProjectGrid/WorkspaceCommands.d.ts +2 -0
- package/dist/components/features/ProjectGrid/WorkspaceCommands.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/WorkspaceCommands.js +6 -0
- package/dist/components/features/ProjectGrid/WorkspaceCommands.js.map +1 -0
- package/dist/components/features/ProjectGrid/WorkspaceDetail.d.ts +2 -0
- package/dist/components/features/ProjectGrid/WorkspaceDetail.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/WorkspaceDetail.js +16 -0
- package/dist/components/features/ProjectGrid/WorkspaceDetail.js.map +1 -0
- package/dist/components/features/ProjectGrid/WorkspaceInfo.d.ts +2 -0
- package/dist/components/features/ProjectGrid/WorkspaceInfo.d.ts.map +1 -0
- package/dist/components/features/ProjectGrid/WorkspaceInfo.js +11 -0
- package/dist/components/features/ProjectGrid/WorkspaceInfo.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/ColCompose.d.ts +10 -0
- package/dist/components/features/WorkspaceDetail/ColCompose.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/ColCompose.js +6 -0
- package/dist/components/features/WorkspaceDetail/ColCompose.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/ColMakefile.d.ts +9 -0
- package/dist/components/features/WorkspaceDetail/ColMakefile.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/ColMakefile.js +6 -0
- package/dist/components/features/WorkspaceDetail/ColMakefile.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/ColPackageJson.d.ts +11 -0
- package/dist/components/features/WorkspaceDetail/ColPackageJson.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/ColPackageJson.js +6 -0
- package/dist/components/features/WorkspaceDetail/ColPackageJson.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy 2.d.ts +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy 2.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy 2.js +2 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy 2.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy.d.ts +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy.js +2 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol copy.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol.d.ts +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol.js +2 -0
- package/dist/components/features/WorkspaceDetail/ComposeCol.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/EmptyCol.d.ts +2 -0
- package/dist/components/features/WorkspaceDetail/EmptyCol.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/EmptyCol.js +6 -0
- package/dist/components/features/WorkspaceDetail/EmptyCol.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/EmptyRow.d.ts +2 -0
- package/dist/components/features/WorkspaceDetail/EmptyRow.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/EmptyRow.js +6 -0
- package/dist/components/features/WorkspaceDetail/EmptyRow.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/PackageJsonCol.d.ts +1 -0
- package/dist/components/features/WorkspaceDetail/PackageJsonCol.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/PackageJsonCol.js +2 -0
- package/dist/components/features/WorkspaceDetail/PackageJsonCol.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail copy.d.ts +2 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail copy.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail copy.js +12 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail copy.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail.d.ts +2 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail.js +16 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceDetail.js.map +1 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceInfo.d.ts +2 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceInfo.d.ts.map +1 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceInfo.js +11 -0
- package/dist/components/features/WorkspaceDetail/WorkspaceInfo.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceCommands.d.ts +2 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceCommands.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceCommands.js +6 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceCommands.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceGrid.d.ts +2 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceGrid.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceGrid.js +15 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceGrid.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo copy.d.ts +2 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo copy.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo copy.js +11 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo copy.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo.d.ts +2 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo.js +13 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceInfo.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceRow.d.ts +9 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceRow.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceRow.js +18 -0
- package/dist/components/features/WorkspaceGrid/WorkspaceRow.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesGrid.d.ts +2 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesGrid.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesGrid.js +10 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesGrid.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesInfo.d.ts +2 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesInfo.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesInfo.js +11 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesInfo.js.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesRow.d.ts +8 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesRow.d.ts.map +1 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesRow.js +18 -0
- package/dist/components/features/WorkspaceGrid/WorkspacesRow.js.map +1 -0
- package/dist/components/features/WorkspaceList/WorkspaceList.d.ts +2 -0
- package/dist/components/features/WorkspaceList/WorkspaceList.d.ts.map +1 -0
- package/dist/components/features/WorkspaceList/WorkspaceList.js +10 -0
- package/dist/components/features/WorkspaceList/WorkspaceList.js.map +1 -0
- package/dist/components/features/WorkspaceList/WorkspacesRow.d.ts +8 -0
- package/dist/components/features/WorkspaceList/WorkspacesRow.d.ts.map +1 -0
- package/dist/components/features/WorkspaceList/WorkspacesRow.js +15 -0
- package/dist/components/features/WorkspaceList/WorkspacesRow.js.map +1 -0
- package/dist/components/features/WorkspaceList/responsiveColumnWidths.d.ts +4 -0
- package/dist/components/features/WorkspaceList/responsiveColumnWidths.d.ts.map +1 -0
- package/dist/components/features/WorkspaceList/responsiveColumnWidths.js +11 -0
- package/dist/components/features/WorkspaceList/responsiveColumnWidths.js.map +1 -0
- package/dist/components/features/WorkspaceList/responsiveWidth.d.ts +4 -0
- package/dist/components/features/WorkspaceList/responsiveWidth.d.ts.map +1 -0
- package/dist/components/features/WorkspaceList/responsiveWidth.js +11 -0
- package/dist/components/features/WorkspaceList/responsiveWidth.js.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceInfo.d.ts +2 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceInfo.d.ts.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceInfo.js +13 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceInfo.js.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceList.d.ts +2 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceList.d.ts.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceList.js +10 -0
- package/dist/components/features/WorkspacesGrid/WorkspaceList.js.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesGrid.d.ts +2 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesGrid.d.ts.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesGrid.js +10 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesGrid.js.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesInfo.d.ts +2 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesInfo.d.ts.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesInfo.js +11 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesInfo.js.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesRow.d.ts +8 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesRow.d.ts.map +1 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesRow.js +18 -0
- package/dist/components/features/WorkspacesGrid/WorkspacesRow.js.map +1 -0
- package/dist/components/layouts/Footer/Footer.d.ts +2 -0
- package/dist/components/layouts/Footer/Footer.d.ts.map +1 -0
- package/dist/components/layouts/Footer/Footer.js +7 -0
- package/dist/components/layouts/Footer/Footer.js.map +1 -0
- package/dist/components/layouts/Header/Header.d.ts +2 -0
- package/dist/components/layouts/Header/Header.d.ts.map +1 -0
- package/dist/components/layouts/Header/Header.js +22 -0
- package/dist/components/layouts/Header/Header.js.map +1 -0
- package/dist/components/layouts/Header/ProjectCommands.d.ts +2 -0
- package/dist/components/layouts/Header/ProjectCommands.d.ts.map +1 -0
- package/dist/components/layouts/Header/ProjectCommands.js +8 -0
- package/dist/components/layouts/Header/ProjectCommands.js.map +1 -0
- package/dist/components/layouts/Header/WorkspaceCommands copy.d.ts +2 -0
- package/dist/components/layouts/Header/WorkspaceCommands copy.d.ts.map +1 -0
- package/dist/components/layouts/Header/WorkspaceCommands copy.js +6 -0
- package/dist/components/layouts/Header/WorkspaceCommands copy.js.map +1 -0
- package/dist/components/layouts/Header/WorkspaceCommands.d.ts +2 -0
- package/dist/components/layouts/Header/WorkspaceCommands.d.ts.map +1 -0
- package/dist/components/layouts/Header/WorkspaceCommands.js +13 -0
- package/dist/components/layouts/Header/WorkspaceCommands.js.map +1 -0
- package/dist/config/config.d.ts +8 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +39 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/defaults.d.ts +10 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +43 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/contexts/NavigationContext.d.ts +27 -0
- package/dist/contexts/NavigationContext.d.ts.map +1 -0
- package/dist/contexts/NavigationContext.js +33 -0
- package/dist/contexts/NavigationContext.js.map +1 -0
- package/dist/contexts/PageNavigationContext.d.ts +15 -0
- package/dist/contexts/PageNavigationContext.d.ts.map +1 -0
- package/dist/contexts/PageNavigationContext.js +16 -0
- package/dist/contexts/PageNavigationContext.js.map +1 -0
- package/dist/contexts/ProjectGridContext.d.ts +20 -0
- package/dist/contexts/ProjectGridContext.d.ts.map +1 -0
- package/dist/contexts/ProjectGridContext.js +40 -0
- package/dist/contexts/ProjectGridContext.js.map +1 -0
- package/dist/contexts/ProjectNavigationContext.d.ts +20 -0
- package/dist/contexts/ProjectNavigationContext.d.ts.map +1 -0
- package/dist/contexts/ProjectNavigationContext.js +35 -0
- package/dist/contexts/ProjectNavigationContext.js.map +1 -0
- package/dist/contexts/ResponsizeContext.d.ts +14 -0
- package/dist/contexts/ResponsizeContext.d.ts.map +1 -0
- package/dist/contexts/ResponsizeContext.js +34 -0
- package/dist/contexts/ResponsizeContext.js.map +1 -0
- package/dist/contexts/WorkspaceDiscoveryContext.d.ts +15 -0
- package/dist/contexts/WorkspaceDiscoveryContext.d.ts.map +1 -0
- package/dist/contexts/WorkspaceDiscoveryContext.js +14 -0
- package/dist/contexts/WorkspaceDiscoveryContext.js.map +1 -0
- package/dist/contexts/WorkspaceGridContext.d.ts +29 -0
- package/dist/contexts/WorkspaceGridContext.d.ts.map +1 -0
- package/dist/contexts/WorkspaceGridContext.js +47 -0
- package/dist/contexts/WorkspaceGridContext.js.map +1 -0
- package/dist/contexts/WorkspaceNavigationContext.d.ts +29 -0
- package/dist/contexts/WorkspaceNavigationContext.d.ts.map +1 -0
- package/dist/contexts/WorkspaceNavigationContext.js +41 -0
- package/dist/contexts/WorkspaceNavigationContext.js.map +1 -0
- package/dist/contexts/WorkspacesNavigationContext.d.ts +29 -0
- package/dist/contexts/WorkspacesNavigationContext.d.ts.map +1 -0
- package/dist/contexts/WorkspacesNavigationContext.js +37 -0
- package/dist/contexts/WorkspacesNavigationContext.js.map +1 -0
- package/dist/hooks/useDisovery.d.ts +7 -0
- package/dist/hooks/useDisovery.d.ts.map +1 -0
- package/dist/hooks/useDisovery.js +38 -0
- package/dist/hooks/useDisovery.js.map +1 -0
- package/dist/hooks/useGridNavigation.d.ts +19 -0
- package/dist/hooks/useGridNavigation.d.ts.map +1 -0
- package/dist/hooks/useGridNavigation.js +52 -0
- package/dist/hooks/useGridNavigation.js.map +1 -0
- package/dist/hooks/useNavigation.d.ts +10 -0
- package/dist/hooks/useNavigation.d.ts.map +1 -0
- package/dist/hooks/useNavigation.js +43 -0
- package/dist/hooks/useNavigation.js.map +1 -0
- package/dist/hooks/useNavigationMatrix.d.ts +6 -0
- package/dist/hooks/useNavigationMatrix.d.ts.map +1 -0
- package/dist/hooks/useNavigationMatrix.js +34 -0
- package/dist/hooks/useNavigationMatrix.js.map +1 -0
- package/dist/hooks/useProjectGrid.d.ts +12 -0
- package/dist/hooks/useProjectGrid.d.ts.map +1 -0
- package/dist/hooks/useProjectGrid.js +62 -0
- package/dist/hooks/useProjectGrid.js.map +1 -0
- package/dist/hooks/useRuntime.d.ts +1 -0
- package/dist/hooks/useRuntime.d.ts.map +1 -0
- package/dist/hooks/useRuntime.js +2 -0
- package/dist/hooks/useRuntime.js.map +1 -0
- package/dist/hooks/useWorkspaceDiscovery.d.ts +11 -0
- package/dist/hooks/useWorkspaceDiscovery.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceDiscovery.js +48 -0
- package/dist/hooks/useWorkspaceDiscovery.js.map +1 -0
- package/dist/hooks/useWorkspaceGrid.d.ts +11 -0
- package/dist/hooks/useWorkspaceGrid.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceGrid.js +59 -0
- package/dist/hooks/useWorkspaceGrid.js.map +1 -0
- package/dist/hooks/useWorkspaceNavigation.d.ts +10 -0
- package/dist/hooks/useWorkspaceNavigation.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceNavigation.js +31 -0
- package/dist/hooks/useWorkspaceNavigation.js.map +1 -0
- package/dist/hooks/useWorkspaceQuickActions.d.ts +4 -0
- package/dist/hooks/useWorkspaceQuickActions.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceQuickActions.js +100 -0
- package/dist/hooks/useWorkspaceQuickActions.js.map +1 -0
- package/dist/hooks/useWorkspaceQuickActionts.d.ts +4 -0
- package/dist/hooks/useWorkspaceQuickActionts.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceQuickActionts.js +28 -0
- package/dist/hooks/useWorkspaceQuickActionts.js.map +1 -0
- package/dist/hooks/useWorkspaceRuntime.d.ts +4 -0
- package/dist/hooks/useWorkspaceRuntime.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceRuntime.js +65 -0
- package/dist/hooks/useWorkspaceRuntime.js.map +1 -0
- package/dist/hooks/useWorkspacesGrid copy.d.ts +10 -0
- package/dist/hooks/useWorkspacesGrid copy.d.ts.map +1 -0
- package/dist/hooks/useWorkspacesGrid copy.js +31 -0
- package/dist/hooks/useWorkspacesGrid copy.js.map +1 -0
- package/dist/hooks/useWorkspacesGrid.d.ts +11 -0
- package/dist/hooks/useWorkspacesGrid.d.ts.map +1 -0
- package/dist/hooks/useWorkspacesGrid.js +31 -0
- package/dist/hooks/useWorkspacesGrid.js.map +1 -0
- package/dist/hooks/useWorkspacesNavigation.d.ts +10 -0
- package/dist/hooks/useWorkspacesNavigation.d.ts.map +1 -0
- package/dist/hooks/useWorkspacesNavigation.js +31 -0
- package/dist/hooks/useWorkspacesNavigation.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/services/discovery/facets/biome-parser.d.ts +3 -0
- package/dist/services/discovery/facets/biome-parser.d.ts.map +1 -0
- package/dist/services/discovery/facets/biome-parser.js +73 -0
- package/dist/services/discovery/facets/biome-parser.js.map +1 -0
- package/dist/services/discovery/facets/compose-parser.d.ts +17 -0
- package/dist/services/discovery/facets/compose-parser.d.ts.map +1 -0
- package/dist/services/discovery/facets/compose-parser.js +168 -0
- package/dist/services/discovery/facets/compose-parser.js.map +1 -0
- package/dist/services/discovery/facets/composeParser.d.ts +1 -0
- package/dist/services/discovery/facets/composeParser.d.ts.map +1 -0
- package/dist/services/discovery/facets/composeParser.js +2 -0
- package/dist/services/discovery/facets/composeParser.js.map +1 -0
- package/dist/services/discovery/facets/makefile-parser.d.ts +8 -0
- package/dist/services/discovery/facets/makefile-parser.d.ts.map +1 -0
- package/dist/services/discovery/facets/makefile-parser.js +143 -0
- package/dist/services/discovery/facets/makefile-parser.js.map +1 -0
- package/dist/services/discovery/facets/makefileParser.d.ts +1 -0
- package/dist/services/discovery/facets/makefileParser.d.ts.map +1 -0
- package/dist/services/discovery/facets/makefileParser.js +2 -0
- package/dist/services/discovery/facets/makefileParser.js.map +1 -0
- package/dist/services/discovery/facets/manifest-parser.d.ts +7 -0
- package/dist/services/discovery/facets/manifest-parser.d.ts.map +1 -0
- package/dist/services/discovery/facets/manifest-parser.js +43 -0
- package/dist/services/discovery/facets/manifest-parser.js.map +1 -0
- package/dist/services/discovery/facets/manifestParser.d.ts +1 -0
- package/dist/services/discovery/facets/manifestParser.d.ts.map +1 -0
- package/dist/services/discovery/facets/manifestParser.js +2 -0
- package/dist/services/discovery/facets/manifestParser.js.map +1 -0
- package/dist/services/discovery/facets/package-json-parser.d.ts +7 -0
- package/dist/services/discovery/facets/package-json-parser.d.ts.map +1 -0
- package/dist/services/discovery/facets/package-json-parser.js +118 -0
- package/dist/services/discovery/facets/package-json-parser.js.map +1 -0
- package/dist/services/discovery/index.d.ts +2 -0
- package/dist/services/discovery/index.d.ts.map +1 -0
- package/dist/services/discovery/index.js +2 -0
- package/dist/services/discovery/index.js.map +1 -0
- package/dist/services/discovery/workspace-discovery.d.ts +4 -0
- package/dist/services/discovery/workspace-discovery.d.ts.map +1 -0
- package/dist/services/discovery/workspace-discovery.js +86 -0
- package/dist/services/discovery/workspace-discovery.js.map +1 -0
- package/dist/services/discovery/workspaceDiscovery.d.ts +3 -0
- package/dist/services/discovery/workspaceDiscovery.d.ts.map +1 -0
- package/dist/services/discovery/workspaceDiscovery.js +17 -0
- package/dist/services/discovery/workspaceDiscovery.js.map +1 -0
- package/dist/services/runtime/command-runner.d.ts +17 -0
- package/dist/services/runtime/command-runner.d.ts.map +1 -0
- package/dist/services/runtime/command-runner.js +70 -0
- package/dist/services/runtime/command-runner.js.map +1 -0
- package/dist/services/runtime/docker-runtime.d.ts +15 -0
- package/dist/services/runtime/docker-runtime.d.ts.map +1 -0
- package/dist/services/runtime/docker-runtime.js +133 -0
- package/dist/services/runtime/docker-runtime.js.map +1 -0
- package/dist/services/runtime/node-runtime.d.ts +4 -0
- package/dist/services/runtime/node-runtime.d.ts.map +1 -0
- package/dist/services/runtime/node-runtime.js +210 -0
- package/dist/services/runtime/node-runtime.js.map +1 -0
- package/dist/services/runtime/resolve-runtime-conflicts.d.ts +15 -0
- package/dist/services/runtime/resolve-runtime-conflicts.d.ts.map +1 -0
- package/dist/services/runtime/resolve-runtime-conflicts.js +36 -0
- package/dist/services/runtime/resolve-runtime-conflicts.js.map +1 -0
- package/dist/services/runtime/resolve-runtime.d.ts +15 -0
- package/dist/services/runtime/resolve-runtime.d.ts.map +1 -0
- package/dist/services/runtime/resolve-runtime.js +36 -0
- package/dist/services/runtime/resolve-runtime.js.map +1 -0
- package/dist/services/runtime/stop-runtime.d.ts +14 -0
- package/dist/services/runtime/stop-runtime.d.ts.map +1 -0
- package/dist/services/runtime/stop-runtime.js +48 -0
- package/dist/services/runtime/stop-runtime.js.map +1 -0
- package/dist/theme/theme.d.ts +33 -0
- package/dist/theme/theme.d.ts.map +1 -0
- package/dist/theme/theme.js +61 -0
- package/dist/theme/theme.js.map +1 -0
- package/dist/types/config.d.ts +44 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +2 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/navigation.d.ts +10 -0
- package/dist/types/navigation.d.ts.map +1 -0
- package/dist/types/navigation.js +59 -0
- package/dist/types/navigation.js.map +1 -0
- package/dist/types/page.d.ts +6 -0
- package/dist/types/page.d.ts.map +1 -0
- package/dist/types/page.js +7 -0
- package/dist/types/page.js.map +1 -0
- package/dist/types/project-grid.d.ts +48 -0
- package/dist/types/project-grid.d.ts.map +1 -0
- package/dist/types/project-grid.js +9 -0
- package/dist/types/project-grid.js.map +1 -0
- package/dist/types/project.d.ts +64 -0
- package/dist/types/project.d.ts.map +1 -0
- package/dist/types/project.js +2 -0
- package/dist/types/project.js.map +1 -0
- package/dist/types/projects-grid.d.ts +32 -0
- package/dist/types/projects-grid.d.ts.map +1 -0
- package/dist/types/projects-grid.js +2 -0
- package/dist/types/projects-grid.js.map +1 -0
- package/dist/types/quick-actions.d.ts +7 -0
- package/dist/types/quick-actions.d.ts.map +1 -0
- package/dist/types/quick-actions.js +2 -0
- package/dist/types/quick-actions.js.map +1 -0
- package/dist/types/runtime.d.ts +16 -0
- package/dist/types/runtime.d.ts.map +1 -0
- package/dist/types/runtime.js +2 -0
- package/dist/types/runtime.js.map +1 -0
- package/dist/types/workpace-grid.d.ts +32 -0
- package/dist/types/workpace-grid.d.ts.map +1 -0
- package/dist/types/workpace-grid.js +2 -0
- package/dist/types/workpace-grid.js.map +1 -0
- package/dist/types/workspace-grid.d.ts +32 -0
- package/dist/types/workspace-grid.d.ts.map +1 -0
- package/dist/types/workspace-grid.js +2 -0
- package/dist/types/workspace-grid.js.map +1 -0
- package/dist/types/workspace-navigation.d.ts +37 -0
- package/dist/types/workspace-navigation.d.ts.map +1 -0
- package/dist/types/workspace-navigation.js +7 -0
- package/dist/types/workspace-navigation.js.map +1 -0
- package/dist/types/workspace-quick-actions.d.ts +12 -0
- package/dist/types/workspace-quick-actions.d.ts.map +1 -0
- package/dist/types/workspace-quick-actions.js +2 -0
- package/dist/types/workspace-quick-actions.js.map +1 -0
- package/dist/types/workspace-runtime.d.ts +21 -0
- package/dist/types/workspace-runtime.d.ts.map +1 -0
- package/dist/types/workspace-runtime.js +2 -0
- package/dist/types/workspace-runtime.js.map +1 -0
- package/dist/types/workspace.d.ts +63 -0
- package/dist/types/workspace.d.ts.map +1 -0
- package/dist/types/workspace.js +2 -0
- package/dist/types/workspace.js.map +1 -0
- package/dist/types/workspaces-grid copy.d.ts +37 -0
- package/dist/types/workspaces-grid copy.d.ts.map +1 -0
- package/dist/types/workspaces-grid copy.js +7 -0
- package/dist/types/workspaces-grid copy.js.map +1 -0
- package/dist/types/workspaces-grid.d.ts +37 -0
- package/dist/types/workspaces-grid.d.ts.map +1 -0
- package/dist/types/workspaces-grid.js +7 -0
- package/dist/types/workspaces-grid.js.map +1 -0
- package/dist/types/worspace-state.d.ts +19 -0
- package/dist/types/worspace-state.d.ts.map +1 -0
- package/dist/types/worspace-state.js +2 -0
- package/dist/types/worspace-state.js.map +1 -0
- package/dist/utils/framework-detector.d.ts +7 -0
- package/dist/utils/framework-detector.d.ts.map +1 -0
- package/dist/utils/framework-detector.js +111 -0
- package/dist/utils/framework-detector.js.map +1 -0
- package/dist/utils/fs/directories.d.ts +7 -0
- package/dist/utils/fs/directories.d.ts.map +1 -0
- package/dist/utils/fs/directories.js +41 -0
- package/dist/utils/fs/directories.js.map +1 -0
- package/dist/utils/fs/file.d.ts +8 -0
- package/dist/utils/fs/file.d.ts.map +1 -0
- package/dist/utils/fs/file.js +31 -0
- package/dist/utils/fs/file.js.map +1 -0
- package/dist/utils/fs/package-json.d.ts +2 -0
- package/dist/utils/fs/package-json.d.ts.map +1 -0
- package/dist/utils/fs/package-json.js +11 -0
- package/dist/utils/fs/package-json.js.map +1 -0
- package/dist/utils/fs/scanner.d.ts +6 -0
- package/dist/utils/fs/scanner.d.ts.map +1 -0
- package/dist/utils/fs/scanner.js +32 -0
- package/dist/utils/fs/scanner.js.map +1 -0
- package/dist/utils/getPackageVersion.d.ts +2 -0
- package/dist/utils/getPackageVersion.d.ts.map +1 -0
- package/dist/utils/getPackageVersion.js +6 -0
- package/dist/utils/getPackageVersion.js.map +1 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +99 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/logging/logger.d.ts +14 -0
- package/dist/utils/logging/logger.d.ts.map +1 -0
- package/dist/utils/logging/logger.js +99 -0
- package/dist/utils/logging/logger.js.map +1 -0
- package/dist/utils/navigation/grid-navigation.d.ts +9 -0
- package/dist/utils/navigation/grid-navigation.d.ts.map +1 -0
- package/dist/utils/navigation/grid-navigation.js +53 -0
- package/dist/utils/navigation/grid-navigation.js.map +1 -0
- package/dist/utils/navigation/navigation-helper.d.ts +19 -0
- package/dist/utils/navigation/navigation-helper.d.ts.map +1 -0
- package/dist/utils/navigation/navigation-helper.js +66 -0
- package/dist/utils/navigation/navigation-helper.js.map +1 -0
- package/dist/utils/navigation-helper.d.ts +9 -0
- package/dist/utils/navigation-helper.d.ts.map +1 -0
- package/dist/utils/navigation-helper.js +53 -0
- package/dist/utils/navigation-helper.js.map +1 -0
- package/dist/utils/package-json.d.ts +2 -0
- package/dist/utils/package-json.d.ts.map +1 -0
- package/dist/utils/package-json.js +11 -0
- package/dist/utils/package-json.js.map +1 -0
- package/dist/utils/port.d.ts +6 -0
- package/dist/utils/port.d.ts.map +1 -0
- package/dist/utils/port.js +24 -0
- package/dist/utils/port.js.map +1 -0
- package/dist/utils/project/project-grid.d.ts +17 -0
- package/dist/utils/project/project-grid.d.ts.map +1 -0
- package/dist/utils/project/project-grid.js +121 -0
- package/dist/utils/project/project-grid.js.map +1 -0
- package/dist/utils/project/workspace-grid.d.ts +17 -0
- package/dist/utils/project/workspace-grid.d.ts.map +1 -0
- package/dist/utils/project/workspace-grid.js +121 -0
- package/dist/utils/project/workspace-grid.js.map +1 -0
- package/dist/utils/runtime/port.d.ts +6 -0
- package/dist/utils/runtime/port.d.ts.map +1 -0
- package/dist/utils/runtime/port.js +24 -0
- package/dist/utils/runtime/port.js.map +1 -0
- package/dist/utils/workpace/workspace-grid.d.ts +17 -0
- package/dist/utils/workpace/workspace-grid.d.ts.map +1 -0
- package/dist/utils/workpace/workspace-grid.js +121 -0
- package/dist/utils/workpace/workspace-grid.js.map +1 -0
- package/dist/utils/workpace/workspace-helper.d.ts +7 -0
- package/dist/utils/workpace/workspace-helper.d.ts.map +1 -0
- package/dist/utils/workpace/workspace-helper.js +10 -0
- package/dist/utils/workpace/workspace-helper.js.map +1 -0
- package/dist/utils/workpace/workspace-navigation.d.ts +17 -0
- package/dist/utils/workpace/workspace-navigation.d.ts.map +1 -0
- package/dist/utils/workpace/workspace-navigation.js +123 -0
- package/dist/utils/workpace/workspace-navigation.js.map +1 -0
- package/dist/utils/workpace/workspaces-grid copy.d.ts +30 -0
- package/dist/utils/workpace/workspaces-grid copy.d.ts.map +1 -0
- package/dist/utils/workpace/workspaces-grid copy.js +97 -0
- package/dist/utils/workpace/workspaces-grid copy.js.map +1 -0
- package/dist/utils/workpace/workspaces-grid.d.ts +22 -0
- package/dist/utils/workpace/workspaces-grid.d.ts.map +1 -0
- package/dist/utils/workpace/workspaces-grid.js +123 -0
- package/dist/utils/workpace/workspaces-grid.js.map +1 -0
- package/dist/utils/workpace/worspace-state.d.ts +18 -0
- package/dist/utils/workpace/worspace-state.d.ts.map +1 -0
- package/dist/utils/workpace/worspace-state.js +2 -0
- package/dist/utils/workpace/worspace-state.js.map +1 -0
- package/dist/utils/workspace/framework-detector.d.ts +7 -0
- package/dist/utils/workspace/framework-detector.d.ts.map +1 -0
- package/dist/utils/workspace/framework-detector.js +111 -0
- package/dist/utils/workspace/framework-detector.js.map +1 -0
- package/dist/utils/workspace/workspace-grid.d.ts +22 -0
- package/dist/utils/workspace/workspace-grid.d.ts.map +1 -0
- package/dist/utils/workspace/workspace-grid.js +123 -0
- package/dist/utils/workspace/workspace-grid.js.map +1 -0
- package/dist/utils/workspace/workspace-helper.d.ts +7 -0
- package/dist/utils/workspace/workspace-helper.d.ts.map +1 -0
- package/dist/utils/workspace/workspace-helper.js +10 -0
- package/dist/utils/workspace/workspace-helper.js.map +1 -0
- package/dist/utils/workspace/workspaces-grid.d.ts +22 -0
- package/dist/utils/workspace/workspaces-grid.d.ts.map +1 -0
- package/dist/utils/workspace/workspaces-grid.js +123 -0
- package/dist/utils/workspace/workspaces-grid.js.map +1 -0
- package/dist/utils/workspace-helper.d.ts +10 -0
- package/dist/utils/workspace-helper.d.ts.map +1 -0
- package/dist/utils/workspace-helper.js +46 -0
- package/dist/utils/workspace-helper.js.map +1 -0
- package/dist/utils/workspace-navigation.d.ts +1 -0
- package/dist/utils/workspace-navigation.d.ts.map +1 -0
- package/dist/utils/workspace-navigation.js +2 -0
- package/dist/utils/workspace-navigation.js.map +1 -0
- package/jest.config.mjs +31 -0
- package/package.json +69 -0
- package/scripts/run-commitlint.sh +48 -0
- package/src/app/App.tsx +25 -0
- package/src/app/Layout.tsx +37 -0
- package/src/app/pages/Exit.tsx +9 -0
- package/src/app/pages/ProjectPage.tsx +37 -0
- package/src/app/pages/WorkspacePage.tsx +33 -0
- package/src/bin/init.ts +7 -0
- package/src/bin/trace-warnings.ts +25 -0
- package/src/commands/init.ts +80 -0
- package/src/components/features/ProjectGrid/ColCompose.tsx +99 -0
- package/src/components/features/ProjectGrid/ColMakefile.tsx +44 -0
- package/src/components/features/ProjectGrid/ColPackageJson.tsx +54 -0
- package/src/components/features/ProjectGrid/EmptyCol.tsx +28 -0
- package/src/components/features/ProjectGrid/ProjectGrid.tsx +94 -0
- package/src/components/features/ProjectGrid/ProjectInfo.tsx +67 -0
- package/src/components/features/WorkspaceGrid/WorkspaceGrid.tsx +52 -0
- package/src/components/features/WorkspaceGrid/WorkspaceInfo.tsx +89 -0
- package/src/components/features/WorkspaceGrid/WorkspaceRow.tsx +115 -0
- package/src/components/layouts/Header/Header.tsx +51 -0
- package/src/components/layouts/Header/ProjectCommands.tsx +17 -0
- package/src/components/layouts/Header/WorkspaceCommands.tsx +60 -0
- package/src/config/config.ts +46 -0
- package/src/config/defaults.ts +44 -0
- package/src/contexts/PageNavigationContext.tsx +39 -0
- package/src/contexts/ProjectGridContext.tsx +92 -0
- package/src/contexts/WorkspaceDiscoveryContext.tsx +46 -0
- package/src/contexts/WorkspaceGridContext.tsx +113 -0
- package/src/hooks/useProjectGrid.ts +77 -0
- package/src/hooks/useWorkspaceDiscovery.ts +61 -0
- package/src/hooks/useWorkspaceGrid.ts +85 -0
- package/src/hooks/useWorkspaceQuickActions.ts +114 -0
- package/src/hooks/useWorkspaceRuntime.ts +92 -0
- package/src/index.ts +10 -0
- package/src/services/discovery/facets/compose-parser.ts +236 -0
- package/src/services/discovery/facets/makefile-parser.ts +196 -0
- package/src/services/discovery/facets/package-json-parser.ts +151 -0
- package/src/services/discovery/index.ts +1 -0
- package/src/services/discovery/workspace-discovery.ts +105 -0
- package/src/services/runtime/command-runner.ts +87 -0
- package/src/services/runtime/docker-runtime.ts +171 -0
- package/src/services/runtime/node-runtime.ts +253 -0
- package/src/services/runtime/resolve-runtime.ts +45 -0
- package/src/services/runtime/stop-runtime.ts +52 -0
- package/src/theme/theme.ts +72 -0
- package/src/types/config.ts +50 -0
- package/src/types/page.ts +5 -0
- package/src/types/project-grid.ts +73 -0
- package/src/types/project.ts +81 -0
- package/src/types/workspace-grid.ts +41 -0
- package/src/types/workspace-quick-actions.ts +12 -0
- package/src/types/workspace-runtime.ts +28 -0
- package/src/utils/fs/directories.test.ts +60 -0
- package/src/utils/fs/directories.ts +54 -0
- package/src/utils/fs/file.test.ts +90 -0
- package/src/utils/fs/file.ts +32 -0
- package/src/utils/fs/package-json.ts +12 -0
- package/src/utils/logging/logger.ts +103 -0
- package/src/utils/navigation/grid-navigation.ts +60 -0
- package/src/utils/navigation/navigation-helper.ts +84 -0
- package/src/utils/project/project-grid.ts +165 -0
- package/src/utils/runtime/port.test.ts +34 -0
- package/src/utils/runtime/port.ts +26 -0
- package/src/utils/workspace/framework-detector.ts +77 -0
- package/src/utils/workspace/workspace-grid.ts +161 -0
- package/src/utils/workspace/workspace-helper.ts +21 -0
- package/tsconfig.json +23 -0
- package/workspace-cli.mjs +18 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { WorkspaceQuickAction } from "./workspace-quick-actions"
|
|
2
|
+
|
|
3
|
+
export interface Config {
|
|
4
|
+
discovery?: DiscoveryConfig
|
|
5
|
+
quickActions: WorkspaceQuickAction[]
|
|
6
|
+
execution?: ExecutionConfig
|
|
7
|
+
logging?: LoggingConfig
|
|
8
|
+
theme?: ThemeName
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type ThemeName = "dark"
|
|
12
|
+
|
|
13
|
+
export interface DiscoveryConfig {
|
|
14
|
+
maxDepth?: number
|
|
15
|
+
ignore?: string[]
|
|
16
|
+
folders?: {
|
|
17
|
+
app?: string[]
|
|
18
|
+
package?: string[]
|
|
19
|
+
infra?: string[]
|
|
20
|
+
contract?: string[]
|
|
21
|
+
}
|
|
22
|
+
scripts?: {
|
|
23
|
+
include?: string[]
|
|
24
|
+
exclude?: string[]
|
|
25
|
+
}
|
|
26
|
+
env?: DiscoveryEnvConfig
|
|
27
|
+
order?: string[]
|
|
28
|
+
makefile?: MakefileConfig
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface DiscoveryEnvConfig {
|
|
32
|
+
files?: string[]
|
|
33
|
+
portKeys?: string[]
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface MakefileConfig {
|
|
37
|
+
showDefault?: boolean
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface ExecutionConfig {
|
|
41
|
+
useTmux?: boolean
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface LoggingConfig {
|
|
45
|
+
level?: "debug" | "info" | "warn" | "error"
|
|
46
|
+
file?: boolean
|
|
47
|
+
logDir?: string
|
|
48
|
+
prettyPrint?: boolean
|
|
49
|
+
truncateOnStart?: boolean
|
|
50
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ComposeService,
|
|
3
|
+
MakefileCommand,
|
|
4
|
+
PackageJsonScript,
|
|
5
|
+
} from "./project.js"
|
|
6
|
+
|
|
7
|
+
export type ProjectGridGrid = {
|
|
8
|
+
packageJsonCells: PackageJsonCell[]
|
|
9
|
+
composeCommandCells: ComposeCommandCell[]
|
|
10
|
+
composeServiceCells: ComposeServiceCell[]
|
|
11
|
+
makefileCells: MakefileCell[]
|
|
12
|
+
maxCol: number
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type ProjectGridCell =
|
|
16
|
+
| PackageJsonCell
|
|
17
|
+
| ComposeCommandCell
|
|
18
|
+
| ComposeServiceCell
|
|
19
|
+
| MakefileCell
|
|
20
|
+
|
|
21
|
+
export interface PackageJsonCell {
|
|
22
|
+
type: "packageJson"
|
|
23
|
+
filepath: string
|
|
24
|
+
row: number
|
|
25
|
+
col: number
|
|
26
|
+
script: PackageJsonScript
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ComposeCommandCell {
|
|
30
|
+
type: "composeCommand"
|
|
31
|
+
filepath: string
|
|
32
|
+
row: number
|
|
33
|
+
col: number
|
|
34
|
+
action: ComposeCommand
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ComposeServiceCell {
|
|
38
|
+
type: "composeService"
|
|
39
|
+
filepath: string
|
|
40
|
+
row: number
|
|
41
|
+
col: number
|
|
42
|
+
service: ComposeService
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const COMPOSE_COMMANDS = [
|
|
46
|
+
"up",
|
|
47
|
+
"up -d",
|
|
48
|
+
"down",
|
|
49
|
+
"build",
|
|
50
|
+
"stop",
|
|
51
|
+
"logs",
|
|
52
|
+
] as const
|
|
53
|
+
|
|
54
|
+
export type ComposeCommandName = (typeof COMPOSE_COMMANDS)[number]
|
|
55
|
+
|
|
56
|
+
export interface ComposeCommand {
|
|
57
|
+
name: ComposeCommandName
|
|
58
|
+
command: string
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface MakefileCell {
|
|
62
|
+
type: "makefile"
|
|
63
|
+
filepath: string
|
|
64
|
+
row: number
|
|
65
|
+
col: number
|
|
66
|
+
command: MakefileCommand
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Simple navigation
|
|
70
|
+
export interface NavigationPosition {
|
|
71
|
+
row: number
|
|
72
|
+
col: number
|
|
73
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export type ProjectType = "workspace" | "app" | "package" | "infra" | "contract"
|
|
2
|
+
export type FacetType = "packageJson" | "compose" | "makefile"
|
|
3
|
+
|
|
4
|
+
export interface EnvFile {
|
|
5
|
+
filepath: string // e.g. "/home/user/project-name/.env"
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface Project {
|
|
9
|
+
path: string // e.g. "project-name/app"
|
|
10
|
+
absolutePath: string // e.g. "/home/user/project-name/"
|
|
11
|
+
type: ProjectType // e.g. "app"
|
|
12
|
+
folder: string // e.g. "project-name"
|
|
13
|
+
envFile?: EnvFile
|
|
14
|
+
facets: {
|
|
15
|
+
packageJson?: PackageJsonFacet
|
|
16
|
+
compose?: ComposeFacet
|
|
17
|
+
makefile?: MakefileFacet
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Base Facet
|
|
22
|
+
|
|
23
|
+
export interface BaseFacet {
|
|
24
|
+
type: FacetType
|
|
25
|
+
path: string // e.g. "apps/api"
|
|
26
|
+
envFile?: EnvFile
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// PackageJson Facet
|
|
30
|
+
|
|
31
|
+
export type PackageManager = "npm" | "pnpm" | "yarn" | "bun" | "deno"
|
|
32
|
+
|
|
33
|
+
export interface PackageJsonFacet extends BaseFacet {
|
|
34
|
+
type: "packageJson"
|
|
35
|
+
filename: string // e.g. "package.json"
|
|
36
|
+
name: string // e.g. "@factorim/api"
|
|
37
|
+
version?: string // e.g. "1.0.0"
|
|
38
|
+
framework?: string // e.g. "react", "Next.js""
|
|
39
|
+
packageManager: PackageManager // e.g. "pnpm"
|
|
40
|
+
description?: string // e.g. "My awesome app"
|
|
41
|
+
scripts: PackageJsonScript[]
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface PackageJsonScript {
|
|
45
|
+
name: string // e.g. "start"
|
|
46
|
+
command: string // e.g. "pnpm start"
|
|
47
|
+
exec: string // e.g. "biome check ."
|
|
48
|
+
port?: number // e.g. 3000
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Compose Facet
|
|
52
|
+
|
|
53
|
+
export interface ComposeFacet extends BaseFacet {
|
|
54
|
+
type: "compose"
|
|
55
|
+
filename: string // e.g. "docker-compose.yml"
|
|
56
|
+
services: ComposeService[]
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface ComposeService {
|
|
60
|
+
name: string // e.g. "database" (service key in compose file)
|
|
61
|
+
containerName?: string // e.g. "my-pg-db" (explicit container_name, if set)
|
|
62
|
+
image?: string // e.g. "postgres:latest"
|
|
63
|
+
ports?: number[] // e.g. [5432]
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Makefile Facet
|
|
67
|
+
|
|
68
|
+
export interface MakefileFacet extends BaseFacet {
|
|
69
|
+
type: "makefile"
|
|
70
|
+
filename: string // e.g. "Makefile"
|
|
71
|
+
commands: MakefileCommand[]
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface MakefileCommand {
|
|
75
|
+
name: string // e.g. "dev"
|
|
76
|
+
command: string // e.g. "make dev"
|
|
77
|
+
exec: string // e.g. "pnpm run dev"
|
|
78
|
+
port?: number // e.g. 3000
|
|
79
|
+
description?: string // e.g. "Start the development server"
|
|
80
|
+
dependencies?: string[] // e.g. ["build"]
|
|
81
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Project } from "./project.js"
|
|
2
|
+
import type { FacetQuickAction } from "./workspace-quick-actions.js"
|
|
3
|
+
import type { RunState } from "./workspace-runtime.js"
|
|
4
|
+
|
|
5
|
+
export interface CursorPosition {
|
|
6
|
+
row: number
|
|
7
|
+
col: number
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface WorkspacesNavigationRow {
|
|
11
|
+
id: string
|
|
12
|
+
cells: (WorkspacesNavigationCell | null)[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type WorkspacesNavigationGrid = WorkspacesNavigationRow[]
|
|
16
|
+
|
|
17
|
+
export type WorkspacesNavigationCell =
|
|
18
|
+
| WorkspaceCell
|
|
19
|
+
| WorkspaceQuickActionCell
|
|
20
|
+
| WorkspaceRuntimeCell
|
|
21
|
+
|
|
22
|
+
export interface WorkspaceCell {
|
|
23
|
+
type: "workspace"
|
|
24
|
+
row: number
|
|
25
|
+
col: number
|
|
26
|
+
workspace: Project
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface WorkspaceQuickActionCell {
|
|
30
|
+
type: "quickAction"
|
|
31
|
+
row: number
|
|
32
|
+
col: number
|
|
33
|
+
action: FacetQuickAction
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface WorkspaceRuntimeCell {
|
|
37
|
+
type: "runtime"
|
|
38
|
+
row: number
|
|
39
|
+
col: number
|
|
40
|
+
runState: RunState
|
|
41
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type RuntimeStatus =
|
|
2
|
+
| "starting"
|
|
3
|
+
| "running"
|
|
4
|
+
| "stopping"
|
|
5
|
+
| "stopped"
|
|
6
|
+
| "failed"
|
|
7
|
+
| "conflict"
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Aggregated running state for an entire workspaces
|
|
11
|
+
*/
|
|
12
|
+
export interface WorkspaceRuntimeState {
|
|
13
|
+
workspacePath: string // e.g. "myapp"
|
|
14
|
+
runStates: RunState[]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Running state for a single run (script, command, or service)
|
|
19
|
+
*/
|
|
20
|
+
export interface RunState {
|
|
21
|
+
id: string // e.g. "myapp::packageJson::dev"
|
|
22
|
+
name: string // e.g. "dev"
|
|
23
|
+
type: "script" | "command" | "service"
|
|
24
|
+
status: RuntimeStatus
|
|
25
|
+
statusMessage?: string // e.g. "Port 3000 already in use", "2 containers match service db"
|
|
26
|
+
command: string // e.g. "pnpm start"
|
|
27
|
+
port?: number // e.g. 3000
|
|
28
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// scanDirectories.test.ts
|
|
2
|
+
import { mkdir, rm, writeFile } from "node:fs/promises"
|
|
3
|
+
import { tmpdir } from "node:os"
|
|
4
|
+
import { join } from "node:path"
|
|
5
|
+
import { afterEach, beforeEach, describe, expect, it } from "@jest/globals"
|
|
6
|
+
import { scanDirectories } from "./directories"
|
|
7
|
+
|
|
8
|
+
describe("scanDirectories", () => {
|
|
9
|
+
let root: string
|
|
10
|
+
|
|
11
|
+
beforeEach(async () => {
|
|
12
|
+
root = join(tmpdir(), `monotui-scan-${Date.now()}-${Math.random()}`)
|
|
13
|
+
await mkdir(root, { recursive: true })
|
|
14
|
+
|
|
15
|
+
await mkdir(join(root, "apps", "api"), { recursive: true })
|
|
16
|
+
await mkdir(join(root, "packages", "ui", "components"), { recursive: true })
|
|
17
|
+
await mkdir(join(root, ".git"), { recursive: true })
|
|
18
|
+
await mkdir(join(root, "node_modules"), { recursive: true })
|
|
19
|
+
await mkdir(join(root, "unreadable"), { recursive: true })
|
|
20
|
+
|
|
21
|
+
// Add a file just to ensure files are ignored (only dirs collected)
|
|
22
|
+
await writeFile(join(root, "apps", "api", "index.ts"), "export {}")
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
afterEach(async () => {
|
|
26
|
+
await rm(root, { recursive: true, force: true })
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
it("includes root directory and discovers nested directories", async () => {
|
|
30
|
+
const dirs = await scanDirectories(root, {
|
|
31
|
+
maxDepth: 10,
|
|
32
|
+
ignore: [],
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
expect(dirs).toContain(root)
|
|
36
|
+
expect(dirs).toContain(join(root, "apps"))
|
|
37
|
+
expect(dirs).toContain(join(root, "apps", "api"))
|
|
38
|
+
expect(dirs).toContain(join(root, "packages"))
|
|
39
|
+
expect(dirs).toContain(join(root, "packages", "ui"))
|
|
40
|
+
expect(dirs).toContain(join(root, "packages", "ui", "components"))
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
it("skips dot-directories (e.g. .git)", async () => {
|
|
44
|
+
const dirs = await scanDirectories(root, {
|
|
45
|
+
maxDepth: 10,
|
|
46
|
+
ignore: [],
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
expect(dirs).not.toContain(join(root, ".git"))
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
it("skips ignored directories (e.g. node_modules)", async () => {
|
|
53
|
+
const dirs = await scanDirectories(root, {
|
|
54
|
+
maxDepth: 10,
|
|
55
|
+
ignore: ["node_modules"],
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
expect(dirs).not.toContain(join(root, "node_modules"))
|
|
59
|
+
})
|
|
60
|
+
})
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { readdir } from "node:fs/promises"
|
|
2
|
+
import { basename, dirname, join, relative } from "node:path"
|
|
3
|
+
|
|
4
|
+
export interface ScanOptions {
|
|
5
|
+
maxDepth: number
|
|
6
|
+
ignore: string[]
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export async function scanDirectories(
|
|
10
|
+
rootDir: string,
|
|
11
|
+
options: ScanOptions,
|
|
12
|
+
): Promise<string[]> {
|
|
13
|
+
const directories: string[] = []
|
|
14
|
+
|
|
15
|
+
async function scan(dir: string, depth: number) {
|
|
16
|
+
if (depth > options.maxDepth) return
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
const entries = await readdir(dir, { withFileTypes: true })
|
|
20
|
+
|
|
21
|
+
for (const entry of entries) {
|
|
22
|
+
// Skip ignored directories
|
|
23
|
+
if (options.ignore.includes(entry.name)) continue
|
|
24
|
+
if (entry.name.startsWith(".")) continue
|
|
25
|
+
|
|
26
|
+
if (entry.isDirectory()) {
|
|
27
|
+
const fullPath = join(dir, entry.name)
|
|
28
|
+
directories.push(fullPath)
|
|
29
|
+
await scan(fullPath, depth + 1)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
} catch {
|
|
33
|
+
// Skip directories we can't read
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Add root directory
|
|
38
|
+
directories.push(rootDir)
|
|
39
|
+
await scan(rootDir, 0)
|
|
40
|
+
|
|
41
|
+
return directories
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function getDirectoryName(filePath: string, rootDir: string): string {
|
|
45
|
+
const dir = dirname(filePath)
|
|
46
|
+
const relativePath = relative(rootDir, dir)
|
|
47
|
+
|
|
48
|
+
// If in root, use directory name
|
|
49
|
+
if (relativePath === "") {
|
|
50
|
+
return basename(dir)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return relativePath.replace(/\\/g, "/")
|
|
54
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { mkdir, rm, writeFile } from "node:fs/promises"
|
|
2
|
+
import { join } from "node:path"
|
|
3
|
+
import { afterEach, beforeEach, describe, expect, it } from "@jest/globals"
|
|
4
|
+
|
|
5
|
+
import { fileExists, readJsonFile } from "./file.js"
|
|
6
|
+
|
|
7
|
+
const TEST_DIR = join(process.cwd(), "test-temp")
|
|
8
|
+
|
|
9
|
+
describe("file utils", () => {
|
|
10
|
+
beforeEach(async () => {
|
|
11
|
+
await mkdir(TEST_DIR, { recursive: true })
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
afterEach(async () => {
|
|
15
|
+
await rm(TEST_DIR, { recursive: true, force: true })
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
describe("fileExists", () => {
|
|
19
|
+
it("should return true for existing file", async () => {
|
|
20
|
+
const filePath = join(TEST_DIR, "test.txt")
|
|
21
|
+
await writeFile(filePath, "test content")
|
|
22
|
+
|
|
23
|
+
const exists = await fileExists(filePath)
|
|
24
|
+
|
|
25
|
+
expect(exists).toBe(true)
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
it("should return false for non-existing file", async () => {
|
|
29
|
+
const filePath = join(TEST_DIR, "non-existing.txt")
|
|
30
|
+
|
|
31
|
+
const exists = await fileExists(filePath)
|
|
32
|
+
|
|
33
|
+
expect(exists).toBe(false)
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
it("should return true for existing directory", async () => {
|
|
37
|
+
const exists = await fileExists(TEST_DIR)
|
|
38
|
+
|
|
39
|
+
expect(exists).toBe(true)
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
describe("readJsonFile", () => {
|
|
44
|
+
it("should read and parse valid JSON file", async () => {
|
|
45
|
+
const filePath = join(TEST_DIR, "data.json")
|
|
46
|
+
const data = { name: "test", value: 42 }
|
|
47
|
+
await writeFile(filePath, JSON.stringify(data))
|
|
48
|
+
|
|
49
|
+
const result = await readJsonFile<typeof data>(filePath)
|
|
50
|
+
|
|
51
|
+
expect(result).toEqual(data)
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
it("should return null for non-existing file", async () => {
|
|
55
|
+
const filePath = join(TEST_DIR, "missing.json")
|
|
56
|
+
|
|
57
|
+
const result = await readJsonFile(filePath)
|
|
58
|
+
|
|
59
|
+
expect(result).toBeNull()
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
it("should return null for invalid JSON", async () => {
|
|
63
|
+
const filePath = join(TEST_DIR, "invalid.json")
|
|
64
|
+
await writeFile(filePath, "not valid json{")
|
|
65
|
+
|
|
66
|
+
const result = await readJsonFile(filePath)
|
|
67
|
+
|
|
68
|
+
expect(result).toBeNull()
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
it("should handle nested JSON objects", async () => {
|
|
72
|
+
const filePath = join(TEST_DIR, "nested.json")
|
|
73
|
+
const data = {
|
|
74
|
+
workspace: {
|
|
75
|
+
name: "my-app",
|
|
76
|
+
scripts: {
|
|
77
|
+
build: "tsc",
|
|
78
|
+
test: "jest",
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
await writeFile(filePath, JSON.stringify(data))
|
|
83
|
+
|
|
84
|
+
const result = await readJsonFile<typeof data>(filePath)
|
|
85
|
+
|
|
86
|
+
expect(result).toEqual(data)
|
|
87
|
+
expect(result?.workspace.scripts.build).toBe("tsc")
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
})
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { readFile, stat } from "node:fs/promises"
|
|
2
|
+
import { join } from "node:path"
|
|
3
|
+
import type { PackageJson } from "type-fest"
|
|
4
|
+
|
|
5
|
+
export async function fileExists(path: string): Promise<boolean> {
|
|
6
|
+
try {
|
|
7
|
+
await stat(path)
|
|
8
|
+
return true
|
|
9
|
+
} catch {
|
|
10
|
+
return false
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export async function readJsonFile<T>(path: string): Promise<T | null> {
|
|
15
|
+
try {
|
|
16
|
+
const content = await readFile(path, "utf-8")
|
|
17
|
+
return JSON.parse(content) as T
|
|
18
|
+
} catch {
|
|
19
|
+
return null
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Generic helper to read package.json from a directory
|
|
25
|
+
*/
|
|
26
|
+
export async function getPackageJson(dir: string): Promise<PackageJson | null> {
|
|
27
|
+
const packagePath = join(dir, "package.json")
|
|
28
|
+
if (!(await fileExists(packagePath))) {
|
|
29
|
+
return null
|
|
30
|
+
}
|
|
31
|
+
return readJsonFile<PackageJson>(packagePath)
|
|
32
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import path from "node:path"
|
|
2
|
+
import { fileURLToPath } from "node:url"
|
|
3
|
+
import { readPackage } from "read-pkg"
|
|
4
|
+
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
6
|
+
const __dirname = path.dirname(__filename)
|
|
7
|
+
|
|
8
|
+
export async function getPackageVersion(): Promise<string> {
|
|
9
|
+
const appPackageJsonPath = path.resolve(__dirname, "../../../package.json")
|
|
10
|
+
const pkg = await readPackage({ cwd: path.dirname(appPackageJsonPath) })
|
|
11
|
+
return pkg.version
|
|
12
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync } from "node:fs"
|
|
2
|
+
import { homedir } from "node:os"
|
|
3
|
+
import { join } from "node:path"
|
|
4
|
+
import { type Logger, pino } from "pino"
|
|
5
|
+
|
|
6
|
+
import type { Config } from "../../types/config"
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Initialize logger based on configuration
|
|
10
|
+
* Must be called once at startup before using logger
|
|
11
|
+
*/
|
|
12
|
+
export function initLogger(config: Config): Logger {
|
|
13
|
+
const loggingConfig = config.logging || {}
|
|
14
|
+
const level = loggingConfig.level || "info"
|
|
15
|
+
const enableFile = loggingConfig.file !== false
|
|
16
|
+
const truncateOnStart = loggingConfig.truncateOnStart !== false
|
|
17
|
+
const logDir = loggingConfig.logDir
|
|
18
|
+
? loggingConfig.logDir.replace(/^~/, homedir())
|
|
19
|
+
: join(homedir(), ".workspace-cli", "logs")
|
|
20
|
+
|
|
21
|
+
if (enableFile) {
|
|
22
|
+
const logFilePath = join(logDir, "workspace-cli.log")
|
|
23
|
+
|
|
24
|
+
// Truncate log file if configured
|
|
25
|
+
if (truncateOnStart) {
|
|
26
|
+
if (!existsSync(logDir)) {
|
|
27
|
+
mkdirSync(logDir, { recursive: true })
|
|
28
|
+
}
|
|
29
|
+
writeFileSync(logFilePath, "", "utf-8")
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const usePretty = loggingConfig.prettyPrint === true
|
|
33
|
+
|
|
34
|
+
_logger = pino({
|
|
35
|
+
level,
|
|
36
|
+
transport: {
|
|
37
|
+
target: usePretty ? "pino-pretty" : "pino/file",
|
|
38
|
+
options: {
|
|
39
|
+
destination: logFilePath,
|
|
40
|
+
mkdir: true,
|
|
41
|
+
...(usePretty && {
|
|
42
|
+
colorize: false,
|
|
43
|
+
translateTime: "SYS:standard",
|
|
44
|
+
ignore: "pid,hostname",
|
|
45
|
+
}),
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
})
|
|
49
|
+
} else {
|
|
50
|
+
// Create a minimal logger that writes to stderr (above Ink UI)
|
|
51
|
+
// stderr doesn't interfere with Ink's stdout rendering
|
|
52
|
+
_logger = pino({
|
|
53
|
+
level,
|
|
54
|
+
transport: {
|
|
55
|
+
target: "pino-pretty",
|
|
56
|
+
options: {
|
|
57
|
+
destination: 2, // stderr (file descriptor 2)
|
|
58
|
+
colorize: true,
|
|
59
|
+
translateTime: "HH:MM:ss",
|
|
60
|
+
ignore: "pid,hostname",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return _logger
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Singleton logger instance - starts as no-op
|
|
70
|
+
let _logger: Logger = pino({ level: "silent" })
|
|
71
|
+
const _useConsole = false
|
|
72
|
+
|
|
73
|
+
// Export the logger directly - pino already has all the methods
|
|
74
|
+
export const logger = {
|
|
75
|
+
debug: (obj: unknown, msg?: string) => {
|
|
76
|
+
if (_useConsole) {
|
|
77
|
+
console.log("[DEBUG]", ...(msg ? [msg] : []), obj)
|
|
78
|
+
} else {
|
|
79
|
+
_logger.debug(obj, msg)
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
info: (obj: unknown, msg?: string) => {
|
|
83
|
+
if (_useConsole) {
|
|
84
|
+
console.log("[INFO]", ...(msg ? [msg] : []), obj)
|
|
85
|
+
} else {
|
|
86
|
+
_logger.info(obj, msg)
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
warn: (obj: unknown, msg?: string) => {
|
|
90
|
+
if (_useConsole) {
|
|
91
|
+
console.log("[WARN]", ...(msg ? [msg] : []), obj)
|
|
92
|
+
} else {
|
|
93
|
+
_logger.warn(obj, msg)
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
error: (obj: unknown, msg?: string) => {
|
|
97
|
+
if (_useConsole) {
|
|
98
|
+
console.log("[ERROR]", ...(msg ? [msg] : []), obj)
|
|
99
|
+
} else {
|
|
100
|
+
_logger.error(obj, msg)
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
}
|