@robinmordasiewicz/f5xc-xcsh 1.0.82-2601010045 → 1.0.82-2601010633

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 +33 -8
  2. 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 terminalWidth = this.options.stdout.columns || 80;
43596
- this.rootNode.yogaNode.setWidth(terminalWidth);
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-2601010045") {
45396
- return "v1.0.82-2601010045";
45395
+ if ("v1.0.82-2601010633") {
45396
+ return "v1.0.82-2601010633";
45397
45397
  }
45398
45398
  if (process.env.XCSH_VERSION) {
45399
45399
  return process.env.XCSH_VERSION;
@@ -45454,6 +45454,9 @@ function colorRed(text) {
45454
45454
  function colorBoldWhite(text) {
45455
45455
  return `${colors.boldWhite}${text}${colors.reset}`;
45456
45456
  }
45457
+ function colorBlue(text) {
45458
+ return `${colors.blue}${text}${colors.reset}`;
45459
+ }
45457
45460
  function colorDim(text) {
45458
45461
  return `${colors.dim}${text}${colors.reset}`;
45459
45462
  }
@@ -46167,6 +46170,17 @@ function shouldUseColors(isTTY = process.stdout.isTTY ?? false, noColorFlag = fa
46167
46170
  return isTTY;
46168
46171
  }
46169
46172
 
46173
+ // src/output/terminal.ts
46174
+ var DEFAULT_WIDTH = 80;
46175
+ var MIN_WIDTH = 40;
46176
+ var terminalWidth = process.stdout.columns ?? DEFAULT_WIDTH;
46177
+ function getTerminalWidth() {
46178
+ return Math.max(terminalWidth, MIN_WIDTH);
46179
+ }
46180
+ function setTerminalWidth(width) {
46181
+ terminalWidth = Math.max(width, MIN_WIDTH);
46182
+ }
46183
+
46170
46184
  // src/output/table.ts
46171
46185
  var UNICODE_BOX = {
46172
46186
  topLeft: "\u256D",
@@ -46297,7 +46311,12 @@ function formatBeautifulTable(data, config, noColor = false) {
46297
46311
  const style = useColors ? config.style ?? DEFAULT_TABLE_STYLE : PLAIN_TABLE_STYLE;
46298
46312
  const box = getBoxCharacters(style);
46299
46313
  const borderColor = style.borderColor ?? colors.red;
46300
- const widths = calculateColumnWidths(config.columns, data, config.maxWidth);
46314
+ const effectiveMaxWidth = config.maxWidth ?? getTerminalWidth();
46315
+ const widths = calculateColumnWidths(
46316
+ config.columns,
46317
+ data,
46318
+ effectiveMaxWidth
46319
+ );
46301
46320
  const lines = [];
46302
46321
  const colorBorder = (text) => applyColor(text, borderColor, useColors && style.coloredBorders);
46303
46322
  const buildHorizontalLine = (left, mid, right, fill) => {
@@ -48274,7 +48293,7 @@ var REPLSession = class {
48274
48293
 
48275
48294
  // src/repl/prompt.ts
48276
48295
  function buildPlainPrompt(_session) {
48277
- return "> ";
48296
+ return `${CLI_NAME}> `;
48278
48297
  }
48279
48298
 
48280
48299
  // src/repl/App.tsx
@@ -53409,9 +53428,14 @@ function App2({ initialSession } = {}) {
53409
53428
  (0, import_react28.useEffect)(() => {
53410
53429
  const handleResize = () => {
53411
53430
  if (stdout) {
53412
- setWidth(stdout.columns ?? 80);
53431
+ const newWidth = stdout.columns ?? 80;
53432
+ setWidth(newWidth);
53433
+ setTerminalWidth(newWidth);
53413
53434
  }
53414
53435
  };
53436
+ if (stdout) {
53437
+ setTerminalWidth(stdout.columns ?? 80);
53438
+ }
53415
53439
  stdout?.on("resize", handleResize);
53416
53440
  return () => {
53417
53441
  stdout?.off("resize", handleResize);
@@ -53469,7 +53493,8 @@ function App2({ initialSession } = {}) {
53469
53493
  async (cmd) => {
53470
53494
  const trimmed = cmd.trim();
53471
53495
  if (!trimmed) return;
53472
- addOutput(prompt + trimmed);
53496
+ const scrollbackCommand = `${colorBlue("\u23FA")} ${colorBoldWhite(prompt + trimmed)}`;
53497
+ addOutput(scrollbackCommand);
53473
53498
  const result = await executeCommand(trimmed, session);
53474
53499
  if (result.rawStdout) {
53475
53500
  setHideStatusBar(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinmordasiewicz/f5xc-xcsh",
3
- "version": "1.0.82-2601010045",
3
+ "version": "1.0.82-2601010633",
4
4
  "description": "F5 Distributed Cloud Shell - Interactive CLI for F5 XC",
5
5
  "type": "module",
6
6
  "bin": {