@softtechai/quickmcp 1.0.14 → 1.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/dist/auth/auth-utils.d.ts +130 -0
- package/dist/auth/auth-utils.d.ts.map +1 -0
- package/dist/auth/auth-utils.js +600 -0
- package/dist/auth/auth-utils.js.map +1 -0
- package/dist/auth/jwks-provider.d.ts +9 -0
- package/dist/auth/jwks-provider.d.ts.map +1 -0
- package/dist/auth/jwks-provider.js +56 -0
- package/dist/auth/jwks-provider.js.map +1 -0
- package/dist/auth/token-utils.d.ts +40 -0
- package/dist/auth/token-utils.d.ts.map +1 -0
- package/dist/auth/token-utils.js +162 -0
- package/dist/auth/token-utils.js.map +1 -0
- package/dist/client/MCPClient.js +5 -4
- package/dist/client/MCPClient.js.map +1 -1
- package/dist/config/auth-config.d.ts +16 -0
- package/dist/config/auth-config.d.ts.map +1 -0
- package/dist/config/auth-config.js +107 -0
- package/dist/config/auth-config.js.map +1 -0
- package/dist/constant/constant.d.ts +20 -0
- package/dist/constant/constant.d.ts.map +1 -0
- package/dist/constant/constant.js +24 -0
- package/dist/constant/constant.js.map +1 -0
- package/dist/database/async-datastore.d.ts +6 -0
- package/dist/database/async-datastore.d.ts.map +1 -0
- package/dist/database/async-datastore.js +15 -0
- package/dist/database/async-datastore.js.map +1 -0
- package/dist/database/database-utils.d.ts +6 -0
- package/dist/database/database-utils.d.ts.map +1 -0
- package/dist/database/database-utils.js +29 -0
- package/dist/database/database-utils.js.map +1 -0
- package/dist/database/datastore.d.ts +164 -0
- package/dist/database/datastore.d.ts.map +1 -0
- package/dist/{parsers/types/index.js → database/datastore.js} +1 -0
- package/dist/database/datastore.js.map +1 -0
- package/dist/database/factory.d.ts +4 -0
- package/dist/database/factory.d.ts.map +1 -0
- package/dist/database/factory.js +32 -0
- package/dist/database/factory.js.map +1 -0
- package/dist/database/jdbc-manager.d.ts +49 -0
- package/dist/database/jdbc-manager.d.ts.map +1 -0
- package/dist/database/jdbc-manager.js +50 -0
- package/dist/database/jdbc-manager.js.map +1 -0
- package/dist/database/sqlite-manager.d.ts +46 -44
- package/dist/database/sqlite-manager.d.ts.map +1 -1
- package/dist/database/sqlite-manager.js +492 -42
- package/dist/database/sqlite-manager.js.map +1 -1
- package/dist/database/supabase-manager.d.ts +58 -0
- package/dist/database/supabase-manager.d.ts.map +1 -0
- package/dist/database/supabase-manager.js +432 -0
- package/dist/database/supabase-manager.js.map +1 -0
- package/dist/generators/MCPServerGenerator.d.ts +103 -20
- package/dist/generators/MCPServerGenerator.d.ts.map +1 -1
- package/dist/generators/MCPServerGenerator.js +6930 -128
- package/dist/generators/MCPServerGenerator.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/integrated-mcp-server-new.d.ts +14 -2
- package/dist/integrated-mcp-server-new.d.ts.map +1 -1
- package/dist/integrated-mcp-server-new.js +270 -180
- package/dist/integrated-mcp-server-new.js.map +1 -1
- package/dist/mcp-core/McpCoreService.d.ts +63 -0
- package/dist/mcp-core/McpCoreService.d.ts.map +1 -0
- package/dist/mcp-core/McpCoreService.js +492 -0
- package/dist/mcp-core/McpCoreService.js.map +1 -0
- package/dist/parsers/CsvParser.d.ts +1 -1
- package/dist/parsers/CsvParser.d.ts.map +1 -1
- package/dist/parsers/CsvParser.js +3 -2
- package/dist/parsers/CsvParser.js.map +1 -1
- package/dist/parsers/DatabaseParser.d.ts.map +1 -1
- package/dist/parsers/DatabaseParser.js +9 -8
- package/dist/parsers/DatabaseParser.js.map +1 -1
- package/dist/parsers/ExcelParser.d.ts +15 -0
- package/dist/parsers/ExcelParser.d.ts.map +1 -1
- package/dist/parsers/ExcelParser.js +287 -21
- package/dist/parsers/ExcelParser.js.map +1 -1
- package/dist/parsers/WebPageParser.d.ts +5 -0
- package/dist/parsers/WebPageParser.d.ts.map +1 -0
- package/dist/parsers/WebPageParser.js +35 -0
- package/dist/parsers/WebPageParser.js.map +1 -0
- package/dist/parsers/index.d.ts +3 -2
- package/dist/parsers/index.d.ts.map +1 -1
- package/dist/parsers/index.js +19 -16
- package/dist/parsers/index.js.map +1 -1
- package/dist/server/api/askApi.d.ts +41 -0
- package/dist/server/api/askApi.d.ts.map +1 -0
- package/dist/server/api/askApi.js +479 -0
- package/dist/server/api/askApi.js.map +1 -0
- package/dist/server/api/authApi.d.ts +101 -0
- package/dist/server/api/authApi.d.ts.map +1 -0
- package/dist/server/api/authApi.js +1472 -0
- package/dist/server/api/authApi.js.map +1 -0
- package/dist/server/api/authProperty.d.ts +18 -0
- package/dist/server/api/authProperty.d.ts.map +1 -0
- package/dist/server/api/authProperty.js +41 -0
- package/dist/server/api/authProperty.js.map +1 -0
- package/dist/server/api/configApi.d.ts +15 -0
- package/dist/server/api/configApi.d.ts.map +1 -0
- package/dist/server/api/configApi.js +42 -0
- package/dist/server/api/configApi.js.map +1 -0
- package/dist/server/api/databaseApi.d.ts +14 -0
- package/dist/server/api/databaseApi.d.ts.map +1 -0
- package/dist/server/api/databaseApi.js +111 -0
- package/dist/server/api/databaseApi.js.map +1 -0
- package/dist/server/api/directoryApi.d.ts +9 -0
- package/dist/server/api/directoryApi.d.ts.map +1 -0
- package/dist/server/api/directoryApi.js +103 -0
- package/dist/server/api/directoryApi.js.map +1 -0
- package/dist/server/api/generateApi.d.ts +24 -0
- package/dist/server/api/generateApi.d.ts.map +1 -0
- package/dist/server/api/generateApi.js +457 -0
- package/dist/server/api/generateApi.js.map +1 -0
- package/dist/server/api/healthApi.d.ts +9 -0
- package/dist/server/api/healthApi.d.ts.map +1 -0
- package/dist/server/api/healthApi.js +15 -0
- package/dist/server/api/healthApi.js.map +1 -0
- package/dist/server/api/indexApi.d.ts +21 -0
- package/dist/server/api/indexApi.d.ts.map +1 -0
- package/dist/server/api/indexApi.js +61 -0
- package/dist/server/api/indexApi.js.map +1 -0
- package/dist/server/api/logsApi.d.ts +12 -0
- package/dist/server/api/logsApi.d.ts.map +1 -0
- package/dist/server/api/logsApi.js +37 -0
- package/dist/server/api/logsApi.js.map +1 -0
- package/dist/server/api/mcpApi.d.ts +20 -0
- package/dist/server/api/mcpApi.d.ts.map +1 -0
- package/dist/server/api/mcpApi.js +120 -0
- package/dist/server/api/mcpApi.js.map +1 -0
- package/dist/server/api/nameApi.d.ts +21 -0
- package/dist/server/api/nameApi.d.ts.map +1 -0
- package/dist/server/api/nameApi.js +42 -0
- package/dist/server/api/nameApi.js.map +1 -0
- package/dist/server/api/parseApi.d.ts +9 -0
- package/dist/server/api/parseApi.d.ts.map +1 -0
- package/dist/server/api/parseApi.js +3245 -0
- package/dist/server/api/parseApi.js.map +1 -0
- package/dist/server/api/serverApi.d.ts +44 -0
- package/dist/server/api/serverApi.d.ts.map +1 -0
- package/dist/server/api/serverApi.js +417 -0
- package/dist/server/api/serverApi.js.map +1 -0
- package/dist/{dynamic-mcp-executor.d.ts → server/dynamic-mcp-executor.d.ts} +4 -5
- package/dist/server/dynamic-mcp-executor.d.ts.map +1 -0
- package/dist/server/dynamic-mcp-executor.js +62 -0
- package/dist/server/dynamic-mcp-executor.js.map +1 -0
- package/dist/server/port-utils.d.ts +14 -0
- package/dist/server/port-utils.d.ts.map +1 -0
- package/dist/server/port-utils.js +31 -0
- package/dist/server/port-utils.js.map +1 -0
- package/dist/server/server-utils.d.ts +13 -0
- package/dist/server/server-utils.d.ts.map +1 -0
- package/dist/server/server-utils.js +72 -0
- package/dist/server/server-utils.js.map +1 -0
- package/dist/{web → server}/server.d.ts +1 -0
- package/dist/server/server.d.ts.map +1 -0
- package/dist/server/server.js +535 -0
- package/dist/server/server.js.map +1 -0
- package/dist/server/tool-executer.d.ts +101 -0
- package/dist/server/tool-executer.d.ts.map +1 -0
- package/dist/server/tool-executer.js +6198 -0
- package/dist/server/tool-executer.js.map +1 -0
- package/dist/types/index.d.ts +1197 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1028 -0
- package/dist/types/index.js.map +1 -1
- package/dist/upload/upload-utils.d.ts +4 -0
- package/dist/upload/upload-utils.d.ts.map +1 -0
- package/dist/upload/upload-utils.js +29 -0
- package/dist/upload/upload-utils.js.map +1 -0
- package/dist/utils/deployment-util.d.ts +14 -0
- package/dist/utils/deployment-util.d.ts.map +1 -0
- package/dist/utils/deployment-util.js +46 -0
- package/dist/utils/deployment-util.js.map +1 -0
- package/dist/utils/logger.d.ts +15 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +56 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +18 -6
- package/quickmcp-direct-stdio.js +245 -163
- package/src/web/public/app.js +15370 -1471
- package/src/web/public/authorization.html +868 -0
- package/src/web/public/database-tables.html +283 -547
- package/src/web/public/how-to-use.html +446 -462
- package/src/web/public/how-to-use.js +4 -4
- package/src/web/public/images/app/activepieces.png +0 -0
- package/src/web/public/images/app/airtable.png +0 -0
- package/src/web/public/images/app/androidstudio.png +0 -0
- package/src/web/public/images/app/antigravity.png +0 -0
- package/src/web/public/images/app/applenotes.png +0 -0
- package/src/web/public/images/app/applereminders.png +0 -0
- package/src/web/public/images/app/asana.png +0 -0
- package/src/web/public/images/app/azureai.png +0 -0
- package/src/web/public/images/app/bash.png +0 -0
- package/src/web/public/images/app/bearnotes.png +0 -0
- package/src/web/public/images/app/bitbucket.png +0 -0
- package/src/web/public/images/app/claude.png +0 -0
- package/src/web/public/images/app/cli.png +0 -0
- package/src/web/public/images/app/clickup.png +0 -0
- package/src/web/public/images/app/cohere.png +0 -0
- package/src/web/public/images/app/confluence.png +0 -0
- package/src/web/public/images/app/confluence2.png +0 -0
- package/src/web/public/images/app/curl.png +0 -0
- package/src/web/public/images/app/curl_mini.png +0 -0
- package/src/web/public/images/app/cursor.png +0 -0
- package/src/web/public/images/app/db2.png +0 -0
- package/src/web/public/images/app/deepseek.png +0 -0
- package/src/web/public/images/app/discord.png +0 -0
- package/src/web/public/images/app/docker.png +0 -0
- package/src/web/public/images/app/dockerhub.png +0 -0
- package/src/web/public/images/app/dropbox.png +0 -0
- package/src/web/public/images/app/elasticsearch.png +0 -0
- package/src/web/public/images/app/facebook.png +0 -0
- package/src/web/public/images/app/falai.png +0 -0
- package/src/web/public/images/app/fireworks.png +0 -0
- package/src/web/public/images/app/gdrive.png +0 -0
- package/src/web/public/images/app/gemini.png +0 -0
- package/src/web/public/images/app/github.png +0 -0
- package/src/web/public/images/app/githubcopilot.png +0 -0
- package/src/web/public/images/app/gitlab.png +0 -0
- package/src/web/public/images/app/gmail.png +0 -0
- package/src/web/public/images/app/googlecalender.png +0 -0
- package/src/web/public/images/app/googledocs.png +0 -0
- package/src/web/public/images/app/googlesheets.png +0 -0
- package/src/web/public/images/app/gradle.png +0 -0
- package/src/web/public/images/app/grafana.png +0 -0
- package/src/web/public/images/app/graphql.png +0 -0
- package/src/web/public/images/app/grok.png +0 -0
- package/src/web/public/images/app/groq.png +0 -0
- package/src/web/public/images/app/hazelcast.png +0 -0
- package/src/web/public/images/app/huggingface.png +0 -0
- package/src/web/public/images/app/imessage.png +0 -0
- package/src/web/public/images/app/instagram.png +0 -0
- package/src/web/public/images/app/intellij.png +0 -0
- package/src/web/public/images/app/jenkins.png +0 -0
- package/src/web/public/images/app/jira.png +0 -0
- package/src/web/public/images/app/kafka.png +0 -0
- package/src/web/public/images/app/kubernetes.png +0 -0
- package/src/web/public/images/app/linear.png +0 -0
- package/src/web/public/images/app/linkedin.png +0 -0
- package/src/web/public/images/app/llama.png +0 -0
- package/src/web/public/images/app/make.png +0 -0
- package/src/web/public/images/app/maven.png +0 -0
- package/src/web/public/images/app/mcp.png +0 -0
- package/src/web/public/images/app/microsoftteams.png +0 -0
- package/src/web/public/images/app/mistral.png +0 -0
- package/src/web/public/images/app/monday.png +0 -0
- package/src/web/public/images/app/mongodb.png +0 -0
- package/src/web/public/images/app/mssql.png +0 -0
- package/src/web/public/images/app/mysql.png +0 -0
- package/src/web/public/images/app/n8n.png +0 -0
- package/src/web/public/images/app/notion.png +0 -0
- package/src/web/public/images/app/npm.png +0 -0
- package/src/web/public/images/app/nuget.png +0 -0
- package/src/web/public/images/app/obsidian.png +0 -0
- package/src/web/public/images/app/openai.png +0 -0
- package/src/web/public/images/app/openrouter.png +0 -0
- package/src/web/public/images/app/opensearch.png +0 -0
- package/src/web/public/images/app/openshift.png +0 -0
- package/src/web/public/images/app/oracle.png +0 -0
- package/src/web/public/images/app/perplexity.png +0 -0
- package/src/web/public/images/app/pipedream.png +0 -0
- package/src/web/public/images/app/postgresql.png +0 -0
- package/src/web/public/images/app/powershell.png +0 -0
- package/src/web/public/images/app/prometheus.png +0 -0
- package/src/web/public/images/app/reddit.png +0 -0
- package/src/web/public/images/app/redis.png +0 -0
- package/src/web/public/images/app/rss.png +0 -0
- package/src/web/public/images/app/signal.png +0 -0
- package/src/web/public/images/app/slack.png +0 -0
- package/src/web/public/images/app/soap.png +0 -0
- package/src/web/public/images/app/sqlite.png +0 -0
- package/src/web/public/images/app/supabase.png +0 -0
- package/src/web/public/images/app/telegram.png +0 -0
- package/src/web/public/images/app/things3.png +0 -0
- package/src/web/public/images/app/threads.png +0 -0
- package/src/web/public/images/app/tiktok.png +0 -0
- package/src/web/public/images/app/together.png +0 -0
- package/src/web/public/images/app/trello.png +0 -0
- package/src/web/public/images/app/vscode.png +0 -0
- package/src/web/public/images/app/webhook.png +0 -0
- package/src/web/public/images/app/webpage.png +0 -0
- package/src/web/public/images/app/whatsappbusiness.png +0 -0
- package/src/web/public/images/app/windsorf.png +0 -0
- package/src/web/public/images/app/x.png +0 -0
- package/src/web/public/images/app/youtube.png +0 -0
- package/src/web/public/images/app/zapier.png +0 -0
- package/src/web/public/images/app/zededitor.png +0 -0
- package/src/web/public/images/app/zoom.png +0 -0
- package/src/web/public/images/avatar-anon.svg +4 -0
- package/src/web/public/images/favicon.png +0 -0
- package/src/web/public/images/install/chatgpt-web/step0.png +0 -0
- package/src/web/public/images/install/chatgpt-web/step1.png +0 -0
- package/src/web/public/images/install/chatgpt-web/step2.png +0 -0
- package/src/web/public/images/install/chatgpt-web/step3.png +0 -0
- package/src/web/public/images/install/chatgpt-web/step4.png +0 -0
- package/src/web/public/images/install/chatgpt-web/step5.png +0 -0
- package/src/web/public/images/readme/1-generate-servers.png +0 -0
- package/src/web/public/images/readme/2-database-connection.png +0 -0
- package/src/web/public/images/readme/2-file-upload.png +0 -0
- package/src/web/public/images/readme/3-data-preview.png +0 -0
- package/src/web/public/images/readme/4-data-preview2.png +0 -0
- package/src/web/public/images/readme/5-server-configuration.png +0 -0
- package/src/web/public/images/readme/6-server-generated-modal.png +0 -0
- package/src/web/public/images/readme/7-generated-servers.png +0 -0
- package/src/web/public/images/readme/8-generated-servers-view-details.png +0 -0
- package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.23.51.png +0 -0
- package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.24.59.png +0 -0
- package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.25.05.png +0 -0
- package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.25.14.png +0 -0
- package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.25.21.png +0 -0
- package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.25.36.png +0 -0
- package/src/web/public/index.html +4685 -488
- package/src/web/public/landing.html +1638 -0
- package/src/web/public/logger.js +31 -0
- package/src/web/public/login.html +372 -0
- package/src/web/public/manage-servers.html +121 -188
- package/src/web/public/pricing.html +537 -0
- package/src/web/public/quick-ask.html +133 -0
- package/src/web/public/quickmcp-styles.css +708 -0
- package/src/web/public/roles.html +177 -0
- package/src/web/public/shared.js +736 -3
- package/src/web/public/sidebar.js +414 -0
- package/src/web/public/test-servers.html +605 -221
- package/src/web/public/users.html +191 -0
- package/dist/client/MCPClientUnified.d.ts +0 -31
- package/dist/client/MCPClientUnified.d.ts.map +0 -1
- package/dist/client/MCPClientUnified.js +0 -275
- package/dist/client/MCPClientUnified.js.map +0 -1
- package/dist/client/MCPTestRunnerUnified.d.ts +0 -48
- package/dist/client/MCPTestRunnerUnified.d.ts.map +0 -1
- package/dist/client/MCPTestRunnerUnified.js +0 -183
- package/dist/client/MCPTestRunnerUnified.js.map +0 -1
- package/dist/database/json-manager.d.ts +0 -55
- package/dist/database/json-manager.d.ts.map +0 -1
- package/dist/database/json-manager.js +0 -128
- package/dist/database/json-manager.js.map +0 -1
- package/dist/dynamic-mcp-executor.d.ts.map +0 -1
- package/dist/dynamic-mcp-executor.js +0 -274
- package/dist/dynamic-mcp-executor.js.map +0 -1
- package/dist/generators/MCPServerGenerator-new.d.ts +0 -37
- package/dist/generators/MCPServerGenerator-new.d.ts.map +0 -1
- package/dist/generators/MCPServerGenerator-new.js +0 -287
- package/dist/generators/MCPServerGenerator-new.js.map +0 -1
- package/dist/generators/database/sqlite-manager.d.ts +0 -52
- package/dist/generators/database/sqlite-manager.js +0 -143
- package/dist/generators/generators/MCPServerGenerator.d.ts +0 -37
- package/dist/generators/generators/MCPServerGenerator.js +0 -396
- package/dist/integrated-mcp-server.d.ts +0 -25
- package/dist/integrated-mcp-server.d.ts.map +0 -1
- package/dist/integrated-mcp-server.js +0 -541
- package/dist/integrated-mcp-server.js.map +0 -1
- package/dist/mcp-inspector-server.d.ts +0 -3
- package/dist/mcp-inspector-server.d.ts.map +0 -1
- package/dist/mcp-inspector-server.js +0 -119
- package/dist/mcp-inspector-server.js.map +0 -1
- package/dist/mcp-sdk-server.d.ts +0 -3
- package/dist/mcp-sdk-server.d.ts.map +0 -1
- package/dist/mcp-sdk-server.js +0 -90
- package/dist/mcp-sdk-server.js.map +0 -1
- package/dist/mcp-server.d.ts +0 -3
- package/dist/mcp-server.d.ts.map +0 -1
- package/dist/mcp-server.js +0 -300
- package/dist/mcp-server.js.map +0 -1
- package/dist/parsers/parsers/ExcelParser.js +0 -118
- package/dist/quickmcp-unified-bridge.d.ts +0 -13
- package/dist/quickmcp-unified-bridge.d.ts.map +0 -1
- package/dist/quickmcp-unified-bridge.js +0 -176
- package/dist/quickmcp-unified-bridge.js.map +0 -1
- package/dist/sqlite-manager.js +0 -145
- package/dist/test-app.d.ts +0 -2
- package/dist/test-app.d.ts.map +0 -1
- package/dist/test-app.js +0 -119
- package/dist/test-app.js.map +0 -1
- package/dist/transport/base-transport.d.ts +0 -21
- package/dist/transport/base-transport.d.ts.map +0 -1
- package/dist/transport/base-transport.js +0 -16
- package/dist/transport/base-transport.js.map +0 -1
- package/dist/transport/index.d.ts +0 -10
- package/dist/transport/index.d.ts.map +0 -1
- package/dist/transport/index.js +0 -12
- package/dist/transport/index.js.map +0 -1
- package/dist/transport/sse-transport.d.ts +0 -13
- package/dist/transport/sse-transport.d.ts.map +0 -1
- package/dist/transport/sse-transport.js +0 -106
- package/dist/transport/sse-transport.js.map +0 -1
- package/dist/transport/stdio-transport.d.ts +0 -8
- package/dist/transport/stdio-transport.d.ts.map +0 -1
- package/dist/transport/stdio-transport.js +0 -53
- package/dist/transport/stdio-transport.js.map +0 -1
- package/dist/transport/streamable-http-transport.d.ts +0 -15
- package/dist/transport/streamable-http-transport.d.ts.map +0 -1
- package/dist/transport/streamable-http-transport.js +0 -151
- package/dist/transport/streamable-http-transport.js.map +0 -1
- package/dist/web/client/MCPClient.js +0 -348
- package/dist/web/client/MCPTestRunner.js +0 -317
- package/dist/web/database/json-manager.js +0 -124
- package/dist/web/database/sqlite-manager.js +0 -146
- package/dist/web/dynamic-mcp-executor.js +0 -443
- package/dist/web/generators/MCPServerGenerator-new.js +0 -284
- package/dist/web/generators/MCPServerGenerator.js +0 -566
- package/dist/web/integrated-mcp-server-new.js +0 -394
- package/dist/web/parsers/CsvParser.js +0 -144
- package/dist/web/parsers/DatabaseParser.js +0 -637
- package/dist/web/parsers/ExcelParser.js +0 -180
- package/dist/web/parsers/index.js +0 -152
- package/dist/web/server.d.ts.map +0 -1
- package/dist/web/server.js +0 -790
- package/dist/web/server.js.map +0 -1
- package/dist/web/types/index.js +0 -2
- package/dist/web/web/server.js +0 -860
- package/src/web/public/modern-styles.css +0 -946
- package/src/web/public/shared-styles.css +0 -2091
- /package/src/web/public/images/{1-claude-quickmcp-stdio.png → readme/1-claude-quickmcp-stdio.png} +0 -0
- /package/src/web/public/images/{2-claude-tools.png → readme/2-claude-tools.png} +0 -0
- /package/src/web/public/images/{3-claude-developer-settings.png → readme/3-claude-developer-settings.png} +0 -0
- /package/src/web/public/images/{4-claude-config.png → readme/4-claude-config.png} +0 -0
- /package/src/web/public/images/{5-claude-config-edit.png → readme/5-claude-config-edit.png} +0 -0
|
@@ -1,443 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
-
var ownKeys = function(o) {
|
|
31
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
-
var ar = [];
|
|
33
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
-
return ar;
|
|
35
|
-
};
|
|
36
|
-
return ownKeys(o);
|
|
37
|
-
};
|
|
38
|
-
return function (mod) {
|
|
39
|
-
if (mod && mod.__esModule) return mod;
|
|
40
|
-
var result = {};
|
|
41
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
-
__setModuleDefault(result, mod);
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
47
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
48
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
49
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
50
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
51
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
52
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
56
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
57
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
58
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
59
|
-
function step(op) {
|
|
60
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
61
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
62
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
63
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
64
|
-
switch (op[0]) {
|
|
65
|
-
case 0: case 1: t = op; break;
|
|
66
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
67
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
68
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
69
|
-
default:
|
|
70
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
71
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
72
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
73
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
74
|
-
if (t[2]) _.ops.pop();
|
|
75
|
-
_.trys.pop(); continue;
|
|
76
|
-
}
|
|
77
|
-
op = body.call(thisArg, _);
|
|
78
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
79
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
83
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
84
|
-
};
|
|
85
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
86
|
-
exports.DynamicMCPExecutor = void 0;
|
|
87
|
-
var sqlite_manager_js_1 = require("./database/sqlite-manager.js");
|
|
88
|
-
var sql = __importStar(require("mssql"));
|
|
89
|
-
var promise_1 = __importDefault(require("mysql2/promise"));
|
|
90
|
-
var pg_1 = require("pg");
|
|
91
|
-
var DynamicMCPExecutor = /** @class */ (function () {
|
|
92
|
-
function DynamicMCPExecutor() {
|
|
93
|
-
this.dbConnections = new Map();
|
|
94
|
-
this.sqliteManager = new sqlite_manager_js_1.SQLiteManager();
|
|
95
|
-
}
|
|
96
|
-
DynamicMCPExecutor.prototype.getAllTools = function () {
|
|
97
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
98
|
-
var tools;
|
|
99
|
-
return __generator(this, function (_a) {
|
|
100
|
-
tools = this.sqliteManager.getAllTools();
|
|
101
|
-
return [2 /*return*/, tools.map(function (tool) { return ({
|
|
102
|
-
name: "".concat(tool.server_id, "__").concat(tool.name),
|
|
103
|
-
description: "[".concat(tool.server_id, "] ").concat(tool.description),
|
|
104
|
-
inputSchema: typeof tool.inputSchema === 'string' ? JSON.parse(tool.inputSchema) : tool.inputSchema
|
|
105
|
-
}); })];
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
DynamicMCPExecutor.prototype.getAllResources = function () {
|
|
110
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
111
|
-
var resources;
|
|
112
|
-
return __generator(this, function (_a) {
|
|
113
|
-
resources = this.sqliteManager.getAllResources();
|
|
114
|
-
return [2 /*return*/, resources.map(function (resource) { return ({
|
|
115
|
-
name: "".concat(resource.server_id, "__").concat(resource.name),
|
|
116
|
-
description: "[".concat(resource.server_id, "] ").concat(resource.description),
|
|
117
|
-
uri: resource.uri_template
|
|
118
|
-
}); })];
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
|
-
DynamicMCPExecutor.prototype.executeTool = function (toolName, args) {
|
|
123
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
124
|
-
var parts, serverId, actualToolName_1, tools, tool, serverConfig, dbConnection, result, error_1;
|
|
125
|
-
return __generator(this, function (_a) {
|
|
126
|
-
switch (_a.label) {
|
|
127
|
-
case 0:
|
|
128
|
-
_a.trys.push([0, 3, , 4]);
|
|
129
|
-
parts = toolName.split('__');
|
|
130
|
-
if (parts.length !== 2) {
|
|
131
|
-
throw new Error("Invalid tool name format: ".concat(toolName));
|
|
132
|
-
}
|
|
133
|
-
serverId = parts[0], actualToolName_1 = parts[1];
|
|
134
|
-
tools = this.sqliteManager.getToolsForServer(serverId);
|
|
135
|
-
tool = tools.find(function (t) { return t.name === actualToolName_1; });
|
|
136
|
-
if (!tool) {
|
|
137
|
-
throw new Error("Tool not found: ".concat(toolName));
|
|
138
|
-
}
|
|
139
|
-
serverConfig = this.sqliteManager.getServer(serverId);
|
|
140
|
-
if (!serverConfig) {
|
|
141
|
-
throw new Error("Server not found: ".concat(serverId));
|
|
142
|
-
}
|
|
143
|
-
return [4 /*yield*/, this.getOrCreateConnection(serverId, serverConfig.dbConfig)];
|
|
144
|
-
case 1:
|
|
145
|
-
dbConnection = _a.sent();
|
|
146
|
-
return [4 /*yield*/, this.executeQuery(dbConnection, tool.sqlQuery, args, tool.operation)];
|
|
147
|
-
case 2:
|
|
148
|
-
result = _a.sent();
|
|
149
|
-
console.error("\u2705 Executed tool ".concat(toolName, " successfully"));
|
|
150
|
-
return [2 /*return*/, {
|
|
151
|
-
success: true,
|
|
152
|
-
data: result,
|
|
153
|
-
rowCount: Array.isArray(result) ? result.length : (result.rowsAffected || 0)
|
|
154
|
-
}];
|
|
155
|
-
case 3:
|
|
156
|
-
error_1 = _a.sent();
|
|
157
|
-
console.error("\u274C Error executing tool ".concat(toolName, ":"), error_1);
|
|
158
|
-
throw error_1;
|
|
159
|
-
case 4: return [2 /*return*/];
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
});
|
|
163
|
-
};
|
|
164
|
-
DynamicMCPExecutor.prototype.readResource = function (resourceName) {
|
|
165
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
166
|
-
var parts, serverId, actualResourceName_1, resources, resource, serverConfig, dbConnection, result, error_2;
|
|
167
|
-
return __generator(this, function (_a) {
|
|
168
|
-
switch (_a.label) {
|
|
169
|
-
case 0:
|
|
170
|
-
_a.trys.push([0, 3, , 4]);
|
|
171
|
-
parts = resourceName.split('__');
|
|
172
|
-
if (parts.length !== 2) {
|
|
173
|
-
throw new Error("Invalid resource name format: ".concat(resourceName));
|
|
174
|
-
}
|
|
175
|
-
serverId = parts[0], actualResourceName_1 = parts[1];
|
|
176
|
-
resources = this.sqliteManager.getResourcesForServer(serverId);
|
|
177
|
-
resource = resources.find(function (r) { return r.name === actualResourceName_1; });
|
|
178
|
-
if (!resource) {
|
|
179
|
-
throw new Error("Resource not found: ".concat(resourceName));
|
|
180
|
-
}
|
|
181
|
-
serverConfig = this.sqliteManager.getServer(serverId);
|
|
182
|
-
if (!serverConfig) {
|
|
183
|
-
throw new Error("Server not found: ".concat(serverId));
|
|
184
|
-
}
|
|
185
|
-
return [4 /*yield*/, this.getOrCreateConnection(serverId, serverConfig.dbConfig)];
|
|
186
|
-
case 1:
|
|
187
|
-
dbConnection = _a.sent();
|
|
188
|
-
return [4 /*yield*/, this.executeQuery(dbConnection, resource.sqlQuery, {}, 'SELECT')];
|
|
189
|
-
case 2:
|
|
190
|
-
result = _a.sent();
|
|
191
|
-
console.error("\u2705 Read resource ".concat(resourceName, " successfully"));
|
|
192
|
-
return [2 /*return*/, {
|
|
193
|
-
contents: [{
|
|
194
|
-
uri: resource.uri_template,
|
|
195
|
-
mimeType: 'application/json',
|
|
196
|
-
text: JSON.stringify(result, null, 2)
|
|
197
|
-
}]
|
|
198
|
-
}];
|
|
199
|
-
case 3:
|
|
200
|
-
error_2 = _a.sent();
|
|
201
|
-
console.error("\u274C Error reading resource ".concat(resourceName, ":"), error_2);
|
|
202
|
-
throw error_2;
|
|
203
|
-
case 4: return [2 /*return*/];
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
});
|
|
207
|
-
};
|
|
208
|
-
DynamicMCPExecutor.prototype.getOrCreateConnection = function (serverId, dbConfig) {
|
|
209
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
210
|
-
var connection, dbConnection, _a, error_3;
|
|
211
|
-
return __generator(this, function (_b) {
|
|
212
|
-
switch (_b.label) {
|
|
213
|
-
case 0:
|
|
214
|
-
if (this.dbConnections.has(serverId)) {
|
|
215
|
-
return [2 /*return*/, this.dbConnections.get(serverId)];
|
|
216
|
-
}
|
|
217
|
-
_b.label = 1;
|
|
218
|
-
case 1:
|
|
219
|
-
_b.trys.push([1, 10, , 11]);
|
|
220
|
-
_a = dbConfig.type;
|
|
221
|
-
switch (_a) {
|
|
222
|
-
case 'mssql': return [3 /*break*/, 2];
|
|
223
|
-
case 'mysql': return [3 /*break*/, 4];
|
|
224
|
-
case 'postgresql': return [3 /*break*/, 6];
|
|
225
|
-
}
|
|
226
|
-
return [3 /*break*/, 8];
|
|
227
|
-
case 2:
|
|
228
|
-
return [4 /*yield*/, sql.connect({
|
|
229
|
-
server: dbConfig.host,
|
|
230
|
-
port: dbConfig.port || 1433,
|
|
231
|
-
database: dbConfig.database,
|
|
232
|
-
user: dbConfig.username,
|
|
233
|
-
password: dbConfig.password,
|
|
234
|
-
options: {
|
|
235
|
-
encrypt: dbConfig.encrypt || false,
|
|
236
|
-
trustServerCertificate: dbConfig.trustServerCertificate || true
|
|
237
|
-
}
|
|
238
|
-
})];
|
|
239
|
-
case 3:
|
|
240
|
-
connection = _b.sent();
|
|
241
|
-
console.error("\uD83D\uDD17 Connected to MSSQL database for server ".concat(serverId));
|
|
242
|
-
return [3 /*break*/, 9];
|
|
243
|
-
case 4:
|
|
244
|
-
connection = promise_1.default.createConnection({
|
|
245
|
-
host: dbConfig.host,
|
|
246
|
-
port: dbConfig.port || 3306,
|
|
247
|
-
database: dbConfig.database,
|
|
248
|
-
user: dbConfig.username,
|
|
249
|
-
password: dbConfig.password
|
|
250
|
-
});
|
|
251
|
-
return [4 /*yield*/, connection.connect()];
|
|
252
|
-
case 5:
|
|
253
|
-
_b.sent();
|
|
254
|
-
console.error("\uD83D\uDD17 Connected to MySQL database for server ".concat(serverId));
|
|
255
|
-
return [3 /*break*/, 9];
|
|
256
|
-
case 6:
|
|
257
|
-
connection = new pg_1.Pool({
|
|
258
|
-
host: dbConfig.host,
|
|
259
|
-
port: dbConfig.port || 5432,
|
|
260
|
-
database: dbConfig.database,
|
|
261
|
-
user: dbConfig.username,
|
|
262
|
-
password: dbConfig.password
|
|
263
|
-
});
|
|
264
|
-
// Test connection
|
|
265
|
-
return [4 /*yield*/, connection.query('SELECT 1')];
|
|
266
|
-
case 7:
|
|
267
|
-
// Test connection
|
|
268
|
-
_b.sent();
|
|
269
|
-
console.error("\uD83D\uDD17 Connected to PostgreSQL database for server ".concat(serverId));
|
|
270
|
-
return [3 /*break*/, 9];
|
|
271
|
-
case 8: throw new Error("Unsupported database type: ".concat(dbConfig.type));
|
|
272
|
-
case 9:
|
|
273
|
-
dbConnection = {
|
|
274
|
-
type: dbConfig.type,
|
|
275
|
-
connection: connection,
|
|
276
|
-
config: dbConfig
|
|
277
|
-
};
|
|
278
|
-
this.dbConnections.set(serverId, dbConnection);
|
|
279
|
-
return [2 /*return*/, dbConnection];
|
|
280
|
-
case 10:
|
|
281
|
-
error_3 = _b.sent();
|
|
282
|
-
console.error("\u274C Failed to connect to database for server ".concat(serverId, ":"), error_3);
|
|
283
|
-
throw error_3;
|
|
284
|
-
case 11: return [2 /*return*/];
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
});
|
|
288
|
-
};
|
|
289
|
-
DynamicMCPExecutor.prototype.executeQuery = function (dbConnection, sqlQuery, args, operation) {
|
|
290
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
291
|
-
var type, connection, _a, request, paramRegex, match, sqlParams, hasActiveFilters, modifiedQuery, _i, sqlParams_1, paramName, paramNameStr, value, result, rows, values, pgResult, error_4;
|
|
292
|
-
return __generator(this, function (_b) {
|
|
293
|
-
switch (_b.label) {
|
|
294
|
-
case 0:
|
|
295
|
-
type = dbConnection.type, connection = dbConnection.connection;
|
|
296
|
-
_b.label = 1;
|
|
297
|
-
case 1:
|
|
298
|
-
_b.trys.push([1, 10, , 11]);
|
|
299
|
-
_a = type;
|
|
300
|
-
switch (_a) {
|
|
301
|
-
case 'mssql': return [3 /*break*/, 2];
|
|
302
|
-
case 'mysql': return [3 /*break*/, 4];
|
|
303
|
-
case 'postgresql': return [3 /*break*/, 6];
|
|
304
|
-
}
|
|
305
|
-
return [3 /*break*/, 8];
|
|
306
|
-
case 2:
|
|
307
|
-
request = connection.request();
|
|
308
|
-
paramRegex = /@(\w+)/g;
|
|
309
|
-
match = void 0;
|
|
310
|
-
sqlParams = new Set();
|
|
311
|
-
while ((match = paramRegex.exec(sqlQuery)) !== null) {
|
|
312
|
-
sqlParams.add(match[1]);
|
|
313
|
-
}
|
|
314
|
-
hasActiveFilters = Array.from(sqlParams).some(function (paramName) {
|
|
315
|
-
if (paramName === 'limit' || paramName === 'offset')
|
|
316
|
-
return false;
|
|
317
|
-
var value = args[paramName];
|
|
318
|
-
return value !== undefined && value !== null;
|
|
319
|
-
});
|
|
320
|
-
modifiedQuery = sqlQuery;
|
|
321
|
-
if (!hasActiveFilters && operation === 'SELECT') {
|
|
322
|
-
// Remove complex WHERE clause that causes ntext compatibility issues
|
|
323
|
-
modifiedQuery = sqlQuery.replace(/WHERE.*?(?=ORDER BY|GROUP BY|HAVING|$)/gi, '');
|
|
324
|
-
}
|
|
325
|
-
// Always add all SQL parameters, using provided values or defaults
|
|
326
|
-
for (_i = 0, sqlParams_1 = sqlParams; _i < sqlParams_1.length; _i++) {
|
|
327
|
-
paramName = sqlParams_1[_i];
|
|
328
|
-
paramNameStr = paramName;
|
|
329
|
-
value = args[paramNameStr];
|
|
330
|
-
// Set defaults for limit and offset if not provided
|
|
331
|
-
if (paramNameStr === 'limit' && (value === undefined || value === null)) {
|
|
332
|
-
value = 100;
|
|
333
|
-
}
|
|
334
|
-
else if (paramNameStr === 'offset' && (value === undefined || value === null)) {
|
|
335
|
-
value = 0;
|
|
336
|
-
}
|
|
337
|
-
if (value !== undefined && value !== null) {
|
|
338
|
-
request.input(paramNameStr, value);
|
|
339
|
-
}
|
|
340
|
-
else {
|
|
341
|
-
request.input(paramNameStr, null);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
return [4 /*yield*/, request.query(modifiedQuery)];
|
|
345
|
-
case 3:
|
|
346
|
-
result = _b.sent();
|
|
347
|
-
if (operation === 'SELECT') {
|
|
348
|
-
return [2 /*return*/, result.recordset];
|
|
349
|
-
}
|
|
350
|
-
else {
|
|
351
|
-
return [2 /*return*/, { rowsAffected: result.rowsAffected[0] }];
|
|
352
|
-
}
|
|
353
|
-
_b.label = 4;
|
|
354
|
-
case 4: return [4 /*yield*/, connection.execute(sqlQuery, Object.values(args).filter(function (v) { return v !== undefined && v !== null; }))];
|
|
355
|
-
case 5:
|
|
356
|
-
rows = (_b.sent())[0];
|
|
357
|
-
if (operation === 'SELECT') {
|
|
358
|
-
return [2 /*return*/, rows];
|
|
359
|
-
}
|
|
360
|
-
else {
|
|
361
|
-
return [2 /*return*/, { rowsAffected: rows.affectedRows }];
|
|
362
|
-
}
|
|
363
|
-
_b.label = 6;
|
|
364
|
-
case 6:
|
|
365
|
-
values = Object.values(args).filter(function (v) { return v !== undefined && v !== null; });
|
|
366
|
-
return [4 /*yield*/, connection.query(sqlQuery, values)];
|
|
367
|
-
case 7:
|
|
368
|
-
pgResult = _b.sent();
|
|
369
|
-
if (operation === 'SELECT') {
|
|
370
|
-
return [2 /*return*/, pgResult.rows];
|
|
371
|
-
}
|
|
372
|
-
else {
|
|
373
|
-
return [2 /*return*/, { rowsAffected: pgResult.rowCount }];
|
|
374
|
-
}
|
|
375
|
-
_b.label = 8;
|
|
376
|
-
case 8: throw new Error("Unsupported database type: ".concat(type));
|
|
377
|
-
case 9: return [3 /*break*/, 11];
|
|
378
|
-
case 10:
|
|
379
|
-
error_4 = _b.sent();
|
|
380
|
-
console.error("\u274C Database query failed:", error_4);
|
|
381
|
-
throw error_4;
|
|
382
|
-
case 11: return [2 /*return*/];
|
|
383
|
-
}
|
|
384
|
-
});
|
|
385
|
-
});
|
|
386
|
-
};
|
|
387
|
-
DynamicMCPExecutor.prototype.getStats = function () {
|
|
388
|
-
return __assign(__assign({}, this.sqliteManager.getStats()), { activeConnections: this.dbConnections.size });
|
|
389
|
-
};
|
|
390
|
-
DynamicMCPExecutor.prototype.close = function () {
|
|
391
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
392
|
-
var _i, _a, _b, serverId, dbConnection, _c, error_5;
|
|
393
|
-
return __generator(this, function (_d) {
|
|
394
|
-
switch (_d.label) {
|
|
395
|
-
case 0:
|
|
396
|
-
_i = 0, _a = this.dbConnections.entries();
|
|
397
|
-
_d.label = 1;
|
|
398
|
-
case 1:
|
|
399
|
-
if (!(_i < _a.length)) return [3 /*break*/, 12];
|
|
400
|
-
_b = _a[_i], serverId = _b[0], dbConnection = _b[1];
|
|
401
|
-
_d.label = 2;
|
|
402
|
-
case 2:
|
|
403
|
-
_d.trys.push([2, 10, , 11]);
|
|
404
|
-
_c = dbConnection.type;
|
|
405
|
-
switch (_c) {
|
|
406
|
-
case 'mssql': return [3 /*break*/, 3];
|
|
407
|
-
case 'mysql': return [3 /*break*/, 5];
|
|
408
|
-
case 'postgresql': return [3 /*break*/, 7];
|
|
409
|
-
}
|
|
410
|
-
return [3 /*break*/, 9];
|
|
411
|
-
case 3: return [4 /*yield*/, dbConnection.connection.close()];
|
|
412
|
-
case 4:
|
|
413
|
-
_d.sent();
|
|
414
|
-
return [3 /*break*/, 9];
|
|
415
|
-
case 5: return [4 /*yield*/, dbConnection.connection.end()];
|
|
416
|
-
case 6:
|
|
417
|
-
_d.sent();
|
|
418
|
-
return [3 /*break*/, 9];
|
|
419
|
-
case 7: return [4 /*yield*/, dbConnection.connection.end()];
|
|
420
|
-
case 8:
|
|
421
|
-
_d.sent();
|
|
422
|
-
return [3 /*break*/, 9];
|
|
423
|
-
case 9:
|
|
424
|
-
console.error("\uD83D\uDD0C Closed database connection for server ".concat(serverId));
|
|
425
|
-
return [3 /*break*/, 11];
|
|
426
|
-
case 10:
|
|
427
|
-
error_5 = _d.sent();
|
|
428
|
-
console.error("\u274C Error closing connection for server ".concat(serverId, ":"), error_5);
|
|
429
|
-
return [3 /*break*/, 11];
|
|
430
|
-
case 11:
|
|
431
|
-
_i++;
|
|
432
|
-
return [3 /*break*/, 1];
|
|
433
|
-
case 12:
|
|
434
|
-
this.dbConnections.clear();
|
|
435
|
-
this.sqliteManager.close();
|
|
436
|
-
return [2 /*return*/];
|
|
437
|
-
}
|
|
438
|
-
});
|
|
439
|
-
});
|
|
440
|
-
};
|
|
441
|
-
return DynamicMCPExecutor;
|
|
442
|
-
}());
|
|
443
|
-
exports.DynamicMCPExecutor = DynamicMCPExecutor;
|