Skip to content

Commit 6ebe4d1

Browse files
committed
fix: bump oclif/table
1 parent 334be37 commit 6ebe4d1

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@inquirer/confirm": "^3.1.22",
4747
"@inquirer/password": "^2.2.0",
4848
"@oclif/core": "^4.0.27",
49-
"@oclif/table": "^0.2.1",
49+
"@oclif/table": "^0.2.2",
5050
"@salesforce/core": "^8.5.1",
5151
"@salesforce/kit": "^3.2.3",
5252
"@salesforce/ts-types": "^2.0.12",

src/ux/ux.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ export class Ux extends UxBase {
9999
return defaultStyle;
100100
};
101101

102+
const overflowOptions = ['wrap', 'truncate', 'truncate-middle', 'truncate-start', 'truncate-end'];
103+
const determineOverflow = (): TableOptions<T>['overflow'] => {
104+
const envVar = env.getString('SF_TABLE_OVERFLOW');
105+
if (envVar && overflowOptions.includes(envVar)) {
106+
return envVar as TableOptions<T>['overflow'];
107+
}
108+
109+
return options.overflow;
110+
};
111+
102112
this.maybeNoop(() =>
103113
printTable({
104114
...options,
@@ -109,6 +119,7 @@ export class Ux extends UxBase {
109119
...options.headerOptions,
110120
formatter: 'capitalCase',
111121
},
122+
overflow: determineOverflow(),
112123
})
113124
);
114125
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,10 +582,10 @@
582582
wordwrap "^1.0.0"
583583
wrap-ansi "^7.0.0"
584584

585-
"@oclif/table@^0.2.1":
586-
version "0.2.1"
587-
resolved "https://registry.yarnpkg.com/@oclif/table/-/table-0.2.1.tgz#99462f914638cd70325e6bb9a1510fc5fef4a903"
588-
integrity sha512-RdznMxghWq6AcZQkT0+lvUFYstyThJlyYxlJPJxunTCrPvkJXhcTDh0eUttLmjaNhqhGWaxZHXlgsga5Ecs/AQ==
585+
"@oclif/table@^0.2.2":
586+
version "0.2.2"
587+
resolved "https://registry.yarnpkg.com/@oclif/table/-/table-0.2.2.tgz#057f1f86c51a5a4239dbd0a71d3fe4056d8d95f5"
588+
integrity sha512-wKWkPcZ00k3v1ZgaX0MB1LR1HR227ZtFv/zgElGwVSTvvRLe1r5VHple7nmZA+7zJkRO7ko09IPUlxezDu2D3A==
589589
dependencies:
590590
"@oclif/core" "^4"
591591
"@types/react" "^18.3.11"

0 commit comments

Comments
 (0)