@mcp-shark/mcp-shark 1.5.0 → 1.5.3

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.
@@ -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-srLDlk97.js"></script>
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>
@@ -1,5 +1,5 @@
1
1
  import * as fs from 'node:fs';
2
- import { getMcpConfigPath } from 'mcp-shark-common/configs/index.js';
2
+ import { getMcpConfigPath } from '#common/configs';
3
3
 
4
4
  export function getServers(_req, res) {
5
5
  try {
@@ -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 'mcp-shark-common/configs/index.js';
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';
@@ -1,4 +1,4 @@
1
- import { queryConversations } from 'mcp-shark-common/db/query.js';
1
+ import { queryConversations } from '#common/db/query';
2
2
  import { serializeBigInt } from '../utils/serialization.js';
3
3
 
4
4
  export function createConversationsRoutes(db) {
@@ -1,4 +1,4 @@
1
- import { readHelpState, writeHelpState } from 'mcp-shark-common/configs/index.js';
1
+ import { readHelpState, writeHelpState } from '#common/configs';
2
2
 
3
3
  export function createHelpRoutes() {
4
4
  const router = {};
@@ -1,4 +1,4 @@
1
- import { queryRequests } from 'mcp-shark-common/db/query.js';
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 mcp-shark-common schema, these are the traffic-related tables:
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,4 +1,4 @@
1
- import { getSessionRequests, getSessions } from 'mcp-shark-common/db/query.js';
1
+ import { getSessionRequests, getSessions } from '#common/db/query';
2
2
  import { serializeBigInt } from '../utils/serialization.js';
3
3
 
4
4
  export function createSessionsRoutes(db) {
@@ -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 'mcp-shark-common/configs/index.js';
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 'mcp-shark-common/configs/index.js';
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,4 +1,4 @@
1
- import { queryRequests } from 'mcp-shark-common/db/query.js';
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
 
@@ -1,2 +1,2 @@
1
- // Re-export shared logger
2
- export { default } from '../../../shared/logger.js';
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 'mcp-shark-common/configs/index.js';
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 'mcp-shark-common/configs/index.js';
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 'mcp-shark-common/configs/index.js';
8
- import { openDb } from 'mcp-shark-common/db/init.js';
9
- import { queryRequests } from 'mcp-shark-common/db/query.js';
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';
@@ -1,3 +1,4 @@
1
+ import { IconTrash } from '@tabler/icons-react';
1
2
  import { useRef, useState } from 'react';
2
3
  import { colors, fonts } from '../../theme';
3
4
  import ConfirmationModal from '../ConfirmationModal';