@akanjs/cli 0.9.22 → 0.9.23
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/cjs/index.js +15 -7
- package/esm/index.js +15 -7
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -3649,7 +3649,11 @@ var MultiScrollList = ({ logList, maxLength = 100 }) => {
|
|
|
3649
3649
|
width: "100%",
|
|
3650
3650
|
height: "100%"
|
|
3651
3651
|
},
|
|
3652
|
-
scrollPos > 0 ? /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, focusLog.slice(0, focusLog.length - 1).map((log, index) =>
|
|
3652
|
+
scrollPos > 0 ? /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, focusLog.slice(0, focusLog.length - 1).map((log, index) => {
|
|
3653
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement(import_ink2.Text, { key: index }, index, ": ", log));
|
|
3654
|
+
}), /* @__PURE__ */ import_react2.default.createElement(import_ink2.Text, { backgroundColor: "green" }, "Scrolling... +", scrollPos)) : focusLog.map((log, index) => {
|
|
3655
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement(import_ink2.Text, { key: index }, index, ": ", log));
|
|
3656
|
+
})
|
|
3653
3657
|
))), /* @__PURE__ */ import_react2.default.createElement(import_ink2.Box, { width }, /* @__PURE__ */ import_react2.default.createElement(import_ink2.Text, { dimColor: true }, /* @__PURE__ */ import_react2.default.createElement(import_ink2.Text, null, "You can use the following shortcuts:"), /* @__PURE__ */ import_react2.default.createElement(import_ink2.Newline, null), "* ", /* @__PURE__ */ import_react2.default.createElement(import_ink2.Text, { backgroundColor: "green" }, "tab"), " to switch tab.", /* @__PURE__ */ import_react2.default.createElement(import_ink2.Newline, null), "* ", /* @__PURE__ */ import_react2.default.createElement(import_ink2.Text, { backgroundColor: "green" }, "up"), " and ", /* @__PURE__ */ import_react2.default.createElement(import_ink2.Text, { backgroundColor: "green" }, "down"), " to scroll.", " ", /* @__PURE__ */ import_react2.default.createElement(import_ink2.Text, { backgroundColor: "green" }, "shift"), " to scroll faster.", /* @__PURE__ */ import_react2.default.createElement(import_ink2.Newline, null), "* ", /* @__PURE__ */ import_react2.default.createElement(import_ink2.Text, { backgroundColor: "green" }, "space"), " to scroll.", /* @__PURE__ */ import_react2.default.createElement(import_ink2.Newline, null), "* ", /* @__PURE__ */ import_react2.default.createElement(import_ink2.Text, { backgroundColor: "green" }, "escape"), " to stop scrolling.")));
|
|
3654
3658
|
};
|
|
3655
3659
|
|
|
@@ -3761,17 +3765,21 @@ var Start = ({ appName, bcp, fcp, csr, onExit, maxLength = 100 }) => {
|
|
|
3761
3765
|
csr.on("clearScreen", (type) => {
|
|
3762
3766
|
saveLog("clearScreen", type, setCsrLogs);
|
|
3763
3767
|
});
|
|
3764
|
-
|
|
3768
|
+
const destroy = async () => {
|
|
3765
3769
|
bcp.kill();
|
|
3766
3770
|
fcp.kill();
|
|
3767
3771
|
bcp.stdin?.end();
|
|
3768
3772
|
fcp.stdin?.end();
|
|
3769
3773
|
csr.removeAllListeners();
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3774
|
+
await onExit();
|
|
3775
|
+
exit();
|
|
3776
|
+
process.exit(0);
|
|
3777
|
+
};
|
|
3778
|
+
process.on("SIGINT", () => {
|
|
3779
|
+
void destroy();
|
|
3780
|
+
});
|
|
3781
|
+
return () => {
|
|
3782
|
+
void destroy();
|
|
3775
3783
|
};
|
|
3776
3784
|
}, []);
|
|
3777
3785
|
return /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, /* @__PURE__ */ import_react3.default.createElement(import_ink3.Box, { borderColor: "#ff493b", height, width, flexDirection: "row" }, /* @__PURE__ */ import_react3.default.createElement(
|
package/esm/index.js
CHANGED
|
@@ -3631,7 +3631,11 @@ var MultiScrollList = ({ logList, maxLength = 100 }) => {
|
|
|
3631
3631
|
width: "100%",
|
|
3632
3632
|
height: "100%"
|
|
3633
3633
|
},
|
|
3634
|
-
scrollPos > 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, focusLog.slice(0, focusLog.length - 1).map((log, index) =>
|
|
3634
|
+
scrollPos > 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, focusLog.slice(0, focusLog.length - 1).map((log, index) => {
|
|
3635
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Text, { key: index }, index, ": ", log));
|
|
3636
|
+
}), /* @__PURE__ */ React.createElement(Text, { backgroundColor: "green" }, "Scrolling... +", scrollPos)) : focusLog.map((log, index) => {
|
|
3637
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Text, { key: index }, index, ": ", log));
|
|
3638
|
+
})
|
|
3635
3639
|
))), /* @__PURE__ */ React.createElement(Box, { width }, /* @__PURE__ */ React.createElement(Text, { dimColor: true }, /* @__PURE__ */ React.createElement(Text, null, "You can use the following shortcuts:"), /* @__PURE__ */ React.createElement(Newline, null), "* ", /* @__PURE__ */ React.createElement(Text, { backgroundColor: "green" }, "tab"), " to switch tab.", /* @__PURE__ */ React.createElement(Newline, null), "* ", /* @__PURE__ */ React.createElement(Text, { backgroundColor: "green" }, "up"), " and ", /* @__PURE__ */ React.createElement(Text, { backgroundColor: "green" }, "down"), " to scroll.", " ", /* @__PURE__ */ React.createElement(Text, { backgroundColor: "green" }, "shift"), " to scroll faster.", /* @__PURE__ */ React.createElement(Newline, null), "* ", /* @__PURE__ */ React.createElement(Text, { backgroundColor: "green" }, "space"), " to scroll.", /* @__PURE__ */ React.createElement(Newline, null), "* ", /* @__PURE__ */ React.createElement(Text, { backgroundColor: "green" }, "escape"), " to stop scrolling.")));
|
|
3636
3640
|
};
|
|
3637
3641
|
|
|
@@ -3743,17 +3747,21 @@ var Start = ({ appName, bcp, fcp, csr, onExit, maxLength = 100 }) => {
|
|
|
3743
3747
|
csr.on("clearScreen", (type) => {
|
|
3744
3748
|
saveLog("clearScreen", type, setCsrLogs);
|
|
3745
3749
|
});
|
|
3746
|
-
|
|
3750
|
+
const destroy = async () => {
|
|
3747
3751
|
bcp.kill();
|
|
3748
3752
|
fcp.kill();
|
|
3749
3753
|
bcp.stdin?.end();
|
|
3750
3754
|
fcp.stdin?.end();
|
|
3751
3755
|
csr.removeAllListeners();
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3756
|
+
await onExit();
|
|
3757
|
+
exit();
|
|
3758
|
+
process.exit(0);
|
|
3759
|
+
};
|
|
3760
|
+
process.on("SIGINT", () => {
|
|
3761
|
+
void destroy();
|
|
3762
|
+
});
|
|
3763
|
+
return () => {
|
|
3764
|
+
void destroy();
|
|
3757
3765
|
};
|
|
3758
3766
|
}, []);
|
|
3759
3767
|
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(Box2, { borderColor: "#ff493b", height, width, flexDirection: "row" }, /* @__PURE__ */ React2.createElement(
|