@xcr1234/dbhub-fork 1.1.0 → 1.3.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/README.md CHANGED
@@ -8,6 +8,7 @@ Add oracle support, example:
8
8
  [[sources]]
9
9
  id = "oracle_db"
10
10
  dsn = "oracle://SYSTEM:MyStrongPassword123@localhost:1521/FREEPDB1"
11
+ type = "oracle"
11
12
  ```
12
13
 
13
14
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  stripCommentsAndStrings
3
- } from "./chunk-C7WEAPX4.js";
3
+ } from "./chunk-OSGLPOZZ.js";
4
4
 
5
5
  // src/utils/sql-row-limiter.ts
6
6
  var SQLRowLimiter = class {
@@ -413,12 +413,16 @@ function scanTokenSQLite(sql, i) {
413
413
  function scanTokenSQLServer(sql, i) {
414
414
  return scanSingleLineComment(sql, i) ?? scanMultiLineComment(sql, i) ?? scanSingleQuotedString(sql, i) ?? scanDoubleQuotedString(sql, i) ?? scanBracketQuotedIdentifier(sql, i) ?? plainToken(i);
415
415
  }
416
+ function scanTokenOracle(sql, i) {
417
+ return scanSingleLineComment(sql, i) ?? scanMultiLineComment(sql, i) ?? scanSingleQuotedString(sql, i) ?? scanDoubleQuotedString(sql, i) ?? plainToken(i);
418
+ }
416
419
  var dialectScanners = {
417
420
  postgres: scanTokenPostgres,
418
421
  mysql: scanTokenMySQL,
419
422
  mariadb: scanTokenMySQL,
420
423
  sqlite: scanTokenSQLite,
421
- sqlserver: scanTokenSQLServer
424
+ sqlserver: scanTokenSQLServer,
425
+ oracle: scanTokenOracle
422
426
  };
423
427
  function getScanner(dialect) {
424
428
  return dialect ? dialectScanners[dialect] ?? scanTokenAnsi : scanTokenAnsi;
@@ -8,7 +8,7 @@ import {
8
8
  getDefaultPortForType,
9
9
  parseConnectionInfoFromDSN,
10
10
  stripCommentsAndStrings
11
- } from "./chunk-C7WEAPX4.js";
11
+ } from "./chunk-OSGLPOZZ.js";
12
12
 
13
13
  // src/tools/builtin-tools.ts
14
14
  var BUILTIN_TOOL_EXECUTE_SQL = "execute_sql";
@@ -1073,7 +1073,7 @@ function validateSourceConfig(source, configPath) {
1073
1073
  );
1074
1074
  }
1075
1075
  if (source.type) {
1076
- const validTypes = ["postgres", "mysql", "mariadb", "sqlserver", "sqlite"];
1076
+ const validTypes = ["postgres", "mysql", "mariadb", "sqlserver", "sqlite", "oracle"];
1077
1077
  if (!validTypes.includes(source.type)) {
1078
1078
  throw new Error(
1079
1079
  `Configuration file ${configPath}: source '${source.id}' has invalid type '${source.type}'. Valid types: ${validTypes.join(", ")}`
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  resolveSourceConfigs,
13
13
  resolveTomlConfigPath,
14
14
  resolveTransport
15
- } from "./chunk-YYDWHEUE.js";
15
+ } from "./chunk-SV472SM3.js";
16
16
  import {
17
17
  loadConnectors
18
18
  } from "./chunk-WVVMH6FJ.js";
@@ -26,7 +26,7 @@ import {
26
26
  parseConnectionInfoFromDSN,
27
27
  splitSQLStatements,
28
28
  stripCommentsAndStrings
29
- } from "./chunk-C7WEAPX4.js";
29
+ } from "./chunk-OSGLPOZZ.js";
30
30
 
31
31
  // src/server.ts
32
32
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -1428,7 +1428,7 @@ See documentation for more details on configuring database connections.
1428
1428
  const sources = sourceConfigsData.sources;
1429
1429
  console.error(`Configuration source: ${sourceConfigsData.source}`);
1430
1430
  await connectorManager.connectWithSources(sources);
1431
- const { initializeToolRegistry: initializeToolRegistry2 } = await import("./registry-H3S7N4PP.js");
1431
+ const { initializeToolRegistry: initializeToolRegistry2 } = await import("./registry-BYNIIISI.js");
1432
1432
  initializeToolRegistry2({
1433
1433
  sources: sourceConfigsData.sources,
1434
1434
  tools: sourceConfigsData.tools
@@ -1570,12 +1570,12 @@ See documentation for more details on configuring database connections.
1570
1570
 
1571
1571
  // src/index.ts
1572
1572
  var connectorModules = [
1573
- { load: () => import("./postgres-SN3BESYN.js"), name: "PostgreSQL", driver: "pg" },
1574
- { load: () => import("./sqlserver-YV3KVJ3B.js"), name: "SQL Server", driver: "mssql" },
1575
- { load: () => import("./sqlite-SJAXGYH3.js"), name: "SQLite", driver: "better-sqlite3" },
1576
- { load: () => import("./mysql-M4INQQ46.js"), name: "MySQL", driver: "mysql2" },
1577
- { load: () => import("./mariadb-4IBCPIEV.js"), name: "MariaDB", driver: "mariadb" },
1578
- { load: () => import("./oracle-N4YKSM4F.js"), name: "Oracle", driver: "oracle" }
1573
+ { load: () => import("./postgres-32KMZ7YK.js"), name: "PostgreSQL", driver: "pg" },
1574
+ { load: () => import("./sqlserver-KEBKTIC6.js"), name: "SQL Server", driver: "mssql" },
1575
+ { load: () => import("./sqlite-OABJLFKA.js"), name: "SQLite", driver: "better-sqlite3" },
1576
+ { load: () => import("./mysql-L2V52BZM.js"), name: "MySQL", driver: "mysql2" },
1577
+ { load: () => import("./mariadb-PUWTXMUM.js"), name: "MariaDB", driver: "mariadb" },
1578
+ { load: () => import("./oracle-LPUU7T2G.js"), name: "Oracle", driver: "oracle" }
1579
1579
  ];
1580
1580
  loadConnectors(connectorModules).then(() => main()).catch((error) => {
1581
1581
  console.error("Fatal error:", error);
@@ -7,13 +7,13 @@ import {
7
7
  } from "./chunk-JFWX35TB.js";
8
8
  import {
9
9
  SQLRowLimiter
10
- } from "./chunk-BRXZ5ZQB.js";
10
+ } from "./chunk-JBJZJE5J.js";
11
11
  import {
12
12
  ConnectorRegistry,
13
13
  SafeURL,
14
14
  obfuscateDSNPassword,
15
15
  splitSQLStatements
16
- } from "./chunk-C7WEAPX4.js";
16
+ } from "./chunk-OSGLPOZZ.js";
17
17
 
18
18
  // src/connectors/mariadb/index.ts
19
19
  import * as mariadb from "mariadb";
@@ -7,13 +7,13 @@ import {
7
7
  } from "./chunk-JFWX35TB.js";
8
8
  import {
9
9
  SQLRowLimiter
10
- } from "./chunk-BRXZ5ZQB.js";
10
+ } from "./chunk-JBJZJE5J.js";
11
11
  import {
12
12
  ConnectorRegistry,
13
13
  SafeURL,
14
14
  obfuscateDSNPassword,
15
15
  splitSQLStatements
16
- } from "./chunk-C7WEAPX4.js";
16
+ } from "./chunk-OSGLPOZZ.js";
17
17
 
18
18
  // src/connectors/mysql/index.ts
19
19
  import mysql from "mysql2/promise";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  SQLRowLimiter
3
- } from "./chunk-BRXZ5ZQB.js";
3
+ } from "./chunk-JBJZJE5J.js";
4
4
  import {
5
5
  ConnectorRegistry,
6
6
  SafeURL,
7
7
  obfuscateDSNPassword,
8
8
  splitSQLStatements
9
- } from "./chunk-C7WEAPX4.js";
9
+ } from "./chunk-OSGLPOZZ.js";
10
10
 
11
11
  // src/connectors/oracle/index.ts
12
12
  import oracledb from "oracledb";
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-JFWX35TB.js";
4
4
  import {
5
5
  SQLRowLimiter
6
- } from "./chunk-BRXZ5ZQB.js";
6
+ } from "./chunk-JBJZJE5J.js";
7
7
  import {
8
8
  ConnectorRegistry,
9
9
  SafeURL,
10
10
  obfuscateDSNPassword,
11
11
  splitSQLStatements
12
- } from "./chunk-C7WEAPX4.js";
12
+ } from "./chunk-OSGLPOZZ.js";
13
13
 
14
14
  // src/connectors/postgres/index.ts
15
15
  import fs from "fs";
@@ -2,9 +2,9 @@ import {
2
2
  ToolRegistry,
3
3
  getToolRegistry,
4
4
  initializeToolRegistry
5
- } from "./chunk-YYDWHEUE.js";
5
+ } from "./chunk-SV472SM3.js";
6
6
  import "./chunk-WVVMH6FJ.js";
7
- import "./chunk-C7WEAPX4.js";
7
+ import "./chunk-OSGLPOZZ.js";
8
8
  export {
9
9
  ToolRegistry,
10
10
  getToolRegistry,
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-JFWX35TB.js";
4
4
  import {
5
5
  SQLRowLimiter
6
- } from "./chunk-BRXZ5ZQB.js";
6
+ } from "./chunk-JBJZJE5J.js";
7
7
  import {
8
8
  ConnectorRegistry,
9
9
  SafeURL,
10
10
  obfuscateDSNPassword,
11
11
  splitSQLStatements
12
- } from "./chunk-C7WEAPX4.js";
12
+ } from "./chunk-OSGLPOZZ.js";
13
13
 
14
14
  // src/connectors/sqlite/index.ts
15
15
  import fs from "fs/promises";
@@ -3,12 +3,12 @@ import {
3
3
  } from "./chunk-WVVMH6FJ.js";
4
4
  import {
5
5
  SQLRowLimiter
6
- } from "./chunk-BRXZ5ZQB.js";
6
+ } from "./chunk-JBJZJE5J.js";
7
7
  import {
8
8
  ConnectorRegistry,
9
9
  SafeURL,
10
10
  obfuscateDSNPassword
11
- } from "./chunk-C7WEAPX4.js";
11
+ } from "./chunk-OSGLPOZZ.js";
12
12
 
13
13
  // src/connectors/sqlserver/index.ts
14
14
  import sql from "mssql";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xcr1234/dbhub-fork",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "mcpName": "io.github.xcr1234/dbhub",
5
5
  "description": "Minimal, token-efficient Database MCP Server for PostgreSQL, MySQL, SQL Server, SQLite, MariaDB",
6
6
  "repository": {