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/dev.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  executeQueryMultiple,
8
8
  getConnection,
9
9
  testConnection
10
- } from "./chunk-G7KSYREO.js";
10
+ } from "./chunk-3XB4P3G3.js";
11
11
 
12
12
  // src/server/index.ts
13
13
  import express from "express";
@@ -88,7 +88,7 @@ connectionRoutes.delete("/", async (req, res) => {
88
88
  });
89
89
  connectionRoutes.get("/status", async (req, res) => {
90
90
  try {
91
- const { getConnection: getConnection2, executeQuery: executeQuery3 } = await import("./mssql-HI3S4B7E.js");
91
+ const { getConnection: getConnection2, executeQuery: executeQuery3 } = await import("./mssql-AYS72PRQ.js");
92
92
  const pool = getConnection2();
93
93
  if (pool && pool.connected) {
94
94
  try {
@@ -98,7 +98,7 @@ connectionRoutes.get("/status", async (req, res) => {
98
98
  } catch (error) {
99
99
  const errorMessage = error.message || "";
100
100
  if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
101
- const { disconnect: disconnect2 } = await import("./mssql-HI3S4B7E.js");
101
+ const { disconnect: disconnect2 } = await import("./mssql-AYS72PRQ.js");
102
102
  await disconnect2();
103
103
  }
104
104
  res.json({ connected: false });
@@ -134,7 +134,7 @@ tableRoutes.get("/", async (req, res) => {
134
134
  } catch (error) {
135
135
  const errorMessage = error.message || "";
136
136
  if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
137
- const { disconnect: disconnect2 } = await import("./mssql-HI3S4B7E.js");
137
+ const { disconnect: disconnect2 } = await import("./mssql-AYS72PRQ.js");
138
138
  await disconnect2();
139
139
  }
140
140
  res.status(500).json({ error: error.message || "Failed to fetch tables" });
@@ -201,7 +201,7 @@ tableRoutes.get("/:schema/:table", async (req, res) => {
201
201
  } catch (error) {
202
202
  const errorMessage = error.message || "";
203
203
  if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
204
- const { disconnect: disconnect2 } = await import("./mssql-HI3S4B7E.js");
204
+ const { disconnect: disconnect2 } = await import("./mssql-AYS72PRQ.js");
205
205
  await disconnect2();
206
206
  }
207
207
  res.status(500).json({ error: error.message || "Failed to fetch table structure" });
@@ -527,7 +527,7 @@ ORDER BY ${baseTableAlias}.rn`;
527
527
  console.error("Error fetching table data:", error);
528
528
  const errorMessage = error.message || "";
529
529
  if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
530
- const { disconnect: disconnect2 } = await import("./mssql-HI3S4B7E.js");
530
+ const { disconnect: disconnect2 } = await import("./mssql-AYS72PRQ.js");
531
531
  await disconnect2();
532
532
  }
533
533
  const isTimeout = error.code === "ETIMEOUT" || error.code === "ESOCKET" || error.message?.includes("timeout") || error.message?.includes("ETIMEDOUT") || error.originalError?.code === "ETIMEOUT" || error.originalError?.code === "ESOCKET";
@@ -633,7 +633,7 @@ tableRoutes.post("/:schema/:table/related-data", async (req, res) => {
633
633
  console.error("Error fetching related data:", error);
634
634
  const errorMessage = error.message || "";
635
635
  if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
636
- const { disconnect: disconnect2 } = await import("./mssql-HI3S4B7E.js");
636
+ const { disconnect: disconnect2 } = await import("./mssql-AYS72PRQ.js");
637
637
  await disconnect2();
638
638
  }
639
639
  res.status(500).json({ error: error.message || "Failed to fetch related data" });
@@ -650,17 +650,19 @@ queryRoutes.post("/", async (req, res) => {
650
650
  return res.status(400).json({ error: "Query is required" });
651
651
  }
652
652
  const startTime = Date.now();
653
- const resultSets = await executeQueryMultiple(sqlQuery);
653
+ const { recordsets: resultSets, columnMetadata } = await executeQueryMultiple(sqlQuery);
654
654
  const executionTime = Date.now() - startTime;
655
655
  res.json({
656
656
  data: resultSets[0] || [],
657
657
  resultSets: resultSets.length > 0 ? resultSets : [],
658
- executionTime
658
+ executionTime,
659
+ columnMetadata
660
+ // Include column metadata for empty result sets
659
661
  });
660
662
  } catch (error) {
661
663
  const errorMessage = error.message || "";
662
664
  if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
663
- const { disconnect: disconnect2 } = await import("./mssql-HI3S4B7E.js");
665
+ const { disconnect: disconnect2 } = await import("./mssql-AYS72PRQ.js");
664
666
  await disconnect2();
665
667
  }
666
668
  res.status(500).json({
package/dist/cli/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  executeQueryMultiple,
8
8
  getConnection,
9
9
  testConnection
10
- } from "./chunk-G7KSYREO.js";
10
+ } from "./chunk-3XB4P3G3.js";
11
11
 
12
12
  // src/cli/index.ts
13
13
  import { Command } from "commander";
@@ -91,7 +91,7 @@ connectionRoutes.delete("/", async (req, res) => {
91
91
  });
92
92
  connectionRoutes.get("/status", async (req, res) => {
93
93
  try {
94
- const { getConnection: getConnection2, executeQuery: executeQuery3 } = await import("./mssql-HI3S4B7E.js");
94
+ const { getConnection: getConnection2, executeQuery: executeQuery3 } = await import("./mssql-AYS72PRQ.js");
95
95
  const pool = getConnection2();
96
96
  if (pool && pool.connected) {
97
97
  try {
@@ -101,7 +101,7 @@ connectionRoutes.get("/status", async (req, res) => {
101
101
  } catch (error) {
102
102
  const errorMessage = error.message || "";
103
103
  if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
104
- const { disconnect: disconnect2 } = await import("./mssql-HI3S4B7E.js");
104
+ const { disconnect: disconnect2 } = await import("./mssql-AYS72PRQ.js");
105
105
  await disconnect2();
106
106
  }
107
107
  res.json({ connected: false });
@@ -137,7 +137,7 @@ tableRoutes.get("/", async (req, res) => {
137
137
  } catch (error) {
138
138
  const errorMessage = error.message || "";
139
139
  if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
140
- const { disconnect: disconnect2 } = await import("./mssql-HI3S4B7E.js");
140
+ const { disconnect: disconnect2 } = await import("./mssql-AYS72PRQ.js");
141
141
  await disconnect2();
142
142
  }
143
143
  res.status(500).json({ error: error.message || "Failed to fetch tables" });
@@ -204,7 +204,7 @@ tableRoutes.get("/:schema/:table", async (req, res) => {
204
204
  } catch (error) {
205
205
  const errorMessage = error.message || "";
206
206
  if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
207
- const { disconnect: disconnect2 } = await import("./mssql-HI3S4B7E.js");
207
+ const { disconnect: disconnect2 } = await import("./mssql-AYS72PRQ.js");
208
208
  await disconnect2();
209
209
  }
210
210
  res.status(500).json({ error: error.message || "Failed to fetch table structure" });
@@ -530,7 +530,7 @@ ORDER BY ${baseTableAlias}.rn`;
530
530
  console.error("Error fetching table data:", error);
531
531
  const errorMessage = error.message || "";
532
532
  if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
533
- const { disconnect: disconnect2 } = await import("./mssql-HI3S4B7E.js");
533
+ const { disconnect: disconnect2 } = await import("./mssql-AYS72PRQ.js");
534
534
  await disconnect2();
535
535
  }
536
536
  const isTimeout = error.code === "ETIMEOUT" || error.code === "ESOCKET" || error.message?.includes("timeout") || error.message?.includes("ETIMEDOUT") || error.originalError?.code === "ETIMEOUT" || error.originalError?.code === "ESOCKET";
@@ -636,7 +636,7 @@ tableRoutes.post("/:schema/:table/related-data", async (req, res) => {
636
636
  console.error("Error fetching related data:", error);
637
637
  const errorMessage = error.message || "";
638
638
  if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
639
- const { disconnect: disconnect2 } = await import("./mssql-HI3S4B7E.js");
639
+ const { disconnect: disconnect2 } = await import("./mssql-AYS72PRQ.js");
640
640
  await disconnect2();
641
641
  }
642
642
  res.status(500).json({ error: error.message || "Failed to fetch related data" });
@@ -653,17 +653,19 @@ queryRoutes.post("/", async (req, res) => {
653
653
  return res.status(400).json({ error: "Query is required" });
654
654
  }
655
655
  const startTime = Date.now();
656
- const resultSets = await executeQueryMultiple(sqlQuery);
656
+ const { recordsets: resultSets, columnMetadata } = await executeQueryMultiple(sqlQuery);
657
657
  const executionTime = Date.now() - startTime;
658
658
  res.json({
659
659
  data: resultSets[0] || [],
660
660
  resultSets: resultSets.length > 0 ? resultSets : [],
661
- executionTime
661
+ executionTime,
662
+ columnMetadata
663
+ // Include column metadata for empty result sets
662
664
  });
663
665
  } catch (error) {
664
666
  const errorMessage = error.message || "";
665
667
  if (errorMessage.includes("Login failed") || errorMessage.includes("authentication")) {
666
- const { disconnect: disconnect2 } = await import("./mssql-HI3S4B7E.js");
668
+ const { disconnect: disconnect2 } = await import("./mssql-AYS72PRQ.js");
667
669
  await disconnect2();
668
670
  }
669
671
  res.status(500).json({
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+
3
+ import {
4
+ connect,
5
+ disconnect,
6
+ executeQuery,
7
+ executeQueryMultiple,
8
+ getConnection,
9
+ parseConnectionString,
10
+ testConnection
11
+ } from "./chunk-3XB4P3G3.js";
12
+ export {
13
+ connect,
14
+ disconnect,
15
+ executeQuery,
16
+ executeQueryMultiple,
17
+ getConnection,
18
+ parseConnectionString,
19
+ testConnection
20
+ };
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+
3
+ import {
4
+ connect,
5
+ disconnect,
6
+ executeQuery,
7
+ executeQueryMultiple,
8
+ getConnection,
9
+ parseConnectionString,
10
+ testConnection
11
+ } from "./chunk-Y3EHCZQX.js";
12
+ export {
13
+ connect,
14
+ disconnect,
15
+ executeQuery,
16
+ executeQueryMultiple,
17
+ getConnection,
18
+ parseConnectionString,
19
+ testConnection
20
+ };
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+
3
+ import {
4
+ connect,
5
+ disconnect,
6
+ executeQuery,
7
+ executeQueryMultiple,
8
+ getConnection,
9
+ parseConnectionString,
10
+ testConnection
11
+ } from "./chunk-Z2LV7EWL.js";
12
+ export {
13
+ connect,
14
+ disconnect,
15
+ executeQuery,
16
+ executeQueryMultiple,
17
+ getConnection,
18
+ parseConnectionString,
19
+ testConnection
20
+ };