Skip to content

Commit 41f8720

Browse files
committed
chore: comments LWC
1 parent f864147 commit 41f8720

File tree

3 files changed

+42
-44
lines changed

3 files changed

+42
-44
lines changed

src/commands/omnistudio/migration/assess.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export default class Assess extends OmniStudioBaseCommand {
119119
// Assess related objects if specified
120120
if (relatedObjects) {
121121
// To-Do: Add LWC to valid options when GA is released
122-
const validOptions = [Constants.Apex, Constants.LWC];
122+
const validOptions = [Constants.Apex];
123123
objectsToProcess = relatedObjects.split(',').map((obj) => obj.trim());
124124

125125
// Validate input

src/migration/related/OmnistudioRelatedObjectMigrationFacade.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ import { sfProject } from '../../utils/sfcli/project/sfProject';
99
import { Logger } from '../../utils/logger';
1010
import { Constants } from '../../utils/constants/stringContants';
1111
import { ApexMigration } from './ApexMigration';
12-
import { LwcMigration } from './LwcMigration';
1312

1413
Messages.importMessagesDirectory(__dirname);
1514
const assessMessages = Messages.loadMessages('@salesforce/plugin-omnistudio-migration-tool', 'assess');
1615
const migrateMessages = Messages.loadMessages('@salesforce/plugin-omnistudio-migration-tool', 'migrate');
1716

1817
// TODO: Uncomment code once MVP for migration is completed
19-
const LWCTYPE = 'LightningComponentBundle';
18+
// const LWCTYPE = 'LightningComponentBundle';
2019
const APEXCLASS = 'Apexclass';
2120

2221
const defaultProjectName = 'omnistudio_migration';
@@ -31,7 +30,7 @@ export default class OmnistudioRelatedObjectMigrationFacade {
3130
protected readonly org: Org;
3231
protected readonly projectPath: string;
3332
protected readonly apexMigration: ApexMigration;
34-
protected readonly lwcMigration: LwcMigration;
33+
// protected readonly lwcMigration: LwcMigration;
3534

3635
public constructor(
3736
namespace: string,
@@ -50,7 +49,7 @@ export default class OmnistudioRelatedObjectMigrationFacade {
5049
// Initialize migration instances
5150
this.apexMigration = new ApexMigration(this.projectPath, this.namespace, this.org, targetApexNamespace);
5251
// TODO: Uncomment code once MVP for migration is completed
53-
this.lwcMigration = new LwcMigration(this.projectPath, this.namespace, this.org);
52+
// this.lwcMigration = new LwcMigration(this.projectPath, this.namespace, this.org);
5453
}
5554

5655
private createProject(): string {
@@ -63,7 +62,7 @@ export default class OmnistudioRelatedObjectMigrationFacade {
6362
shell.cd(this.projectPath);
6463
// TODO: Uncomment code once MVP for migration is completed
6564
if (relatedObjects.includes(Constants.LWC)) {
66-
sfProject.retrieve(LWCTYPE, this.org.getUsername());
65+
// sfProject.retrieve(LWCTYPE, this.org.getUsername());
6766
}
6867
if (relatedObjects.includes(Constants.Apex)) {
6968
sfProject.retrieve(APEXCLASS, this.org.getUsername());
@@ -88,7 +87,7 @@ export default class OmnistudioRelatedObjectMigrationFacade {
8887
debugTimer.start();
8988

9089
let apexAssessmentInfos: ApexAssessmentInfo[] = [];
91-
let lwcAssessmentInfos: LWCAssessmentInfo[] = [];
90+
const lwcAssessmentInfos: LWCAssessmentInfo[] = [];
9291

9392
// Proceed with processing logic
9493
try {
@@ -100,14 +99,14 @@ export default class OmnistudioRelatedObjectMigrationFacade {
10099
Logger.error('Error processing related objects', error);
101100
}
102101

103-
try {
104-
if (relatedObjects.includes(Constants.LWC)) {
105-
Logger.logVerbose(migrateMessages.getMessage('startingLwcMigration', [this.projectPath]));
106-
lwcAssessmentInfos = isMigration ? this.lwcMigration.migrate() : this.lwcMigration.assessment();
107-
}
108-
} catch (Error) {
109-
Logger.error(Error.message);
110-
}
102+
// try {
103+
// if (relatedObjects.includes(Constants.LWC)) {
104+
// Logger.logVerbose(migrateMessages.getMessage('startingLwcMigration', [this.projectPath]));
105+
// lwcAssessmentInfos = isMigration ? this.lwcMigration.migrate() : this.lwcMigration.assessment();
106+
// }
107+
// } catch (Error) {
108+
// Logger.error(Error.message);
109+
// }
111110

112111
// Stop the debug timer
113112
const timer = debugTimer.stop();

src/utils/resultsbuilder/assessmentReporter.ts

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { ApexAssessmentReporter } from './ApexAssessmentReporter';
1616
import { IPAssessmentReporter } from './IPAssessmentReporter';
1717
import { DRAssessmentReporter } from './DRAssessmentReporter';
1818
import { FlexcardAssessmentReporter } from './FlexcardAssessmentReporter';
19-
import { LWCAssessmentReporter } from './LWCAssessmentReporter';
2019

2120
export class AssessmentReporter {
2221
private static basePath = path.join(process.cwd(), 'assessment_reports');
@@ -25,7 +24,7 @@ export class AssessmentReporter {
2524
private static integrationProcedureAssessmentFileName = 'integration_procedure_assessment.html';
2625
private static dataMapperAssessmentFileName = 'datamapper_assessment.html';
2726
private static apexAssessmentFileName = 'apex_assessment.html';
28-
private static lwcAssessmentFileName = 'lwc_assessment.html';
27+
// private static lwcAssessmentFileName = 'lwc_assessment.html';
2928
private static dashboardFileName = 'dashboard.html';
3029
private static templateDir = 'templates';
3130
private static dashboardTemplateName = 'dashboard.template';
@@ -83,14 +82,14 @@ export class AssessmentReporter {
8382
)
8483
);
8584

86-
this.createDocument(
87-
path.join(this.basePath, this.lwcAssessmentFileName),
88-
TemplateParser.generate(
89-
assessmentReportTemplate,
90-
LWCAssessmentReporter.getLwcAssessmentData(result.lwcAssessmentInfos, omnistudioOrgDetails),
91-
messages
92-
)
93-
);
85+
// this.createDocument(
86+
// path.join(this.basePath, this.lwcAssessmentFileName),
87+
// TemplateParser.generate(
88+
// assessmentReportTemplate,
89+
// LWCAssessmentReporter.getLwcAssessmentData(result.lwcAssessmentInfos, omnistudioOrgDetails),
90+
// messages
91+
// )
92+
// );
9493

9594
this.createDocument(
9695
path.join(this.basePath, this.integrationProcedureAssessmentFileName),
@@ -199,17 +198,17 @@ export class AssessmentReporter {
199198
);
200199
}
201200

202-
if (relatedObjects && relatedObjects.includes(Constants.LWC)) {
203-
reports.push(Constants.LWC);
204-
this.createDocument(
205-
path.join(this.basePath, this.lwcAssessmentFileName),
206-
TemplateParser.generate(
207-
assessmentReportTemplate,
208-
LWCAssessmentReporter.getLwcAssessmentData(result.lwcAssessmentInfos, omnistudioOrgDetails),
209-
messages
210-
)
211-
);
212-
}
201+
// if (relatedObjects && relatedObjects.includes(Constants.LWC)) {
202+
// reports.push(Constants.LWC);
203+
// this.createDocument(
204+
// path.join(this.basePath, this.lwcAssessmentFileName),
205+
// TemplateParser.generate(
206+
// assessmentReportTemplate,
207+
// LWCAssessmentReporter.getLwcAssessmentData(result.lwcAssessmentInfos, omnistudioOrgDetails),
208+
// messages
209+
// )
210+
// );
211+
// }
213212

214213
// await this.createMasterDocument(nameUrls, basePath);
215214
this.createDashboard(this.basePath, result, omnistudioOrgDetails, messages, reports);
@@ -280,14 +279,14 @@ export class AssessmentReporter {
280279
file: this.apexAssessmentFileName,
281280
});
282281
}
283-
if (reports.includes(Constants.LWC)) {
284-
summaryItems.push({
285-
name: 'Lightning Web Components',
286-
total: result.lwcAssessmentInfos.length,
287-
data: LWCAssessmentReporter.getSummaryData(result.lwcAssessmentInfos),
288-
file: this.lwcAssessmentFileName,
289-
});
290-
}
282+
// if (reports.includes(Constants.LWC)) {
283+
// summaryItems.push({
284+
// name: 'Lightning Web Components',
285+
// total: result.lwcAssessmentInfos.length,
286+
// data: LWCAssessmentReporter.getSummaryData(result.lwcAssessmentInfos),
287+
// file: this.lwcAssessmentFileName,
288+
// });
289+
// }
291290
return {
292291
title: 'Assessment Reports',
293292
heading: 'Assessment Reports',

0 commit comments

Comments
 (0)