@mcp-shark/mcp-shark 1.5.2 → 1.5.4
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/bin/mcp-shark.js +1 -53
- package/lib/common/configs/index.js +108 -0
- package/lib/common/db/init.js +132 -0
- package/lib/common/db/logger.js +349 -0
- package/lib/common/db/query.js +403 -0
- package/mcp-server/index.js +40 -17
- package/mcp-server/mcp-shark.js +1 -1
- package/package.json +12 -4
- package/ui/dist/assets/{index-srLDlk97.js → index-CFHeMNwd.js} +7 -7
- package/ui/dist/index.html +1 -1
- package/ui/server/routes/composite/servers.js +1 -1
- package/ui/server/routes/composite/setup.js +1 -1
- package/ui/server/routes/conversations.js +1 -1
- package/ui/server/routes/help.js +1 -1
- package/ui/server/routes/requests.js +2 -2
- package/ui/server/routes/sessions.js +1 -1
- package/ui/server/routes/settings.js +1 -1
- package/ui/server/routes/smartscan/discover.js +1 -1
- package/ui/server/routes/statistics.js +1 -1
- package/ui/server/utils/logger.js +2 -2
- package/ui/server/utils/scan-cache/directory.js +1 -1
- package/ui/server/utils/smartscan-token.js +1 -1
- package/ui/server.js +3 -3
- package/ui/src/components/SmartScan/SmartScanControls.jsx +1 -0
- /package/{shared → lib/common}/logger.js +0 -0
package/ui/dist/index.html
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<title>MCP Shark</title>
|
|
8
8
|
<link rel="icon" type="image/png" href="/og-image.png" />
|
|
9
9
|
<link rel="apple-touch-icon" href="/og-image.png" />
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-CFHeMNwd.js"></script>
|
|
11
11
|
<link rel="stylesheet" crossorigin href="/assets/index-Cc-IUa83.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
@@ -2,7 +2,7 @@ import * as fs from 'node:fs';
|
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import * as path from 'node:path';
|
|
4
4
|
import { startMcpSharkServer } from '@mcp-shark/mcp-shark/mcp-server';
|
|
5
|
-
import { getMcpConfigPath } from '
|
|
5
|
+
import { getMcpConfigPath } from '#common/configs';
|
|
6
6
|
import { getSelectedServiceNames, updateConfigFile } from '../../utils/config-update.js';
|
|
7
7
|
import { clearOriginalConfig, convertMcpServersToServers } from '../../utils/config.js';
|
|
8
8
|
import logger from '../../utils/logger.js';
|
package/ui/server/routes/help.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { queryRequests } from '
|
|
1
|
+
import { queryRequests } from '#common/db/query';
|
|
2
2
|
import logger from '../utils/logger.js';
|
|
3
3
|
import { serializeBigInt } from '../utils/serialization.js';
|
|
4
4
|
|
|
@@ -78,7 +78,7 @@ export function createRequestsRoutes(db) {
|
|
|
78
78
|
|
|
79
79
|
const existingTables = tablesResult.map((row) => row.name);
|
|
80
80
|
|
|
81
|
-
// Based on
|
|
81
|
+
// Based on lib/common/db schema, these are the traffic-related tables:
|
|
82
82
|
// - packets: Individual HTTP request/response packets
|
|
83
83
|
// - conversations: Correlated request/response pairs
|
|
84
84
|
// - sessions: Session tracking
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { getDatabaseFile, getWorkingDirectory } from '
|
|
4
|
+
import { getDatabaseFile, getWorkingDirectory } from '#common/configs';
|
|
5
5
|
import logger from '../utils/logger.js';
|
|
6
6
|
import { getScanResultsDirectory } from '../utils/scan-cache/directory.js';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
3
|
-
import { getMcpConfigPath } from '
|
|
3
|
+
import { getMcpConfigPath } from '#common/configs';
|
|
4
4
|
import { convertMcpServersToServers } from '../../utils/config.js';
|
|
5
5
|
import logger from '../../utils/logger.js';
|
|
6
6
|
import { createTransport } from './transport.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
// Re-export
|
|
2
|
-
export { default } from '
|
|
1
|
+
// Re-export common logger
|
|
2
|
+
export { default } from '#common/logger';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync, mkdirSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
import { getWorkingDirectory } from '
|
|
3
|
+
import { getWorkingDirectory } from '#common/configs';
|
|
4
4
|
|
|
5
5
|
const SCAN_RESULTS_DIR_NAME = 'scan-results';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
import { getWorkingDirectory, prepareAppDataSpaces } from '
|
|
3
|
+
import { getWorkingDirectory, prepareAppDataSpaces } from '#common/configs';
|
|
4
4
|
import logger from './logger.js';
|
|
5
5
|
|
|
6
6
|
const SMART_SCAN_TOKEN_NAME = 'smart-scan-token.json';
|
package/ui/server.js
CHANGED
|
@@ -4,9 +4,9 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
|
4
4
|
import express from 'express';
|
|
5
5
|
import { WebSocketServer } from 'ws';
|
|
6
6
|
|
|
7
|
-
import { getDatabaseFile, prepareAppDataSpaces } from '
|
|
8
|
-
import { openDb } from '
|
|
9
|
-
import { queryRequests } from '
|
|
7
|
+
import { getDatabaseFile, prepareAppDataSpaces } from '#common/configs';
|
|
8
|
+
import { openDb } from '#common/db/init';
|
|
9
|
+
import { queryRequests } from '#common/db/query';
|
|
10
10
|
import { restoreOriginalConfig } from './server/utils/config.js';
|
|
11
11
|
|
|
12
12
|
import { createBackupRoutes } from './server/routes/backups/index.js';
|
|
File without changes
|