whats-up-dug 0.2.4 → 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.
- package/README.md +1 -0
- package/dist/index.js +11 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,6 +65,7 @@ dug responds to keyboard commands. He's a very trained boy.
|
|
|
65
65
|
| Key | What happens |
|
|
66
66
|
|-----|-------------|
|
|
67
67
|
| `j` / `k` | Move between rows |
|
|
68
|
+
| `h` / `l` | Scroll columns left / right |
|
|
68
69
|
| `Enter` | Look at this record |
|
|
69
70
|
| `n` / `p` | Next / previous page |
|
|
70
71
|
| `/` | Quick search |
|
package/dist/index.js
CHANGED
|
@@ -52915,12 +52915,11 @@ function TableScreen({
|
|
|
52915
52915
|
}, undefined, false, undefined, this)
|
|
52916
52916
|
]
|
|
52917
52917
|
}, undefined, true, undefined, this),
|
|
52918
|
-
overlay === "search"
|
|
52918
|
+
overlay === "search" ? /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
52919
52919
|
flexDirection: "column",
|
|
52920
52920
|
borderStyle: "round",
|
|
52921
52921
|
borderColor: "yellow",
|
|
52922
52922
|
paddingX: 1,
|
|
52923
|
-
marginBottom: 1,
|
|
52924
52923
|
children: [
|
|
52925
52924
|
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
|
|
52926
52925
|
bold: true,
|
|
@@ -52968,13 +52967,11 @@ function TableScreen({
|
|
|
52968
52967
|
]
|
|
52969
52968
|
}, undefined, true, undefined, this)
|
|
52970
52969
|
]
|
|
52971
|
-
}, undefined, true, undefined, this),
|
|
52972
|
-
overlay === "sort" && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
52970
|
+
}, undefined, true, undefined, this) : overlay === "sort" ? /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
52973
52971
|
flexDirection: "column",
|
|
52974
52972
|
borderStyle: "round",
|
|
52975
52973
|
borderColor: "cyan",
|
|
52976
52974
|
paddingX: 1,
|
|
52977
|
-
marginBottom: 1,
|
|
52978
52975
|
children: [
|
|
52979
52976
|
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
|
|
52980
52977
|
bold: true,
|
|
@@ -53024,13 +53021,11 @@ function TableScreen({
|
|
|
53024
53021
|
children: "Esc to cancel"
|
|
53025
53022
|
}, undefined, false, undefined, this)
|
|
53026
53023
|
]
|
|
53027
|
-
}, undefined, true, undefined, this),
|
|
53028
|
-
overlay === "columns" && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
53024
|
+
}, undefined, true, undefined, this) : overlay === "columns" ? /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
53029
53025
|
flexDirection: "column",
|
|
53030
53026
|
borderStyle: "round",
|
|
53031
53027
|
borderColor: "green",
|
|
53032
53028
|
paddingX: 1,
|
|
53033
|
-
marginBottom: 1,
|
|
53034
53029
|
children: [
|
|
53035
53030
|
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
|
|
53036
53031
|
bold: true,
|
|
@@ -53051,13 +53046,11 @@ function TableScreen({
|
|
|
53051
53046
|
}, undefined, true, undefined, this)
|
|
53052
53047
|
}, attr, false, undefined, this))
|
|
53053
53048
|
]
|
|
53054
|
-
}, undefined, true, undefined, this),
|
|
53055
|
-
overlay === "query" && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
53049
|
+
}, undefined, true, undefined, this) : overlay === "query" ? /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
53056
53050
|
flexDirection: "column",
|
|
53057
53051
|
borderStyle: "round",
|
|
53058
53052
|
borderColor: "magenta",
|
|
53059
53053
|
paddingX: 1,
|
|
53060
|
-
marginBottom: 1,
|
|
53061
53054
|
children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(QueryBuilder, {
|
|
53062
53055
|
attributes: allAttributes,
|
|
53063
53056
|
defaultLimit: tablePageSize,
|
|
@@ -53074,8 +53067,7 @@ function TableScreen({
|
|
|
53074
53067
|
},
|
|
53075
53068
|
onCancel: () => setOverlay("none")
|
|
53076
53069
|
}, undefined, false, undefined, this)
|
|
53077
|
-
}, undefined, false, undefined, this),
|
|
53078
|
-
overlay === "schema-info" ? /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
53070
|
+
}, undefined, false, undefined, this) : overlay === "schema-info" ? /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
53079
53071
|
flexDirection: "column",
|
|
53080
53072
|
borderStyle: "round",
|
|
53081
53073
|
borderColor: "blue",
|
|
@@ -53769,10 +53761,6 @@ function App2({
|
|
|
53769
53761
|
return () => clearTimeout(t2);
|
|
53770
53762
|
}, []);
|
|
53771
53763
|
const overlayActive = import_react36.useRef(false);
|
|
53772
|
-
const { stdout } = use_stdout_default();
|
|
53773
|
-
const clearScreen2 = import_react36.useCallback(() => {
|
|
53774
|
-
stdout.write("\x1B[2J\x1B[H");
|
|
53775
|
-
}, [stdout]);
|
|
53776
53764
|
const hasTextInput = current.screen === "connect";
|
|
53777
53765
|
use_input_default((input, key) => {
|
|
53778
53766
|
if (quitting)
|
|
@@ -53794,7 +53782,6 @@ function App2({
|
|
|
53794
53782
|
}
|
|
53795
53783
|
if (key.escape && !overlayActive.current) {
|
|
53796
53784
|
if (stack.length > 1) {
|
|
53797
|
-
clearScreen2();
|
|
53798
53785
|
pop();
|
|
53799
53786
|
} else {
|
|
53800
53787
|
setQuitting(true);
|
|
@@ -53807,37 +53794,31 @@ function App2({
|
|
|
53807
53794
|
nav.info("Connected, navigating to dashboard");
|
|
53808
53795
|
client.clearCache();
|
|
53809
53796
|
setConnectedUrl(url);
|
|
53810
|
-
clearScreen2();
|
|
53811
53797
|
push("dashboard", { url });
|
|
53812
|
-
}, [push, client
|
|
53798
|
+
}, [push, client]);
|
|
53813
53799
|
const handleSelectDatabase = import_react36.useCallback((db) => {
|
|
53814
53800
|
nav.info("Selected database: %s", db);
|
|
53815
|
-
clearScreen2();
|
|
53816
53801
|
push("database", { database: db });
|
|
53817
|
-
}, [push
|
|
53802
|
+
}, [push]);
|
|
53818
53803
|
const handleSelectTable = import_react36.useCallback((table) => {
|
|
53819
53804
|
const db = current.params.database;
|
|
53820
53805
|
nav.info("Selected table: %s.%s", db, table);
|
|
53821
|
-
clearScreen2();
|
|
53822
53806
|
push("table", { database: db, table });
|
|
53823
|
-
}, [push, current
|
|
53807
|
+
}, [push, current]);
|
|
53824
53808
|
const handleSelectRecord = import_react36.useCallback((record, primaryKey) => {
|
|
53825
53809
|
const { database, table } = current.params;
|
|
53826
53810
|
const pk = primaryKey ?? "id";
|
|
53827
53811
|
nav.info("Selected record: %s.%s[%s]", database, table, record[pk]);
|
|
53828
|
-
clearScreen2();
|
|
53829
53812
|
push("record", { database, table, record, primaryKey: pk });
|
|
53830
|
-
}, [push, current
|
|
53813
|
+
}, [push, current]);
|
|
53831
53814
|
const handleNavigateToRecord = import_react36.useCallback((database, table, record, primaryKey) => {
|
|
53832
53815
|
nav.info("FK navigate: %s.%s[%s]", database, table, record[primaryKey] ?? "?");
|
|
53833
|
-
clearScreen2();
|
|
53834
53816
|
push("record", { database, table, record, primaryKey });
|
|
53835
|
-
}, [push
|
|
53817
|
+
}, [push]);
|
|
53836
53818
|
const handleSystemInfo = import_react36.useCallback(() => {
|
|
53837
53819
|
nav.info("Viewing system info");
|
|
53838
|
-
clearScreen2();
|
|
53839
53820
|
push("system", {});
|
|
53840
|
-
}, [push
|
|
53821
|
+
}, [push]);
|
|
53841
53822
|
const breadcrumbItems = import_react36.useMemo(() => {
|
|
53842
53823
|
const items = [version ? `dug ${version} \uD83D\uDC15` : "dug \uD83D\uDC15"];
|
|
53843
53824
|
if (connectedUrl) {
|