dbcat 0.0.10 → 0.0.11

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dbcat",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "A simple CLI to view database tables. Supports PostgreSQL, MySQL, and SQLite.",
5
5
  "author": "RiskyMH",
6
6
  "license": "MIT",
package/src/index.ts CHANGED
@@ -146,7 +146,7 @@ function displayQueryResult(rows: Record<string, unknown>[]) {
146
146
  }
147
147
 
148
148
  async function readStdin(): Promise<string | null> {
149
- if (process.stdin.isTTY || Bun.stdin.size === 0) {
149
+ if (process.stdin.isTTY) {
150
150
  return null;
151
151
  }
152
152
 
@@ -246,7 +246,7 @@ async function main() {
246
246
 
247
247
  let sql: InstanceType<typeof Bun.SQL>;
248
248
  try {
249
- sql = createConnection(connectionInput, { readonly: Bun.stdin.size == 0 });
249
+ sql = createConnection(connectionInput, { readonly: process.stdin.isTTY });
250
250
  } catch (error) {
251
251
  console.error("Failed to connect:");
252
252
  console.error(error instanceof Error ? error.message : String(error));