Skip to content

Commit 789ba0b

Browse files
author
kumar-ankita
committed
resolving comments
1 parent e57c0e3 commit 789ba0b

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

messages/assess.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929
"allVersionsDescription": "Migrate all versions of a component",
3030
"changeMessage": " %s will be changed from %s to %s",
3131
"angularOSWarning": " Angular OmniScript will not be migrated, please convert this to LWC based Omniscript",
32-
"apexLwc": "Specify Apex/LWC migration"
32+
"apexLwc": "Please select the type of components to migrate: 'apex' for server-side logic, 'lwc' for Lightning Web Components, or 'apex,lwc' if you want to include both types."
3333
}

messages/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"sfdx omnistudio:migration:info --name myname --targetusername [email protected]"
99
],
1010
"allVersionsDescription": "Migrate all versions of a component",
11-
"apexLwc": "Specify Apex/LWC migration"
11+
"apexLwc": "Please select the type of components to migrate: 'apex' for server-side logic, 'lwc' for Lightning Web Components, or 'apex,lwc' if you want to include both types."
1212
}

messages/migrate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@
2626
"errorWhileUploadingCard": "An error ocurred while uploading Card: ",
2727
"errorWhileCreatingElements": "An error ocurred while saving OmniScript elements: ",
2828
"allVersionsDescription": "Migrate all versions of a component",
29-
"apexLwc": "Specify Apex/LWC migration"
29+
"apexLwc": "Please select the type of components to migrate: 'apex' for server-side logic, 'lwc' for Lightning Web Components, or 'apex,lwc' if you want to include both types."
3030
}

src/commands/omnistudio/migration/migrate.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default class Migrate extends OmniStudioBaseCommand {
5050
description: messages.getMessage('allVersionsDescription'),
5151
required: false,
5252
}),
53-
relatedObjects: flags.boolean({
53+
relatedObjects: flags.string({
5454
char: 'r',
5555
description: messages.getMessage('apexLwc'),
5656
}),
@@ -86,7 +86,7 @@ export default class Migrate extends OmniStudioBaseCommand {
8686
// Validate input
8787
for (const obj of objectsToProcess) {
8888
if (!validOptions.includes(obj)) {
89-
throw new Error(`Invalid option provided for -r: ${obj}. Valid options are apex, lwc.`);
89+
Logger.logger.warn(`Invalid option provided for -r: ${obj}. Valid options are apex, lwc.`);
9090
}
9191
}
9292
// Ask for user consent
@@ -95,11 +95,11 @@ export default class Migrate extends OmniStudioBaseCommand {
9595
);
9696
if (!consent) {
9797
this.ux.log('User declined consent. Aborting the process.');
98-
return;
98+
} else {
99+
const projectPath = await this.ux.prompt('Enter the project path for processing:');
100+
this.ux.log(`Using project path: ${projectPath}`);
101+
OmnistudioRelatedObjectMigrationFacade.intializeProject(projectPath);
99102
}
100-
const projectPath = await this.ux.prompt('Enter the project path for processing:');
101-
this.ux.log(`Using project path: ${projectPath}`);
102-
OmnistudioRelatedObjectMigrationFacade.intializeProject(projectPath);
103103
}
104104

105105
// const includeLwc = this.flags.lwc ? await this.ux.confirm('Do you want to include LWC migration? (yes/no)') : false;

0 commit comments

Comments
 (0)