@softtechai/quickmcp 1.0.16 → 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 +176 -187
- 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,637 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
45
|
-
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);
|
|
46
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
47
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
48
|
-
function step(op) {
|
|
49
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
50
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
51
|
-
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;
|
|
52
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
53
|
-
switch (op[0]) {
|
|
54
|
-
case 0: case 1: t = op; break;
|
|
55
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
56
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
57
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
58
|
-
default:
|
|
59
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
60
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
61
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
62
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
63
|
-
if (t[2]) _.ops.pop();
|
|
64
|
-
_.trys.pop(); continue;
|
|
65
|
-
}
|
|
66
|
-
op = body.call(thisArg, _);
|
|
67
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
68
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
72
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
73
|
-
};
|
|
74
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
75
|
-
exports.DatabaseParser = void 0;
|
|
76
|
-
var promise_1 = __importDefault(require("mysql2/promise"));
|
|
77
|
-
var pg_1 = require("pg");
|
|
78
|
-
var sqlite3_1 = __importDefault(require("sqlite3"));
|
|
79
|
-
var sql = __importStar(require("mssql"));
|
|
80
|
-
var DatabaseParser = /** @class */ (function () {
|
|
81
|
-
function DatabaseParser() {
|
|
82
|
-
}
|
|
83
|
-
DatabaseParser.prototype.parse = function (connection, tableName) {
|
|
84
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
85
|
-
return __generator(this, function (_a) {
|
|
86
|
-
switch (connection.type) {
|
|
87
|
-
case 'mysql':
|
|
88
|
-
return [2 /*return*/, this.parseMySql(connection, tableName)];
|
|
89
|
-
case 'postgresql':
|
|
90
|
-
return [2 /*return*/, this.parsePostgreSql(connection, tableName)];
|
|
91
|
-
case 'sqlite':
|
|
92
|
-
return [2 /*return*/, this.parseSqlite(connection, tableName)];
|
|
93
|
-
case 'mssql':
|
|
94
|
-
return [2 /*return*/, this.parseMsSql(connection, tableName)];
|
|
95
|
-
default:
|
|
96
|
-
throw new Error("Unsupported database type: ".concat(connection.type));
|
|
97
|
-
}
|
|
98
|
-
return [2 /*return*/];
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
DatabaseParser.prototype.getTables = function (connection) {
|
|
103
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
104
|
-
return __generator(this, function (_a) {
|
|
105
|
-
switch (connection.type) {
|
|
106
|
-
case 'mysql':
|
|
107
|
-
return [2 /*return*/, this.getMySqlTables(connection)];
|
|
108
|
-
case 'postgresql':
|
|
109
|
-
return [2 /*return*/, this.getPostgreSqlTables(connection)];
|
|
110
|
-
case 'sqlite':
|
|
111
|
-
return [2 /*return*/, this.getSqliteTables(connection)];
|
|
112
|
-
case 'mssql':
|
|
113
|
-
return [2 /*return*/, this.getMsSqlTables(connection)];
|
|
114
|
-
default:
|
|
115
|
-
throw new Error("Unsupported database type: ".concat(connection.type));
|
|
116
|
-
}
|
|
117
|
-
return [2 /*return*/];
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
DatabaseParser.prototype.parseMySql = function (connection, tableName) {
|
|
122
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
123
|
-
var conn, tables, _a, results, _loop_1, _i, tables_1, table;
|
|
124
|
-
var _this = this;
|
|
125
|
-
return __generator(this, function (_b) {
|
|
126
|
-
switch (_b.label) {
|
|
127
|
-
case 0: return [4 /*yield*/, promise_1.default.createConnection({
|
|
128
|
-
host: connection.host,
|
|
129
|
-
port: connection.port,
|
|
130
|
-
user: connection.username,
|
|
131
|
-
password: connection.password,
|
|
132
|
-
database: connection.database
|
|
133
|
-
})];
|
|
134
|
-
case 1:
|
|
135
|
-
conn = _b.sent();
|
|
136
|
-
_b.label = 2;
|
|
137
|
-
case 2:
|
|
138
|
-
_b.trys.push([2, , 10, 12]);
|
|
139
|
-
if (!tableName) return [3 /*break*/, 3];
|
|
140
|
-
_a = [tableName];
|
|
141
|
-
return [3 /*break*/, 5];
|
|
142
|
-
case 3: return [4 /*yield*/, this.getMySqlTables(connection)];
|
|
143
|
-
case 4:
|
|
144
|
-
_a = _b.sent();
|
|
145
|
-
_b.label = 5;
|
|
146
|
-
case 5:
|
|
147
|
-
tables = _a;
|
|
148
|
-
results = [];
|
|
149
|
-
_loop_1 = function (table) {
|
|
150
|
-
var rows, columns, headers, dataTypes, rowsArray;
|
|
151
|
-
return __generator(this, function (_c) {
|
|
152
|
-
switch (_c.label) {
|
|
153
|
-
case 0: return [4 /*yield*/, conn.execute("SELECT * FROM `".concat(table, "` LIMIT 1000"))];
|
|
154
|
-
case 1:
|
|
155
|
-
rows = (_c.sent())[0];
|
|
156
|
-
return [4 /*yield*/, conn.execute("SELECT COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ?", [connection.database, table])];
|
|
157
|
-
case 2:
|
|
158
|
-
columns = (_c.sent())[0];
|
|
159
|
-
headers = columns.map(function (col) { return col.COLUMN_NAME; });
|
|
160
|
-
dataTypes = {};
|
|
161
|
-
columns.forEach(function (col) {
|
|
162
|
-
dataTypes[col.COLUMN_NAME] = _this.mapMySqlType(col.DATA_TYPE);
|
|
163
|
-
});
|
|
164
|
-
rowsArray = rows.map(function (row) { return headers.map(function (header) { return row[header]; }); });
|
|
165
|
-
results.push({
|
|
166
|
-
tableName: table,
|
|
167
|
-
headers: headers,
|
|
168
|
-
rows: rowsArray,
|
|
169
|
-
metadata: {
|
|
170
|
-
rowCount: rowsArray.length,
|
|
171
|
-
columnCount: headers.length,
|
|
172
|
-
dataTypes: dataTypes
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
return [2 /*return*/];
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
};
|
|
179
|
-
_i = 0, tables_1 = tables;
|
|
180
|
-
_b.label = 6;
|
|
181
|
-
case 6:
|
|
182
|
-
if (!(_i < tables_1.length)) return [3 /*break*/, 9];
|
|
183
|
-
table = tables_1[_i];
|
|
184
|
-
return [5 /*yield**/, _loop_1(table)];
|
|
185
|
-
case 7:
|
|
186
|
-
_b.sent();
|
|
187
|
-
_b.label = 8;
|
|
188
|
-
case 8:
|
|
189
|
-
_i++;
|
|
190
|
-
return [3 /*break*/, 6];
|
|
191
|
-
case 9: return [2 /*return*/, results];
|
|
192
|
-
case 10: return [4 /*yield*/, conn.end()];
|
|
193
|
-
case 11:
|
|
194
|
-
_b.sent();
|
|
195
|
-
return [7 /*endfinally*/];
|
|
196
|
-
case 12: return [2 /*return*/];
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
});
|
|
200
|
-
};
|
|
201
|
-
DatabaseParser.prototype.parsePostgreSql = function (connection, tableName) {
|
|
202
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
203
|
-
var client, tables, _a, results, _loop_2, _i, tables_2, table;
|
|
204
|
-
var _this = this;
|
|
205
|
-
return __generator(this, function (_b) {
|
|
206
|
-
switch (_b.label) {
|
|
207
|
-
case 0:
|
|
208
|
-
client = new pg_1.Client({
|
|
209
|
-
host: connection.host,
|
|
210
|
-
port: connection.port,
|
|
211
|
-
user: connection.username,
|
|
212
|
-
password: connection.password,
|
|
213
|
-
database: connection.database
|
|
214
|
-
});
|
|
215
|
-
return [4 /*yield*/, client.connect()];
|
|
216
|
-
case 1:
|
|
217
|
-
_b.sent();
|
|
218
|
-
_b.label = 2;
|
|
219
|
-
case 2:
|
|
220
|
-
_b.trys.push([2, , 10, 12]);
|
|
221
|
-
if (!tableName) return [3 /*break*/, 3];
|
|
222
|
-
_a = [tableName];
|
|
223
|
-
return [3 /*break*/, 5];
|
|
224
|
-
case 3: return [4 /*yield*/, this.getPostgreSqlTables(connection)];
|
|
225
|
-
case 4:
|
|
226
|
-
_a = _b.sent();
|
|
227
|
-
_b.label = 5;
|
|
228
|
-
case 5:
|
|
229
|
-
tables = _a;
|
|
230
|
-
results = [];
|
|
231
|
-
_loop_2 = function (table) {
|
|
232
|
-
var dataResult, columnsResult, headers, dataTypes, rowsArray;
|
|
233
|
-
return __generator(this, function (_c) {
|
|
234
|
-
switch (_c.label) {
|
|
235
|
-
case 0: return [4 /*yield*/, client.query("SELECT * FROM \"".concat(table, "\" LIMIT 1000"))];
|
|
236
|
-
case 1:
|
|
237
|
-
dataResult = _c.sent();
|
|
238
|
-
return [4 /*yield*/, client.query("SELECT column_name, data_type FROM information_schema.columns WHERE table_name = $1", [table])];
|
|
239
|
-
case 2:
|
|
240
|
-
columnsResult = _c.sent();
|
|
241
|
-
headers = columnsResult.rows.map(function (col) { return col.column_name; });
|
|
242
|
-
dataTypes = {};
|
|
243
|
-
columnsResult.rows.forEach(function (col) {
|
|
244
|
-
dataTypes[col.column_name] = _this.mapPostgreSqlType(col.data_type);
|
|
245
|
-
});
|
|
246
|
-
rowsArray = dataResult.rows.map(function (row) { return headers.map(function (header) { return row[header]; }); });
|
|
247
|
-
results.push({
|
|
248
|
-
tableName: table,
|
|
249
|
-
headers: headers,
|
|
250
|
-
rows: rowsArray,
|
|
251
|
-
metadata: {
|
|
252
|
-
rowCount: rowsArray.length,
|
|
253
|
-
columnCount: headers.length,
|
|
254
|
-
dataTypes: dataTypes
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
return [2 /*return*/];
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
};
|
|
261
|
-
_i = 0, tables_2 = tables;
|
|
262
|
-
_b.label = 6;
|
|
263
|
-
case 6:
|
|
264
|
-
if (!(_i < tables_2.length)) return [3 /*break*/, 9];
|
|
265
|
-
table = tables_2[_i];
|
|
266
|
-
return [5 /*yield**/, _loop_2(table)];
|
|
267
|
-
case 7:
|
|
268
|
-
_b.sent();
|
|
269
|
-
_b.label = 8;
|
|
270
|
-
case 8:
|
|
271
|
-
_i++;
|
|
272
|
-
return [3 /*break*/, 6];
|
|
273
|
-
case 9: return [2 /*return*/, results];
|
|
274
|
-
case 10: return [4 /*yield*/, client.end()];
|
|
275
|
-
case 11:
|
|
276
|
-
_b.sent();
|
|
277
|
-
return [7 /*endfinally*/];
|
|
278
|
-
case 12: return [2 /*return*/];
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
});
|
|
282
|
-
};
|
|
283
|
-
DatabaseParser.prototype.parseSqlite = function (connection, tableName) {
|
|
284
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
285
|
-
var _this = this;
|
|
286
|
-
return __generator(this, function (_a) {
|
|
287
|
-
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
288
|
-
var db = new sqlite3_1.default.Database(connection.database);
|
|
289
|
-
db.serialize(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
290
|
-
var tables, _a, results, _loop_3, _i, tables_3, table, error_1;
|
|
291
|
-
var _this = this;
|
|
292
|
-
return __generator(this, function (_b) {
|
|
293
|
-
switch (_b.label) {
|
|
294
|
-
case 0:
|
|
295
|
-
_b.trys.push([0, 8, , 9]);
|
|
296
|
-
if (!tableName) return [3 /*break*/, 1];
|
|
297
|
-
_a = [tableName];
|
|
298
|
-
return [3 /*break*/, 3];
|
|
299
|
-
case 1: return [4 /*yield*/, this.getSqliteTables(connection)];
|
|
300
|
-
case 2:
|
|
301
|
-
_a = _b.sent();
|
|
302
|
-
_b.label = 3;
|
|
303
|
-
case 3:
|
|
304
|
-
tables = _a;
|
|
305
|
-
results = [];
|
|
306
|
-
_loop_3 = function (table) {
|
|
307
|
-
var rows, columns, headers_1, dataTypes_1, rowsArray;
|
|
308
|
-
return __generator(this, function (_c) {
|
|
309
|
-
switch (_c.label) {
|
|
310
|
-
case 0: return [4 /*yield*/, new Promise(function (res, rej) {
|
|
311
|
-
db.all("SELECT * FROM \"".concat(table, "\" LIMIT 1000"), function (err, rows) {
|
|
312
|
-
if (err)
|
|
313
|
-
rej(err);
|
|
314
|
-
else
|
|
315
|
-
res(rows);
|
|
316
|
-
});
|
|
317
|
-
})];
|
|
318
|
-
case 1:
|
|
319
|
-
rows = _c.sent();
|
|
320
|
-
return [4 /*yield*/, new Promise(function (res, rej) {
|
|
321
|
-
db.all("PRAGMA table_info(\"".concat(table, "\")"), function (err, cols) {
|
|
322
|
-
if (err)
|
|
323
|
-
rej(err);
|
|
324
|
-
else
|
|
325
|
-
res(cols);
|
|
326
|
-
});
|
|
327
|
-
})];
|
|
328
|
-
case 2:
|
|
329
|
-
columns = _c.sent();
|
|
330
|
-
if (rows.length > 0) {
|
|
331
|
-
headers_1 = Object.keys(rows[0]);
|
|
332
|
-
dataTypes_1 = {};
|
|
333
|
-
columns.forEach(function (col) {
|
|
334
|
-
dataTypes_1[col.name] = _this.mapSqliteType(col.type);
|
|
335
|
-
});
|
|
336
|
-
rowsArray = rows.map(function (row) { return headers_1.map(function (header) { return row[header]; }); });
|
|
337
|
-
results.push({
|
|
338
|
-
tableName: table,
|
|
339
|
-
headers: headers_1,
|
|
340
|
-
rows: rowsArray,
|
|
341
|
-
metadata: {
|
|
342
|
-
rowCount: rowsArray.length,
|
|
343
|
-
columnCount: headers_1.length,
|
|
344
|
-
dataTypes: dataTypes_1
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
return [2 /*return*/];
|
|
349
|
-
}
|
|
350
|
-
});
|
|
351
|
-
};
|
|
352
|
-
_i = 0, tables_3 = tables;
|
|
353
|
-
_b.label = 4;
|
|
354
|
-
case 4:
|
|
355
|
-
if (!(_i < tables_3.length)) return [3 /*break*/, 7];
|
|
356
|
-
table = tables_3[_i];
|
|
357
|
-
return [5 /*yield**/, _loop_3(table)];
|
|
358
|
-
case 5:
|
|
359
|
-
_b.sent();
|
|
360
|
-
_b.label = 6;
|
|
361
|
-
case 6:
|
|
362
|
-
_i++;
|
|
363
|
-
return [3 /*break*/, 4];
|
|
364
|
-
case 7:
|
|
365
|
-
resolve(results);
|
|
366
|
-
return [3 /*break*/, 9];
|
|
367
|
-
case 8:
|
|
368
|
-
error_1 = _b.sent();
|
|
369
|
-
reject(error_1);
|
|
370
|
-
return [3 /*break*/, 9];
|
|
371
|
-
case 9: return [2 /*return*/];
|
|
372
|
-
}
|
|
373
|
-
});
|
|
374
|
-
}); });
|
|
375
|
-
db.close();
|
|
376
|
-
})];
|
|
377
|
-
});
|
|
378
|
-
});
|
|
379
|
-
};
|
|
380
|
-
DatabaseParser.prototype.getMySqlTables = function (connection) {
|
|
381
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
382
|
-
var conn, rows;
|
|
383
|
-
return __generator(this, function (_a) {
|
|
384
|
-
switch (_a.label) {
|
|
385
|
-
case 0: return [4 /*yield*/, promise_1.default.createConnection({
|
|
386
|
-
host: connection.host,
|
|
387
|
-
port: connection.port,
|
|
388
|
-
user: connection.username,
|
|
389
|
-
password: connection.password,
|
|
390
|
-
database: connection.database
|
|
391
|
-
})];
|
|
392
|
-
case 1:
|
|
393
|
-
conn = _a.sent();
|
|
394
|
-
_a.label = 2;
|
|
395
|
-
case 2:
|
|
396
|
-
_a.trys.push([2, , 4, 6]);
|
|
397
|
-
return [4 /*yield*/, conn.execute('SHOW TABLES')];
|
|
398
|
-
case 3:
|
|
399
|
-
rows = (_a.sent())[0];
|
|
400
|
-
return [2 /*return*/, rows.map(function (row) { return Object.values(row)[0]; })];
|
|
401
|
-
case 4: return [4 /*yield*/, conn.end()];
|
|
402
|
-
case 5:
|
|
403
|
-
_a.sent();
|
|
404
|
-
return [7 /*endfinally*/];
|
|
405
|
-
case 6: return [2 /*return*/];
|
|
406
|
-
}
|
|
407
|
-
});
|
|
408
|
-
});
|
|
409
|
-
};
|
|
410
|
-
DatabaseParser.prototype.getPostgreSqlTables = function (connection) {
|
|
411
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
412
|
-
var client, result;
|
|
413
|
-
return __generator(this, function (_a) {
|
|
414
|
-
switch (_a.label) {
|
|
415
|
-
case 0:
|
|
416
|
-
client = new pg_1.Client({
|
|
417
|
-
host: connection.host,
|
|
418
|
-
port: connection.port,
|
|
419
|
-
user: connection.username,
|
|
420
|
-
password: connection.password,
|
|
421
|
-
database: connection.database
|
|
422
|
-
});
|
|
423
|
-
return [4 /*yield*/, client.connect()];
|
|
424
|
-
case 1:
|
|
425
|
-
_a.sent();
|
|
426
|
-
_a.label = 2;
|
|
427
|
-
case 2:
|
|
428
|
-
_a.trys.push([2, , 4, 6]);
|
|
429
|
-
return [4 /*yield*/, client.query("SELECT tablename FROM pg_catalog.pg_tables WHERE schemaname = 'public'")];
|
|
430
|
-
case 3:
|
|
431
|
-
result = _a.sent();
|
|
432
|
-
return [2 /*return*/, result.rows.map(function (row) { return row.tablename; })];
|
|
433
|
-
case 4: return [4 /*yield*/, client.end()];
|
|
434
|
-
case 5:
|
|
435
|
-
_a.sent();
|
|
436
|
-
return [7 /*endfinally*/];
|
|
437
|
-
case 6: return [2 /*return*/];
|
|
438
|
-
}
|
|
439
|
-
});
|
|
440
|
-
});
|
|
441
|
-
};
|
|
442
|
-
DatabaseParser.prototype.getSqliteTables = function (connection) {
|
|
443
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
444
|
-
return __generator(this, function (_a) {
|
|
445
|
-
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
446
|
-
var db = new sqlite3_1.default.Database(connection.database);
|
|
447
|
-
db.all("SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'", function (err, rows) {
|
|
448
|
-
if (err) {
|
|
449
|
-
reject(err);
|
|
450
|
-
}
|
|
451
|
-
else {
|
|
452
|
-
resolve(rows.map(function (row) { return row.name; }));
|
|
453
|
-
}
|
|
454
|
-
});
|
|
455
|
-
db.close();
|
|
456
|
-
})];
|
|
457
|
-
});
|
|
458
|
-
});
|
|
459
|
-
};
|
|
460
|
-
DatabaseParser.prototype.mapMySqlType = function (type) {
|
|
461
|
-
var lowerType = type.toLowerCase();
|
|
462
|
-
if (lowerType.includes('int') || lowerType.includes('bigint'))
|
|
463
|
-
return 'integer';
|
|
464
|
-
if (lowerType.includes('decimal') || lowerType.includes('float') || lowerType.includes('double'))
|
|
465
|
-
return 'number';
|
|
466
|
-
if (lowerType.includes('bool') || lowerType.includes('tinyint(1)'))
|
|
467
|
-
return 'boolean';
|
|
468
|
-
if (lowerType.includes('date') || lowerType.includes('time'))
|
|
469
|
-
return 'date';
|
|
470
|
-
return 'string';
|
|
471
|
-
};
|
|
472
|
-
DatabaseParser.prototype.mapPostgreSqlType = function (type) {
|
|
473
|
-
var lowerType = type.toLowerCase();
|
|
474
|
-
if (lowerType.includes('int') || lowerType === 'bigint' || lowerType === 'smallint')
|
|
475
|
-
return 'integer';
|
|
476
|
-
if (lowerType.includes('numeric') || lowerType.includes('decimal') || lowerType === 'real' || lowerType === 'double precision')
|
|
477
|
-
return 'number';
|
|
478
|
-
if (lowerType === 'boolean')
|
|
479
|
-
return 'boolean';
|
|
480
|
-
if (lowerType.includes('timestamp') || lowerType === 'date' || lowerType === 'time')
|
|
481
|
-
return 'date';
|
|
482
|
-
return 'string';
|
|
483
|
-
};
|
|
484
|
-
DatabaseParser.prototype.mapSqliteType = function (type) {
|
|
485
|
-
var lowerType = type.toLowerCase();
|
|
486
|
-
if (lowerType === 'integer')
|
|
487
|
-
return 'integer';
|
|
488
|
-
if (lowerType === 'real' || lowerType === 'numeric')
|
|
489
|
-
return 'number';
|
|
490
|
-
if (lowerType === 'boolean')
|
|
491
|
-
return 'boolean';
|
|
492
|
-
if (lowerType === 'date' || lowerType === 'datetime')
|
|
493
|
-
return 'date';
|
|
494
|
-
return 'string';
|
|
495
|
-
};
|
|
496
|
-
DatabaseParser.prototype.parseMsSql = function (connection, tableName) {
|
|
497
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
498
|
-
var config, tables, _a, results, _loop_4, _i, tables_4, table, error_2;
|
|
499
|
-
var _this = this;
|
|
500
|
-
return __generator(this, function (_b) {
|
|
501
|
-
switch (_b.label) {
|
|
502
|
-
case 0:
|
|
503
|
-
config = {
|
|
504
|
-
server: connection.host,
|
|
505
|
-
port: connection.port || 1433,
|
|
506
|
-
user: connection.username,
|
|
507
|
-
password: connection.password,
|
|
508
|
-
database: connection.database,
|
|
509
|
-
options: {
|
|
510
|
-
encrypt: true,
|
|
511
|
-
trustServerCertificate: true
|
|
512
|
-
}
|
|
513
|
-
};
|
|
514
|
-
_b.label = 1;
|
|
515
|
-
case 1:
|
|
516
|
-
_b.trys.push([1, 10, , 11]);
|
|
517
|
-
return [4 /*yield*/, sql.connect(config)];
|
|
518
|
-
case 2:
|
|
519
|
-
_b.sent();
|
|
520
|
-
if (!tableName) return [3 /*break*/, 3];
|
|
521
|
-
_a = [tableName];
|
|
522
|
-
return [3 /*break*/, 5];
|
|
523
|
-
case 3: return [4 /*yield*/, this.getMsSqlTables(connection)];
|
|
524
|
-
case 4:
|
|
525
|
-
_a = _b.sent();
|
|
526
|
-
_b.label = 5;
|
|
527
|
-
case 5:
|
|
528
|
-
tables = _a;
|
|
529
|
-
results = [];
|
|
530
|
-
_loop_4 = function (table) {
|
|
531
|
-
var request, dataResult, columnsResult, headers, dataTypes, rowsArray;
|
|
532
|
-
return __generator(this, function (_c) {
|
|
533
|
-
switch (_c.label) {
|
|
534
|
-
case 0:
|
|
535
|
-
request = new sql.Request();
|
|
536
|
-
return [4 /*yield*/, request.query("SELECT TOP 1000 * FROM [".concat(table, "]"))];
|
|
537
|
-
case 1:
|
|
538
|
-
dataResult = _c.sent();
|
|
539
|
-
return [4 /*yield*/, request.query("\n SELECT COLUMN_NAME, DATA_TYPE\n FROM INFORMATION_SCHEMA.COLUMNS\n WHERE TABLE_NAME = '".concat(table, "'\n "))];
|
|
540
|
-
case 2:
|
|
541
|
-
columnsResult = _c.sent();
|
|
542
|
-
headers = columnsResult.recordset.map(function (col) { return col.COLUMN_NAME; });
|
|
543
|
-
dataTypes = {};
|
|
544
|
-
columnsResult.recordset.forEach(function (col) {
|
|
545
|
-
dataTypes[col.COLUMN_NAME] = _this.mapMsSqlType(col.DATA_TYPE);
|
|
546
|
-
});
|
|
547
|
-
rowsArray = dataResult.recordset.map(function (row) {
|
|
548
|
-
return headers.map(function (header) { return row[header]; });
|
|
549
|
-
});
|
|
550
|
-
results.push({
|
|
551
|
-
tableName: table,
|
|
552
|
-
headers: headers,
|
|
553
|
-
rows: rowsArray,
|
|
554
|
-
metadata: {
|
|
555
|
-
rowCount: rowsArray.length,
|
|
556
|
-
columnCount: headers.length,
|
|
557
|
-
dataTypes: dataTypes
|
|
558
|
-
}
|
|
559
|
-
});
|
|
560
|
-
return [2 /*return*/];
|
|
561
|
-
}
|
|
562
|
-
});
|
|
563
|
-
};
|
|
564
|
-
_i = 0, tables_4 = tables;
|
|
565
|
-
_b.label = 6;
|
|
566
|
-
case 6:
|
|
567
|
-
if (!(_i < tables_4.length)) return [3 /*break*/, 9];
|
|
568
|
-
table = tables_4[_i];
|
|
569
|
-
return [5 /*yield**/, _loop_4(table)];
|
|
570
|
-
case 7:
|
|
571
|
-
_b.sent();
|
|
572
|
-
_b.label = 8;
|
|
573
|
-
case 8:
|
|
574
|
-
_i++;
|
|
575
|
-
return [3 /*break*/, 6];
|
|
576
|
-
case 9: return [2 /*return*/, results];
|
|
577
|
-
case 10:
|
|
578
|
-
error_2 = _b.sent();
|
|
579
|
-
throw error_2;
|
|
580
|
-
case 11: return [2 /*return*/];
|
|
581
|
-
}
|
|
582
|
-
});
|
|
583
|
-
});
|
|
584
|
-
};
|
|
585
|
-
DatabaseParser.prototype.getMsSqlTables = function (connection) {
|
|
586
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
587
|
-
var config, request, result, error_3;
|
|
588
|
-
return __generator(this, function (_a) {
|
|
589
|
-
switch (_a.label) {
|
|
590
|
-
case 0:
|
|
591
|
-
config = {
|
|
592
|
-
server: connection.host,
|
|
593
|
-
port: connection.port || 1433,
|
|
594
|
-
user: connection.username,
|
|
595
|
-
password: connection.password,
|
|
596
|
-
database: connection.database,
|
|
597
|
-
options: {
|
|
598
|
-
encrypt: true,
|
|
599
|
-
trustServerCertificate: true
|
|
600
|
-
}
|
|
601
|
-
};
|
|
602
|
-
_a.label = 1;
|
|
603
|
-
case 1:
|
|
604
|
-
_a.trys.push([1, 4, , 5]);
|
|
605
|
-
return [4 /*yield*/, sql.connect(config)];
|
|
606
|
-
case 2:
|
|
607
|
-
_a.sent();
|
|
608
|
-
request = new sql.Request();
|
|
609
|
-
return [4 /*yield*/, request.query("\n SELECT TABLE_NAME\n FROM INFORMATION_SCHEMA.TABLES\n WHERE TABLE_TYPE = 'BASE TABLE'\n ")];
|
|
610
|
-
case 3:
|
|
611
|
-
result = _a.sent();
|
|
612
|
-
return [2 /*return*/, result.recordset.map(function (row) { return row.TABLE_NAME; })];
|
|
613
|
-
case 4:
|
|
614
|
-
error_3 = _a.sent();
|
|
615
|
-
throw error_3;
|
|
616
|
-
case 5: return [2 /*return*/];
|
|
617
|
-
}
|
|
618
|
-
});
|
|
619
|
-
});
|
|
620
|
-
};
|
|
621
|
-
DatabaseParser.prototype.mapMsSqlType = function (type) {
|
|
622
|
-
var lowerType = type.toLowerCase();
|
|
623
|
-
if (lowerType.includes('int') || lowerType === 'bigint' || lowerType === 'smallint' || lowerType === 'tinyint')
|
|
624
|
-
return 'integer';
|
|
625
|
-
if (lowerType.includes('decimal') || lowerType.includes('numeric') || lowerType === 'float' || lowerType === 'real' || lowerType === 'money')
|
|
626
|
-
return 'number';
|
|
627
|
-
if (lowerType === 'bit')
|
|
628
|
-
return 'boolean';
|
|
629
|
-
if (lowerType.includes('date') || lowerType.includes('time'))
|
|
630
|
-
return 'date';
|
|
631
|
-
if (lowerType === 'uniqueidentifier')
|
|
632
|
-
return 'string';
|
|
633
|
-
return 'string';
|
|
634
|
-
};
|
|
635
|
-
return DatabaseParser;
|
|
636
|
-
}());
|
|
637
|
-
exports.DatabaseParser = DatabaseParser;
|