@zz1996/dbhub-dameng 1.2.5-dameng.621 → 1.2.5-dameng.624
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/{chunk-3RJRH3CN.js → chunk-JDFXWHHT.js} +5 -1
- package/dist/{chunk-4276LPPU.js → chunk-KYBFNQQ4.js} +1 -1
- package/dist/{chunk-HGU7ILEZ.js → chunk-RRLCKPSL.js} +4 -11
- package/dist/index.js +8 -8
- package/dist/{mariadb-MMC6WMEG.js → mariadb-Y6H4TOLN.js} +2 -2
- package/dist/{mysql-TESH7KKV.js → mysql-GHTT5NG3.js} +2 -2
- package/dist/{postgres-C24SBQ4I.js → postgres-UAK5DSEM.js} +1 -1
- package/dist/{registry-WVSFVS35.js → registry-U6JUB444.js} +2 -2
- package/dist/{sqlite-7BNGDMBZ.js → sqlite-J42ZHIO4.js} +1 -1
- package/dist/{sqlserver-KZPPK67Q.js → sqlserver-LNPATTNS.js} +1 -1
- package/package.json +1 -1
|
@@ -45,6 +45,7 @@ function parseConnectionInfoFromDSN(dsn) {
|
|
|
45
45
|
return null;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
+
var REDACTED_DSN = "<redacted DSN>";
|
|
48
49
|
function obfuscateDSNPassword(dsn) {
|
|
49
50
|
if (!dsn) {
|
|
50
51
|
return dsn;
|
|
@@ -55,6 +56,9 @@ function obfuscateDSNPassword(dsn) {
|
|
|
55
56
|
return dsn;
|
|
56
57
|
}
|
|
57
58
|
const url = new SafeURL(dsn);
|
|
59
|
+
if (url.port && !/^\d+$/.test(url.port)) {
|
|
60
|
+
return REDACTED_DSN;
|
|
61
|
+
}
|
|
58
62
|
if (!url.password) {
|
|
59
63
|
return dsn;
|
|
60
64
|
}
|
|
@@ -79,7 +83,7 @@ function obfuscateDSNPassword(dsn) {
|
|
|
79
83
|
}
|
|
80
84
|
return result;
|
|
81
85
|
} catch {
|
|
82
|
-
return
|
|
86
|
+
return REDACTED_DSN;
|
|
83
87
|
}
|
|
84
88
|
}
|
|
85
89
|
function getDatabaseTypeFromDSN(dsn) {
|
|
@@ -4,8 +4,9 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getDatabaseTypeFromDSN,
|
|
6
6
|
getDefaultPortForType,
|
|
7
|
+
obfuscateDSNPassword,
|
|
7
8
|
parseConnectionInfoFromDSN
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JDFXWHHT.js";
|
|
9
10
|
import {
|
|
10
11
|
ConnectorRegistry,
|
|
11
12
|
SafeURL,
|
|
@@ -826,15 +827,7 @@ function splitTokenList(value) {
|
|
|
826
827
|
return value.split(",").map((t) => t.trim()).filter((t) => t.length > 0);
|
|
827
828
|
}
|
|
828
829
|
function redactDSN(dsn) {
|
|
829
|
-
|
|
830
|
-
const url = new URL(dsn);
|
|
831
|
-
if (url.password) {
|
|
832
|
-
url.password = "*******";
|
|
833
|
-
}
|
|
834
|
-
return url.toString();
|
|
835
|
-
} catch (error) {
|
|
836
|
-
return dsn.replace(/\/\/([^:]+):([^@]+)@/, "//$1:***@");
|
|
837
|
-
}
|
|
830
|
+
return obfuscateDSNPassword(dsn);
|
|
838
831
|
}
|
|
839
832
|
function resolveId() {
|
|
840
833
|
const args = parseCommandLineArgs();
|
|
@@ -981,7 +974,7 @@ async function resolveSourceConfigs() {
|
|
|
981
974
|
dsnUrl = new SafeURL(dsnResult.dsn);
|
|
982
975
|
} catch (error) {
|
|
983
976
|
throw new Error(
|
|
984
|
-
`Invalid DSN format: ${dsnResult.dsn}. Expected format: protocol://[user[:password]@]host[:port]/database`
|
|
977
|
+
`Invalid DSN format: ${redactDSN(dsnResult.dsn)}. Expected format: protocol://[user[:password]@]host[:port]/database`
|
|
985
978
|
);
|
|
986
979
|
}
|
|
987
980
|
const protocol = dsnUrl.protocol.replace(":", "");
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
resolveSourceConfigs,
|
|
19
19
|
resolveTomlConfigPath,
|
|
20
20
|
resolveTransport
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-RRLCKPSL.js";
|
|
22
22
|
import {
|
|
23
23
|
loadConnectors
|
|
24
24
|
} from "./chunk-WVVMH6FJ.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
getDatabaseTypeFromDSN,
|
|
30
30
|
getDefaultPortForType,
|
|
31
31
|
parseConnectionInfoFromDSN
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-JDFXWHHT.js";
|
|
33
33
|
import {
|
|
34
34
|
allowedKeywords,
|
|
35
35
|
getFirstKeyword,
|
|
@@ -1915,7 +1915,7 @@ See documentation for more details on configuring database connections.
|
|
|
1915
1915
|
const sources = sourceConfigsData.sources;
|
|
1916
1916
|
console.error(`Configuration source: ${sourceConfigsData.source}`);
|
|
1917
1917
|
await connectorManager.connectWithSources(sources);
|
|
1918
|
-
const { initializeToolRegistry: initializeToolRegistry2 } = await import("./registry-
|
|
1918
|
+
const { initializeToolRegistry: initializeToolRegistry2 } = await import("./registry-U6JUB444.js");
|
|
1919
1919
|
initializeToolRegistry2({
|
|
1920
1920
|
sources: sourceConfigsData.sources,
|
|
1921
1921
|
tools: sourceConfigsData.tools
|
|
@@ -2070,12 +2070,12 @@ See documentation for more details on configuring database connections.
|
|
|
2070
2070
|
|
|
2071
2071
|
// src/index.ts
|
|
2072
2072
|
var connectorModules = [
|
|
2073
|
-
{ load: () => import("./postgres-
|
|
2074
|
-
{ load: () => import("./sqlserver-
|
|
2073
|
+
{ load: () => import("./postgres-UAK5DSEM.js"), name: "PostgreSQL", driver: "pg" },
|
|
2074
|
+
{ load: () => import("./sqlserver-LNPATTNS.js"), name: "SQL Server", driver: "mssql" },
|
|
2075
2075
|
{ load: () => import("./dameng-NKF7NZKE.js"), name: "Dameng", driver: "dmdb" },
|
|
2076
|
-
{ load: () => import("./sqlite-
|
|
2077
|
-
{ load: () => import("./mysql-
|
|
2078
|
-
{ load: () => import("./mariadb-
|
|
2076
|
+
{ load: () => import("./sqlite-J42ZHIO4.js"), name: "SQLite", driver: "node:sqlite" },
|
|
2077
|
+
{ load: () => import("./mysql-GHTT5NG3.js"), name: "MySQL", driver: "mysql2" },
|
|
2078
|
+
{ load: () => import("./mariadb-Y6H4TOLN.js"), name: "MariaDB", driver: "mariadb" }
|
|
2079
2079
|
];
|
|
2080
2080
|
loadConnectors(connectorModules).then(() => main()).catch((error) => {
|
|
2081
2081
|
console.error("Fatal error:", error);
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
parseQueryResultSets,
|
|
6
6
|
requireDatabaseInDSN,
|
|
7
7
|
withReadOnlyTransaction
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KYBFNQQ4.js";
|
|
9
9
|
import "./chunk-FU2ZJE4E.js";
|
|
10
10
|
import {
|
|
11
11
|
quoteIdentifier
|
|
12
12
|
} from "./chunk-JFWX35TB.js";
|
|
13
13
|
import {
|
|
14
14
|
obfuscateDSNPassword
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JDFXWHHT.js";
|
|
16
16
|
import {
|
|
17
17
|
SQLRowLimiter,
|
|
18
18
|
closeQuietly
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
parseQueryResultSets,
|
|
7
7
|
requireDatabaseInDSN,
|
|
8
8
|
withReadOnlyTransaction
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KYBFNQQ4.js";
|
|
10
10
|
import "./chunk-FU2ZJE4E.js";
|
|
11
11
|
import {
|
|
12
12
|
quoteIdentifier
|
|
13
13
|
} from "./chunk-JFWX35TB.js";
|
|
14
14
|
import {
|
|
15
15
|
obfuscateDSNPassword
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JDFXWHHT.js";
|
|
17
17
|
import {
|
|
18
18
|
SQLRowLimiter,
|
|
19
19
|
closeQuietly
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
ToolRegistry,
|
|
3
3
|
getToolRegistry,
|
|
4
4
|
initializeToolRegistry
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RRLCKPSL.js";
|
|
6
6
|
import "./chunk-WVVMH6FJ.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-JDFXWHHT.js";
|
|
8
8
|
import "./chunk-2JL4KCP5.js";
|
|
9
9
|
export {
|
|
10
10
|
ToolRegistry,
|