datapeek 0.1.9 → 0.1.10
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/cli/chunk-3XB4P3G3.js +228 -0
- package/dist/cli/chunk-Y3EHCZQX.js +220 -0
- package/dist/cli/chunk-Z2LV7EWL.js +190 -0
- package/dist/cli/dev.js +12 -10
- package/dist/cli/index.js +12 -10
- package/dist/cli/mssql-AYS72PRQ.js +20 -0
- package/dist/cli/mssql-JB63TSGG.js +20 -0
- package/dist/cli/mssql-Y5A62OYG.js +20 -0
- package/dist/client/assets/index-D-mash8_.js +370 -0
- package/dist/client/index.html +1 -1
- package/dist/server/chunk-MJJGJZFC.js +187 -0
- package/dist/server/chunk-VEX42Z2L.js +225 -0
- package/dist/server/chunk-VQPGGH2I.js +217 -0
- package/dist/server/dev.js +12 -10
- package/dist/server/index.js +12 -10
- package/dist/server/mssql-H6LKT5KN.js +18 -0
- package/dist/server/mssql-JDRJT5H4.js +18 -0
- package/dist/server/mssql-UZUN227W.js +18 -0
- package/package.json +1 -1
- package/dist/client/assets/index-CydCWCD8.js +0 -368
package/dist/server/dev.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
executeQueryMultiple,
|
|
6
6
|
getConnection,
|
|
7
7
|
testConnection
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VEX42Z2L.js";
|
|
9
9
|
|
|
10
10
|
// src/server/index.ts
|
|
11
11
|
import express from "express";
|
|
@@ -86,7 +86,7 @@ connectionRoutes.delete("/", async (req, res) => {
|
|
|
86
86
|
});
|
|
87
87
|
connectionRoutes.get("/status", async (req, res) => {
|
|
88
88
|
try {
|
|
89
|
-
const { getConnection: getConnection2, executeQuery: executeQuery3 } = await import("./mssql-
|
|
89
|
+
const { getConnection: getConnection2, executeQuery: executeQuery3 } = await import("./mssql-UZUN227W.js");
|
|
90
90
|
const pool = getConnection2();
|
|
91
91
|
if (pool && pool.connected) {
|
|
92
92
|
try {
|
|
@@ -96,7 +96,7 @@ connectionRoutes.get("/status", async (req, res) => {
|
|
|
96
96
|
} catch (error) {
|
|
97
97
|
const errorMessage = error.message || "";
|
|
98
98
|
if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
|
|
99
|
-
const { disconnect: disconnect2 } = await import("./mssql-
|
|
99
|
+
const { disconnect: disconnect2 } = await import("./mssql-UZUN227W.js");
|
|
100
100
|
await disconnect2();
|
|
101
101
|
}
|
|
102
102
|
res.json({ connected: false });
|
|
@@ -132,7 +132,7 @@ tableRoutes.get("/", async (req, res) => {
|
|
|
132
132
|
} catch (error) {
|
|
133
133
|
const errorMessage = error.message || "";
|
|
134
134
|
if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
|
|
135
|
-
const { disconnect: disconnect2 } = await import("./mssql-
|
|
135
|
+
const { disconnect: disconnect2 } = await import("./mssql-UZUN227W.js");
|
|
136
136
|
await disconnect2();
|
|
137
137
|
}
|
|
138
138
|
res.status(500).json({ error: error.message || "Failed to fetch tables" });
|
|
@@ -199,7 +199,7 @@ tableRoutes.get("/:schema/:table", async (req, res) => {
|
|
|
199
199
|
} catch (error) {
|
|
200
200
|
const errorMessage = error.message || "";
|
|
201
201
|
if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
|
|
202
|
-
const { disconnect: disconnect2 } = await import("./mssql-
|
|
202
|
+
const { disconnect: disconnect2 } = await import("./mssql-UZUN227W.js");
|
|
203
203
|
await disconnect2();
|
|
204
204
|
}
|
|
205
205
|
res.status(500).json({ error: error.message || "Failed to fetch table structure" });
|
|
@@ -525,7 +525,7 @@ ORDER BY ${baseTableAlias}.rn`;
|
|
|
525
525
|
console.error("Error fetching table data:", error);
|
|
526
526
|
const errorMessage = error.message || "";
|
|
527
527
|
if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
|
|
528
|
-
const { disconnect: disconnect2 } = await import("./mssql-
|
|
528
|
+
const { disconnect: disconnect2 } = await import("./mssql-UZUN227W.js");
|
|
529
529
|
await disconnect2();
|
|
530
530
|
}
|
|
531
531
|
const isTimeout = error.code === "ETIMEOUT" || error.code === "ESOCKET" || error.message?.includes("timeout") || error.message?.includes("ETIMEDOUT") || error.originalError?.code === "ETIMEOUT" || error.originalError?.code === "ESOCKET";
|
|
@@ -631,7 +631,7 @@ tableRoutes.post("/:schema/:table/related-data", async (req, res) => {
|
|
|
631
631
|
console.error("Error fetching related data:", error);
|
|
632
632
|
const errorMessage = error.message || "";
|
|
633
633
|
if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
|
|
634
|
-
const { disconnect: disconnect2 } = await import("./mssql-
|
|
634
|
+
const { disconnect: disconnect2 } = await import("./mssql-UZUN227W.js");
|
|
635
635
|
await disconnect2();
|
|
636
636
|
}
|
|
637
637
|
res.status(500).json({ error: error.message || "Failed to fetch related data" });
|
|
@@ -648,17 +648,19 @@ queryRoutes.post("/", async (req, res) => {
|
|
|
648
648
|
return res.status(400).json({ error: "Query is required" });
|
|
649
649
|
}
|
|
650
650
|
const startTime = Date.now();
|
|
651
|
-
const resultSets = await executeQueryMultiple(sqlQuery);
|
|
651
|
+
const { recordsets: resultSets, columnMetadata } = await executeQueryMultiple(sqlQuery);
|
|
652
652
|
const executionTime = Date.now() - startTime;
|
|
653
653
|
res.json({
|
|
654
654
|
data: resultSets[0] || [],
|
|
655
655
|
resultSets: resultSets.length > 0 ? resultSets : [],
|
|
656
|
-
executionTime
|
|
656
|
+
executionTime,
|
|
657
|
+
columnMetadata
|
|
658
|
+
// Include column metadata for empty result sets
|
|
657
659
|
});
|
|
658
660
|
} catch (error) {
|
|
659
661
|
const errorMessage = error.message || "";
|
|
660
662
|
if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
|
|
661
|
-
const { disconnect: disconnect2 } = await import("./mssql-
|
|
663
|
+
const { disconnect: disconnect2 } = await import("./mssql-UZUN227W.js");
|
|
662
664
|
await disconnect2();
|
|
663
665
|
}
|
|
664
666
|
res.status(500).json({
|
package/dist/server/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
executeQueryMultiple,
|
|
6
6
|
getConnection,
|
|
7
7
|
testConnection
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VEX42Z2L.js";
|
|
9
9
|
|
|
10
10
|
// src/server/index.ts
|
|
11
11
|
import express from "express";
|
|
@@ -86,7 +86,7 @@ connectionRoutes.delete("/", async (req, res) => {
|
|
|
86
86
|
});
|
|
87
87
|
connectionRoutes.get("/status", async (req, res) => {
|
|
88
88
|
try {
|
|
89
|
-
const { getConnection: getConnection2, executeQuery: executeQuery3 } = await import("./mssql-
|
|
89
|
+
const { getConnection: getConnection2, executeQuery: executeQuery3 } = await import("./mssql-UZUN227W.js");
|
|
90
90
|
const pool = getConnection2();
|
|
91
91
|
if (pool && pool.connected) {
|
|
92
92
|
try {
|
|
@@ -96,7 +96,7 @@ connectionRoutes.get("/status", async (req, res) => {
|
|
|
96
96
|
} catch (error) {
|
|
97
97
|
const errorMessage = error.message || "";
|
|
98
98
|
if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
|
|
99
|
-
const { disconnect: disconnect2 } = await import("./mssql-
|
|
99
|
+
const { disconnect: disconnect2 } = await import("./mssql-UZUN227W.js");
|
|
100
100
|
await disconnect2();
|
|
101
101
|
}
|
|
102
102
|
res.json({ connected: false });
|
|
@@ -132,7 +132,7 @@ tableRoutes.get("/", async (req, res) => {
|
|
|
132
132
|
} catch (error) {
|
|
133
133
|
const errorMessage = error.message || "";
|
|
134
134
|
if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
|
|
135
|
-
const { disconnect: disconnect2 } = await import("./mssql-
|
|
135
|
+
const { disconnect: disconnect2 } = await import("./mssql-UZUN227W.js");
|
|
136
136
|
await disconnect2();
|
|
137
137
|
}
|
|
138
138
|
res.status(500).json({ error: error.message || "Failed to fetch tables" });
|
|
@@ -199,7 +199,7 @@ tableRoutes.get("/:schema/:table", async (req, res) => {
|
|
|
199
199
|
} catch (error) {
|
|
200
200
|
const errorMessage = error.message || "";
|
|
201
201
|
if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
|
|
202
|
-
const { disconnect: disconnect2 } = await import("./mssql-
|
|
202
|
+
const { disconnect: disconnect2 } = await import("./mssql-UZUN227W.js");
|
|
203
203
|
await disconnect2();
|
|
204
204
|
}
|
|
205
205
|
res.status(500).json({ error: error.message || "Failed to fetch table structure" });
|
|
@@ -525,7 +525,7 @@ ORDER BY ${baseTableAlias}.rn`;
|
|
|
525
525
|
console.error("Error fetching table data:", error);
|
|
526
526
|
const errorMessage = error.message || "";
|
|
527
527
|
if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
|
|
528
|
-
const { disconnect: disconnect2 } = await import("./mssql-
|
|
528
|
+
const { disconnect: disconnect2 } = await import("./mssql-UZUN227W.js");
|
|
529
529
|
await disconnect2();
|
|
530
530
|
}
|
|
531
531
|
const isTimeout = error.code === "ETIMEOUT" || error.code === "ESOCKET" || error.message?.includes("timeout") || error.message?.includes("ETIMEDOUT") || error.originalError?.code === "ETIMEOUT" || error.originalError?.code === "ESOCKET";
|
|
@@ -631,7 +631,7 @@ tableRoutes.post("/:schema/:table/related-data", async (req, res) => {
|
|
|
631
631
|
console.error("Error fetching related data:", error);
|
|
632
632
|
const errorMessage = error.message || "";
|
|
633
633
|
if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
|
|
634
|
-
const { disconnect: disconnect2 } = await import("./mssql-
|
|
634
|
+
const { disconnect: disconnect2 } = await import("./mssql-UZUN227W.js");
|
|
635
635
|
await disconnect2();
|
|
636
636
|
}
|
|
637
637
|
res.status(500).json({ error: error.message || "Failed to fetch related data" });
|
|
@@ -648,17 +648,19 @@ queryRoutes.post("/", async (req, res) => {
|
|
|
648
648
|
return res.status(400).json({ error: "Query is required" });
|
|
649
649
|
}
|
|
650
650
|
const startTime = Date.now();
|
|
651
|
-
const resultSets = await executeQueryMultiple(sqlQuery);
|
|
651
|
+
const { recordsets: resultSets, columnMetadata } = await executeQueryMultiple(sqlQuery);
|
|
652
652
|
const executionTime = Date.now() - startTime;
|
|
653
653
|
res.json({
|
|
654
654
|
data: resultSets[0] || [],
|
|
655
655
|
resultSets: resultSets.length > 0 ? resultSets : [],
|
|
656
|
-
executionTime
|
|
656
|
+
executionTime,
|
|
657
|
+
columnMetadata
|
|
658
|
+
// Include column metadata for empty result sets
|
|
657
659
|
});
|
|
658
660
|
} catch (error) {
|
|
659
661
|
const errorMessage = error.message || "";
|
|
660
662
|
if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
|
|
661
|
-
const { disconnect: disconnect2 } = await import("./mssql-
|
|
663
|
+
const { disconnect: disconnect2 } = await import("./mssql-UZUN227W.js");
|
|
662
664
|
await disconnect2();
|
|
663
665
|
}
|
|
664
666
|
res.status(500).json({
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
connect,
|
|
3
|
+
disconnect,
|
|
4
|
+
executeQuery,
|
|
5
|
+
executeQueryMultiple,
|
|
6
|
+
getConnection,
|
|
7
|
+
parseConnectionString,
|
|
8
|
+
testConnection
|
|
9
|
+
} from "./chunk-VQPGGH2I.js";
|
|
10
|
+
export {
|
|
11
|
+
connect,
|
|
12
|
+
disconnect,
|
|
13
|
+
executeQuery,
|
|
14
|
+
executeQueryMultiple,
|
|
15
|
+
getConnection,
|
|
16
|
+
parseConnectionString,
|
|
17
|
+
testConnection
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
connect,
|
|
3
|
+
disconnect,
|
|
4
|
+
executeQuery,
|
|
5
|
+
executeQueryMultiple,
|
|
6
|
+
getConnection,
|
|
7
|
+
parseConnectionString,
|
|
8
|
+
testConnection
|
|
9
|
+
} from "./chunk-MJJGJZFC.js";
|
|
10
|
+
export {
|
|
11
|
+
connect,
|
|
12
|
+
disconnect,
|
|
13
|
+
executeQuery,
|
|
14
|
+
executeQueryMultiple,
|
|
15
|
+
getConnection,
|
|
16
|
+
parseConnectionString,
|
|
17
|
+
testConnection
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
connect,
|
|
3
|
+
disconnect,
|
|
4
|
+
executeQuery,
|
|
5
|
+
executeQueryMultiple,
|
|
6
|
+
getConnection,
|
|
7
|
+
parseConnectionString,
|
|
8
|
+
testConnection
|
|
9
|
+
} from "./chunk-VEX42Z2L.js";
|
|
10
|
+
export {
|
|
11
|
+
connect,
|
|
12
|
+
disconnect,
|
|
13
|
+
executeQuery,
|
|
14
|
+
executeQueryMultiple,
|
|
15
|
+
getConnection,
|
|
16
|
+
parseConnectionString,
|
|
17
|
+
testConnection
|
|
18
|
+
};
|