Skip to content

Commit

Permalink
fix(deps): devScripts update for oclif/core-4 (#603)
Browse files Browse the repository at this point in the history
* chore: updates from devScripts

* refactor: ux => Ux

---------

Co-authored-by: mshanemc <[email protected]>
  • Loading branch information
svc-cli-bot and mshanemc authored Jun 6, 2024
1 parent b115c53 commit 1ade07b
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 51 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"author": "Salesforce",
"bugs": "https://github.com/forcedotcom/cli/issues",
"dependencies": {
"@oclif/core": "^3.26.2",
"@oclif/core": "^4",
"@salesforce/core": "^7.3.8",
"@salesforce/kit": "^3.1.2",
"@salesforce/sf-plugins-core": "^9.0.12",
"@salesforce/sf-plugins-core": "^10.0.0",
"chalk": "^5.3.0",
"change-case": "^5.4.4"
},
"devDependencies": {
"@oclif/plugin-command-snapshot": "^5.2.0",
"@salesforce/cli-plugins-testkit": "^5.3.4",
"@salesforce/dev-scripts": "^9.1.3",
"@salesforce/dev-scripts": "^10.1.0",
"@salesforce/plugin-command-reference": "^3.0.89",
"@salesforce/ts-types": "^2.0.9",
"@types/chai-as-promised": "^7.1.8",
Expand Down
10 changes: 5 additions & 5 deletions src/shared/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { ux } from '@oclif/core';
import { Ux } from '@salesforce/sf-plugins-core';
import { Connection, SfError, Messages } from '@salesforce/core';
import { capitalCase } from 'change-case';

Expand All @@ -17,7 +17,7 @@ export type OrgSnapshotRequest = {
SnapshotName: string;
Description: string;
Content?: string;
}
};

export type OrgSnapshot = OrgSnapshotRequest & {
Id: string;
Expand Down Expand Up @@ -104,7 +104,7 @@ export const queryByNameOrId = async (conn: Connection, nameOrId: string): Promi
};

export const printSingleRecordTable = (snapshotRecord: OrgSnapshot): void => {
ux.table(
new Ux().table(
Object.entries(snapshotRecord)
.filter(([key]) => key !== 'attributes')
// remove empty error field
Expand All @@ -123,11 +123,11 @@ export const printSingleRecordTable = (snapshotRecord: OrgSnapshot): void => {

export const printRecordTable = (snapshotRecords: OrgSnapshot[]): void => {
if (snapshotRecords.length === 0) {
ux.log('No snapshots found');
new Ux().log('No snapshots found');
return;
}

ux.table(
new Ux().table(
// we know what columns we want, so filter out the other fields
snapshotRecords.map((s) =>
Object.fromEntries(Object.entries(s).filter(([key]) => Object.keys(ORG_SNAPSHOT_COLUMNS).includes(key)))
Expand Down
Loading

0 comments on commit 1ade07b

Please sign in to comment.