Skip to content

Commit 5b6d486

Browse files
committed
fix: update new tables for recordCounts and limits
1 parent 43db7c4 commit 5b6d486

File tree

4 files changed

+283
-12
lines changed

4 files changed

+283
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"bugs": "https://github.com/forcedotcom/cli/issues",
77
"dependencies": {
88
"@salesforce/core": "^8.5.7",
9-
"@salesforce/sf-plugins-core": "^11.3.12"
9+
"@salesforce/sf-plugins-core": "^12"
1010
},
1111
"devDependencies": {
1212
"@oclif/core": "^4.0.28",

src/commands/org/list/limits.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type Result = {
2727
Max: number;
2828
Remaining: number;
2929
};
30-
}
30+
};
3131

3232
export type ApiLimits = ApiLimit[];
3333

@@ -54,7 +54,10 @@ export class LimitsApiDisplayCommand extends SfCommand<ApiLimits> {
5454
remaining: Remaining,
5555
}));
5656

57-
this.table(limits, { name: { header: 'Name' }, remaining: { header: 'Remaining' }, max: { header: 'Max' } });
57+
this.table({
58+
data: limits,
59+
columns: ['name', 'remaining', 'max'],
60+
});
5861

5962
return limits;
6063
} catch (err) {

src/commands/org/list/sobject/record-counts.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export type RecordCounts = RecordCount[];
2626

2727
type Result = {
2828
sObjects: RecordCounts;
29-
}
29+
};
3030

3131
export class LimitsRecordCountsDisplayCommand extends SfCommand<RecordCounts> {
3232
public static readonly aliases = ['force:limits:recordcounts:display', 'limits:recordcounts:display'];
@@ -59,10 +59,20 @@ export class LimitsRecordCountsDisplayCommand extends SfCommand<RecordCounts> {
5959
.filter((record) => (flags.sobject.length > 0 ? flags.sobject.includes(record.name) : result.sObjects))
6060
.sort((a, b) => a.name.localeCompare(b.name));
6161

62-
this.table(recordCounts, {
63-
name: { header: 'sObject' },
64-
count: { header: 'Record Count' },
62+
this.table({
63+
data: recordCounts,
64+
columns: [
65+
{
66+
key: 'name',
67+
name: 'sObject',
68+
},
69+
{
70+
key: 'count',
71+
name: 'Record Count',
72+
},
73+
],
6574
});
75+
6676
return recordCounts;
6777
} catch (err) {
6878
if (err instanceof Error || typeof err === 'string') {

0 commit comments

Comments
 (0)