Skip to content

Commit fdfc3b6

Browse files
committed
fixed sf cli support
fixed opening log file from the main menu
1 parent aecbfcc commit fdfc3b6

11 files changed

Lines changed: 77 additions & 39 deletions

File tree

js/common/constants.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/models/app-models.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/services/sfdmu-service.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/services/sfdmu-service.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/utils/fs-utils.js

Lines changed: 21 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/utils/fs-utils.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sfdx-data-move-utility-desktop-app",
3-
"version": "4.1.3",
3+
"version": "4.1.4",
44
"description": "SFDMU GUI App",
55
"scripts": {
66
"start": "electron --enable-transparent-visuals --disable-gpu ./js/electron-app/main.js",
@@ -73,7 +73,6 @@
7373
"backupOnApplicationStart": true,
7474
"backupEveryNMinutes": 5,
7575
"useSfCliCommands": true,
76-
"sfdmuRunCommand": "sfdmu:run",
7776
"theme": "cosmo"
7877
}
7978
}

src/common/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export const CONSTANTS = {
155155
/**
156156
* Default API version for Salesforce.
157157
*/
158-
DEFAULT_API_VERSION: '58.0',
158+
DEFAULT_API_VERSION: '59.0',
159159

160160
/**
161161
* Default maximum number of parallel blob downloads.

src/models/app-models.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ export interface IAppConfig {
4747
backupEveryNMinutes: number;
4848
/** Flag indicating whether to use Salesforce CLI commands. */
4949
useSfCliCommands: boolean;
50-
/** Command used for running SFDX Data Import (sfdmu). */
51-
sfdmuRunCommand: string;
5250
/** Theme to use for the application. */
5351
theme: string;
5452

src/services/sfdmu-service.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ export class SfdmuService {
715715
} else if (targetField) {
716716
sObjectDescribe.fieldsMap.set(targetField.name, targetField);
717717
targetField.dataSource = DataSource.target;
718-
}
718+
}
719719
});
720720
}
721721

@@ -724,14 +724,14 @@ export class SfdmuService {
724724
return sObjectDescribe;
725725
}
726726

727-
/**
728-
* Generate CLI command string from CLI JSON.
729-
* @param cliJson The CLI JSON object to generate the command string from.
730-
* @returns The CLI command string.
731-
*/
727+
/**
728+
* Generate CLI command string from CLI JSON.
729+
* @param cliJson The CLI JSON object to generate the command string from.
730+
* @returns The CLI command string.
731+
*/
732732

733-
static generateCLIString(cliJson: any): string {
734-
if (!cliJson){
733+
static generateCLIString(cliJson: any): string {
734+
if (!cliJson) {
735735
return
736736
}
737737
const flagsMap: { [key: string]: string } = {
@@ -759,7 +759,7 @@ export class SfdmuService {
759759

760760
const quote = global.appGlobal.isWindows ? '"' : "'";
761761

762-
let command = "sfdx sfdmu:run";
762+
let command = global.appGlobal.packageJson.appConfig.useSfCliCommands ? "sf sfdmu run" : "sfdx sfdmu:run";
763763

764764
// Logic to handle sourceusername
765765
if (cliJson['sourceusername'] === cliJson['targetusername']) {
@@ -811,30 +811,30 @@ export class SfdmuService {
811811

812812

813813
/**
814-
* Navigates to the specified help article.
815-
* @param searchTerm The search term.
816-
*/
817-
static navigateToHelpArticle(searchTerm: string) {
818-
814+
* Navigates to the specified help article.
815+
* @param searchTerm The search term.
816+
*/
817+
static navigateToHelpArticle(searchTerm: string) {
818+
819819
const encodeUri = (uri) => {
820820
return encodeURIComponent(uri).replace(/%23/g, '#').replace(/%2F/g, '/');
821821
}
822-
822+
823823
const configArticle = Object.keys(HelpArticlesConfig).find(x => x.split(',').includes(searchTerm));
824-
824+
825825
searchTerm = configArticle && HelpArticlesConfig[configArticle] || searchTerm;
826-
826+
827827
if (searchTerm.startsWith('http')) {
828-
FsUtils.navigateToPathOrUrl(searchTerm);
829-
return;
830-
}
831-
if (searchTerm.startsWith('/')) {
832-
FsUtils.navigateToPathOrUrl(`${global.appGlobal.packageJson.appConfig.knowledgebaseUrl}/${encodeUri(searchTerm.substring(1))}`);
833-
return;
834-
}
835-
FsUtils.navigateToPathOrUrl(`${global.appGlobal.packageJson.appConfig.knowledgebaseSearchUrl}${encodeUri(searchTerm)}`);
836-
837-
}
828+
FsUtils.navigateToPathOrUrl(searchTerm);
829+
return;
830+
}
831+
if (searchTerm.startsWith('/')) {
832+
FsUtils.navigateToPathOrUrl(`${global.appGlobal.packageJson.appConfig.knowledgebaseUrl}/${encodeUri(searchTerm.substring(1))}`);
833+
return;
834+
}
835+
FsUtils.navigateToPathOrUrl(`${global.appGlobal.packageJson.appConfig.knowledgebaseSearchUrl}${encodeUri(searchTerm)}`);
836+
837+
}
838838

839839

840840
}

0 commit comments

Comments
 (0)