whats-up-dug 0.2.5 → 0.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.
Files changed (2) hide show
  1. package/dist/index.js +6 -17
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -53761,10 +53761,6 @@ function App2({
53761
53761
  return () => clearTimeout(t2);
53762
53762
  }, []);
53763
53763
  const overlayActive = import_react36.useRef(false);
53764
- const { stdout } = use_stdout_default();
53765
- const clearScreen2 = import_react36.useCallback(() => {
53766
- stdout.write("\x1B[2J\x1B[H");
53767
- }, [stdout]);
53768
53764
  const hasTextInput = current.screen === "connect";
53769
53765
  use_input_default((input, key) => {
53770
53766
  if (quitting)
@@ -53786,7 +53782,6 @@ function App2({
53786
53782
  }
53787
53783
  if (key.escape && !overlayActive.current) {
53788
53784
  if (stack.length > 1) {
53789
- clearScreen2();
53790
53785
  pop();
53791
53786
  } else {
53792
53787
  setQuitting(true);
@@ -53799,37 +53794,31 @@ function App2({
53799
53794
  nav.info("Connected, navigating to dashboard");
53800
53795
  client.clearCache();
53801
53796
  setConnectedUrl(url);
53802
- clearScreen2();
53803
53797
  push("dashboard", { url });
53804
- }, [push, client, clearScreen2]);
53798
+ }, [push, client]);
53805
53799
  const handleSelectDatabase = import_react36.useCallback((db) => {
53806
53800
  nav.info("Selected database: %s", db);
53807
- clearScreen2();
53808
53801
  push("database", { database: db });
53809
- }, [push, clearScreen2]);
53802
+ }, [push]);
53810
53803
  const handleSelectTable = import_react36.useCallback((table) => {
53811
53804
  const db = current.params.database;
53812
53805
  nav.info("Selected table: %s.%s", db, table);
53813
- clearScreen2();
53814
53806
  push("table", { database: db, table });
53815
- }, [push, current, clearScreen2]);
53807
+ }, [push, current]);
53816
53808
  const handleSelectRecord = import_react36.useCallback((record, primaryKey) => {
53817
53809
  const { database, table } = current.params;
53818
53810
  const pk = primaryKey ?? "id";
53819
53811
  nav.info("Selected record: %s.%s[%s]", database, table, record[pk]);
53820
- clearScreen2();
53821
53812
  push("record", { database, table, record, primaryKey: pk });
53822
- }, [push, current, clearScreen2]);
53813
+ }, [push, current]);
53823
53814
  const handleNavigateToRecord = import_react36.useCallback((database, table, record, primaryKey) => {
53824
53815
  nav.info("FK navigate: %s.%s[%s]", database, table, record[primaryKey] ?? "?");
53825
- clearScreen2();
53826
53816
  push("record", { database, table, record, primaryKey });
53827
- }, [push, clearScreen2]);
53817
+ }, [push]);
53828
53818
  const handleSystemInfo = import_react36.useCallback(() => {
53829
53819
  nav.info("Viewing system info");
53830
- clearScreen2();
53831
53820
  push("system", {});
53832
- }, [push, clearScreen2]);
53821
+ }, [push]);
53833
53822
  const breadcrumbItems = import_react36.useMemo(() => {
53834
53823
  const items = [version ? `dug ${version} \uD83D\uDC15` : "dug \uD83D\uDC15"];
53835
53824
  if (connectedUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whats-up-dug",
3
- "version": "0.2.5",
3
+ "version": "0.3.0",
4
4
  "description": "Interactive data exploration CLI for Harper",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",