@robinmordasiewicz/f5xc-xcsh 1.0.82-2601010045 → 1.0.82-2601010623
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/index.js +27 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43592,8 +43592,8 @@ var Ink = class {
|
|
|
43592
43592
|
unsubscribeExit = () => {
|
|
43593
43593
|
};
|
|
43594
43594
|
calculateLayout = () => {
|
|
43595
|
-
const
|
|
43596
|
-
this.rootNode.yogaNode.setWidth(
|
|
43595
|
+
const terminalWidth2 = this.options.stdout.columns || 80;
|
|
43596
|
+
this.rootNode.yogaNode.setWidth(terminalWidth2);
|
|
43597
43597
|
this.rootNode.yogaNode.calculateLayout(void 0, void 0, src_default.DIRECTION_LTR);
|
|
43598
43598
|
};
|
|
43599
43599
|
onRender = () => {
|
|
@@ -45392,8 +45392,8 @@ function getLogoModeFromEnv(envPrefix) {
|
|
|
45392
45392
|
var CLI_NAME = "xcsh";
|
|
45393
45393
|
var CLI_FULL_NAME = "F5 Distributed Cloud Shell";
|
|
45394
45394
|
function getVersion() {
|
|
45395
|
-
if ("v1.0.82-
|
|
45396
|
-
return "v1.0.82-
|
|
45395
|
+
if ("v1.0.82-2601010623") {
|
|
45396
|
+
return "v1.0.82-2601010623";
|
|
45397
45397
|
}
|
|
45398
45398
|
if (process.env.XCSH_VERSION) {
|
|
45399
45399
|
return process.env.XCSH_VERSION;
|
|
@@ -46167,6 +46167,17 @@ function shouldUseColors(isTTY = process.stdout.isTTY ?? false, noColorFlag = fa
|
|
|
46167
46167
|
return isTTY;
|
|
46168
46168
|
}
|
|
46169
46169
|
|
|
46170
|
+
// src/output/terminal.ts
|
|
46171
|
+
var DEFAULT_WIDTH = 80;
|
|
46172
|
+
var MIN_WIDTH = 40;
|
|
46173
|
+
var terminalWidth = process.stdout.columns ?? DEFAULT_WIDTH;
|
|
46174
|
+
function getTerminalWidth() {
|
|
46175
|
+
return Math.max(terminalWidth, MIN_WIDTH);
|
|
46176
|
+
}
|
|
46177
|
+
function setTerminalWidth(width) {
|
|
46178
|
+
terminalWidth = Math.max(width, MIN_WIDTH);
|
|
46179
|
+
}
|
|
46180
|
+
|
|
46170
46181
|
// src/output/table.ts
|
|
46171
46182
|
var UNICODE_BOX = {
|
|
46172
46183
|
topLeft: "\u256D",
|
|
@@ -46297,7 +46308,12 @@ function formatBeautifulTable(data, config, noColor = false) {
|
|
|
46297
46308
|
const style = useColors ? config.style ?? DEFAULT_TABLE_STYLE : PLAIN_TABLE_STYLE;
|
|
46298
46309
|
const box = getBoxCharacters(style);
|
|
46299
46310
|
const borderColor = style.borderColor ?? colors.red;
|
|
46300
|
-
const
|
|
46311
|
+
const effectiveMaxWidth = config.maxWidth ?? getTerminalWidth();
|
|
46312
|
+
const widths = calculateColumnWidths(
|
|
46313
|
+
config.columns,
|
|
46314
|
+
data,
|
|
46315
|
+
effectiveMaxWidth
|
|
46316
|
+
);
|
|
46301
46317
|
const lines = [];
|
|
46302
46318
|
const colorBorder = (text) => applyColor(text, borderColor, useColors && style.coloredBorders);
|
|
46303
46319
|
const buildHorizontalLine = (left, mid, right, fill) => {
|
|
@@ -53409,9 +53425,14 @@ function App2({ initialSession } = {}) {
|
|
|
53409
53425
|
(0, import_react28.useEffect)(() => {
|
|
53410
53426
|
const handleResize = () => {
|
|
53411
53427
|
if (stdout) {
|
|
53412
|
-
|
|
53428
|
+
const newWidth = stdout.columns ?? 80;
|
|
53429
|
+
setWidth(newWidth);
|
|
53430
|
+
setTerminalWidth(newWidth);
|
|
53413
53431
|
}
|
|
53414
53432
|
};
|
|
53433
|
+
if (stdout) {
|
|
53434
|
+
setTerminalWidth(stdout.columns ?? 80);
|
|
53435
|
+
}
|
|
53415
53436
|
stdout?.on("resize", handleResize);
|
|
53416
53437
|
return () => {
|
|
53417
53438
|
stdout?.off("resize", handleResize);
|