Skip to content

Commit 50819f3

Browse files
committed
feat: addressed comments
1 parent 903d777 commit 50819f3

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/utils/file/fileutil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export function pushAssestUtilites(folderName: string, destDir: string): void {
161161
const sourceDir = path.join(process.cwd(), 'src', folderName);
162162

163163
if (!fs.existsSync(destDir)) {
164-
// Destination directory does not exist. Skipping file copy.
164+
Logger.logger.warn(`Destination directory does not exist: ${destDir}`);
165165
return;
166166
}
167167

src/utils/resultsbuilder/index.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
import { OmnistudioOrgDetails } from '../orgUtils';
2121

2222
const resultsDir = process.cwd() + '/migration_report';
23-
const dataRaptorConstants = { componentName: 'DataMappers', title: 'Data Mappers Migration Result' };
23+
const dataMapperConstants = { componentName: 'DataMappers', title: 'Data Mappers Migration Result' };
2424
const flexCardConstants = { componentName: 'FlexCards', title: 'Flex Cards Migration Result' };
2525
const omniScriptConstants = {
2626
componentName: 'OmniScript___Integration_Procedures',
@@ -177,14 +177,13 @@ export class ResultsBuilder {
177177

178178
private static getResultConstant(resultName: string): { componentName: string; title: string } {
179179
switch (resultName.replace(/ /g, '_').replace(/\//g, '_')) {
180-
case dataRaptorConstants.componentName:
181-
return dataRaptorConstants;
180+
case dataMapperConstants.componentName:
181+
return dataMapperConstants;
182182
case flexCardConstants.componentName:
183183
return flexCardConstants;
184184
case omniScriptConstants.componentName:
185185
return omniScriptConstants;
186186
}
187-
// log error
188187
return { componentName: resultName.toLowerCase().replace(/ /g, '_'), title: resultName };
189188
}
190189

@@ -199,7 +198,7 @@ export class ResultsBuilder {
199198
value: orgDetails.orgDetails.Id,
200199
},
201200
{
202-
key: 'Package Name',
201+
key: 'Namespace',
203202
value: orgDetails.packageDetails[0].namespace,
204203
},
205204
{
@@ -219,7 +218,7 @@ export class ResultsBuilder {
219218
resultConstants: { componentName: string; title: string },
220219
orgDetails: OmnistudioOrgDetails
221220
): void {
222-
// this.ux.log('Generating report for result: ' + result.name);
221+
this.logger.info(`Generating report for result: ${result.name}`);
223222
let tablebody = '';
224223
const headerColumns: HeaderColumn[] = [
225224
{
@@ -324,7 +323,7 @@ export class ResultsBuilder {
324323
},
325324
];
326325

327-
// this.ux.log('Generating table body for result: ' + result.name);
326+
this.logger.info(`Generating table body for result: ${result.name}`);
328327
tablebody = generateHtmlTable(
329328
headerColumns,
330329
columns,
@@ -336,7 +335,7 @@ export class ResultsBuilder {
336335
undefined,
337336
false
338337
);
339-
// this.ux.log('Table body generated for result: ' + result.name);
338+
this.logger.info(`Table body generated for result: ${result.name}`);
340339
const html = `<html>${this.createHeadWithScript(
341340
`${resultConstants.title} Migration Report`
342341
)}<body><div class="slds-m-around_medium"><div class="slds-text-heading_large">${

0 commit comments

Comments
 (0)