@samanhappy/mcphub 0.0.5 → 0.0.7
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/.env.example +2 -0
- package/.eslintrc.json +25 -0
- package/.github/workflows/build.yml +51 -0
- package/.github/workflows/release.yml +19 -0
- package/.prettierrc +7 -0
- package/Dockerfile +51 -0
- package/assets/amap-edit.png +0 -0
- package/assets/amap-result.png +0 -0
- package/assets/cherry-mcp.png +0 -0
- package/assets/cursor-mcp.png +0 -0
- package/assets/cursor-query.png +0 -0
- package/assets/cursor-tools.png +0 -0
- package/assets/dashboard.png +0 -0
- package/assets/dashboard.zh.png +0 -0
- package/assets/group.png +0 -0
- package/assets/group.zh.png +0 -0
- package/assets/market.zh.png +0 -0
- package/assets/wegroup.jpg +0 -0
- package/assets/wegroup.png +0 -0
- package/assets/wexin.png +0 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/doc/intro.md +73 -0
- package/doc/intro2.md +232 -0
- package/entrypoint.sh +10 -0
- package/frontend/favicon.ico +0 -0
- package/frontend/index.html +13 -0
- package/frontend/postcss.config.js +6 -0
- package/frontend/src/App.tsx +44 -0
- package/frontend/src/components/AddGroupForm.tsx +132 -0
- package/frontend/src/components/AddServerForm.tsx +90 -0
- package/frontend/src/components/ChangePasswordForm.tsx +158 -0
- package/frontend/src/components/EditGroupForm.tsx +149 -0
- package/frontend/src/components/EditServerForm.tsx +76 -0
- package/frontend/src/components/GroupCard.tsx +143 -0
- package/frontend/src/components/MarketServerCard.tsx +153 -0
- package/frontend/src/components/MarketServerDetail.tsx +297 -0
- package/frontend/src/components/ProtectedRoute.tsx +27 -0
- package/frontend/src/components/ServerCard.tsx +230 -0
- package/frontend/src/components/ServerForm.tsx +276 -0
- package/frontend/src/components/icons/LucideIcons.tsx +14 -0
- package/frontend/src/components/layout/Content.tsx +17 -0
- package/frontend/src/components/layout/Header.tsx +61 -0
- package/frontend/src/components/layout/Sidebar.tsx +98 -0
- package/frontend/src/components/ui/Badge.tsx +33 -0
- package/frontend/src/components/ui/Button.tsx +0 -0
- package/frontend/src/components/ui/DeleteDialog.tsx +48 -0
- package/frontend/src/components/ui/Pagination.tsx +128 -0
- package/frontend/src/components/ui/Toast.tsx +96 -0
- package/frontend/src/components/ui/ToggleGroup.tsx +134 -0
- package/frontend/src/components/ui/ToolCard.tsx +38 -0
- package/frontend/src/contexts/AuthContext.tsx +159 -0
- package/frontend/src/contexts/ToastContext.tsx +60 -0
- package/frontend/src/hooks/useGroupData.ts +232 -0
- package/frontend/src/hooks/useMarketData.ts +410 -0
- package/frontend/src/hooks/useServerData.ts +306 -0
- package/frontend/src/hooks/useSettingsData.ts +131 -0
- package/frontend/src/i18n.ts +42 -0
- package/frontend/src/index.css +20 -0
- package/frontend/src/layouts/MainLayout.tsx +33 -0
- package/frontend/src/locales/en.json +214 -0
- package/frontend/src/locales/zh.json +214 -0
- package/frontend/src/main.tsx +12 -0
- package/frontend/src/pages/Dashboard.tsx +206 -0
- package/frontend/src/pages/GroupsPage.tsx +116 -0
- package/frontend/src/pages/LoginPage.tsx +104 -0
- package/frontend/src/pages/MarketPage.tsx +356 -0
- package/frontend/src/pages/ServersPage.tsx +144 -0
- package/frontend/src/pages/SettingsPage.tsx +149 -0
- package/frontend/src/services/authService.ts +141 -0
- package/frontend/src/types/index.ts +160 -0
- package/frontend/src/utils/cn.ts +10 -0
- package/frontend/tsconfig.json +31 -0
- package/frontend/tsconfig.node.json +10 -0
- package/frontend/vite.config.ts +26 -0
- package/googled76ca578b6543fbc.html +1 -0
- package/jest.config.js +10 -0
- package/mcp_settings.json +45 -0
- package/package.json +4 -16
- package/servers.json +74722 -0
- package/src/config/index.ts +46 -0
- package/src/controllers/authController.ts +179 -0
- package/src/controllers/groupController.ts +341 -0
- package/src/controllers/marketController.ts +154 -0
- package/src/controllers/serverController.ts +303 -0
- package/src/index.ts +18 -0
- package/src/middlewares/auth.ts +28 -0
- package/src/middlewares/index.ts +43 -0
- package/src/models/User.ts +103 -0
- package/src/routes/index.ts +96 -0
- package/src/server.ts +72 -0
- package/src/services/groupService.ts +232 -0
- package/src/services/marketService.ts +116 -0
- package/src/services/mcpService.ts +385 -0
- package/src/services/sseService.ts +119 -0
- package/src/types/index.ts +129 -0
- package/src/utils/migration.ts +52 -0
- package/tsconfig.json +17 -0
- package/bin/cli.js +0 -43
package/bin/cli.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// This script enables 'npx @samanhappy/mcphub' functionality
|
|
4
|
-
// It simply forwards all arguments to the main executable
|
|
5
|
-
|
|
6
|
-
import { spawn } from 'child_process';
|
|
7
|
-
import path from 'path';
|
|
8
|
-
import { fileURLToPath } from 'url';
|
|
9
|
-
import fs from 'fs';
|
|
10
|
-
|
|
11
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
-
const __dirname = path.dirname(__filename);
|
|
13
|
-
|
|
14
|
-
// Get the path to the build directory
|
|
15
|
-
const buildPath = path.resolve(__dirname, '../dist');
|
|
16
|
-
const indexPath = path.join(buildPath, 'index.js');
|
|
17
|
-
|
|
18
|
-
// Check if the index.js file exists
|
|
19
|
-
if (!fs.existsSync(indexPath)) {
|
|
20
|
-
console.error(`Error: Could not find ${indexPath}`);
|
|
21
|
-
console.error('Please make sure you have built the project with "npm run build" first.');
|
|
22
|
-
process.exit(1);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Start the server with provided arguments
|
|
26
|
-
const server = spawn('node', [indexPath, ...process.argv.slice(2)], {
|
|
27
|
-
stdio: 'inherit',
|
|
28
|
-
shell: true
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
// Handle process exit
|
|
32
|
-
server.on('close', (code) => {
|
|
33
|
-
process.exit(code);
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
// Forward signals to the child process
|
|
37
|
-
['SIGINT', 'SIGTERM'].forEach(signal => {
|
|
38
|
-
process.on(signal, () => {
|
|
39
|
-
if (!server.killed) {
|
|
40
|
-
server.kill(signal);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
});
|