Skip to content
This repository was archived by the owner on Nov 5, 2023. It is now read-only.

Commit af8592a

Browse files
author
Mohith Shrivastava
committed
improve display icons
1 parent 2cba4a6 commit af8592a

File tree

8 files changed

+36
-36
lines changed

8 files changed

+36
-36
lines changed

src/commands/deploy/apex.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ export default class ApexDeploy extends SfdxCommand {
7171
try {
7272
const apexSaveResult = await conn.tooling.sobject('ApexClass').create(apexClass) as SobjectResult;
7373
if ( apexSaveResult.success) {
74-
this.ux.stopSpinner(chalk.bold.green('Apex Class Successfully Created'));
74+
this.ux.stopSpinner(chalk.bold.green('Apex Class Successfully Created'));
7575
} else {
7676
this.ux.table(apexSaveResult.errors);
77-
this.ux.stopSpinner(chalk.bold.red('Apex Class Creation Failed'));
77+
this.ux.stopSpinner(chalk.bold.red('Apex Class Creation Failed ×'));
7878
}
7979
return apexSaveResult as any ; // tslint:disable-line:no-any
8080
} catch (ex) {
8181
displaylog(chalk.bold.red(ex), this.ux);
82-
this.ux.stopSpinner(chalk.bold.red('Apex Class Creation Failed'));
82+
this.ux.stopSpinner(chalk.bold.red('Apex Class Creation Failed ×'));
8383
}
8484
}
8585
}
@@ -89,15 +89,15 @@ export default class ApexDeploy extends SfdxCommand {
8989
const deployAction = new Deploy('ApexContainer', 'ApexClassMember', classId, filebody, conn);
9090
const deployResult = await deployAction.deployMetadata() as DeployResult;
9191
if (deployResult.success) {
92-
this.ux.stopSpinner(chalk.bold.greenBright('Apex Class Successfully Updated'));
92+
this.ux.stopSpinner(chalk.bold.greenBright('Apex Class Successfully Updated'));
9393
} else {
9494
if (deployResult.queryResult.records.length > 0 && deployResult.queryResult.records[0].DeployDetails.componentFailures.length > 0) {
9595
display(deployResult, this.ux);
9696
}
9797
if (typeof deployResult.error !== 'undefined') {
9898
displaylog(chalk.bold.redBright(deployResult.error), this.ux);
9999
}
100-
this.ux.stopSpinner(chalk.bold.redBright('Apex Class Update Failed'));
100+
this.ux.stopSpinner(chalk.bold.redBright('Apex Class Update Failed'));
101101
}
102102
return deployResult;
103103
}

src/commands/deploy/aura.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ export default class AuraDeploy extends SfdxCommand {
110110
auraDefinitions = auraDefinitions.length > 0 ? auraDefinitions : [];
111111
try {
112112
await upsertAuraDefinition(auraDefinitions, fileBodyArray, auraDefinitionBundles[0].Id);
113-
this.ux.stopSpinner(chalk.bold.greenBright('AuraBundle Deployed SuccessFully..'));
113+
this.ux.stopSpinner(chalk.bold.greenBright('AuraBundle Deployed SuccessFully'));
114114
} catch (exception) {
115-
this.ux.stopSpinner(chalk.bold.redBright('Aura Component Save Failed'));
115+
this.ux.stopSpinner(chalk.bold.redBright('Aura Component Save Failed'));
116116
displaylog(exception, this.ux);
117117
}
118118
}
119119
} catch (exception) {
120-
this.ux.stopSpinner(chalk.bold.redBright('Aura Component Save Failed'));
120+
this.ux.stopSpinner(chalk.bold.redBright('Aura Component Save Failed'));
121121
displaylog(exception, this.ux);
122122
}
123123

src/commands/deploy/lwc.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ export default class LWCDeploy extends SfdxCommand {
123123
lwcResources = lwcResources.length > 0 ? lwcResources : [];
124124
try {
125125
await upsertLWCDefinition(lwcResources, fileBodyArray, lwcBundles[0].Id);
126-
this.ux.stopSpinner(chalk.bold.greenBright('Lighnting Web Components Deployed SuccessFully'));
126+
this.ux.stopSpinner(chalk.bold.greenBright('Lighnting Web Components Deployed SuccessFully'));
127127
// console.log(auraDefinitionsResult);
128128
} catch (exception) {
129-
this.ux.stopSpinner(chalk.bold.redBright('Failed'));
129+
this.ux.stopSpinner(chalk.bold.redBright('Failed'));
130130
displaylog(chalk.bold.redBright(exception), this.ux);
131131
}
132132
}
133133
} catch (exception) {
134-
this.ux.stopSpinner(chalk.bold.redBright('Failed'));
134+
this.ux.stopSpinner(chalk.bold.redBright('Failed'));
135135
displaylog(chalk.bold.redBright(exception), this.ux);
136136
}
137137

src/commands/deploy/trigger.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ export default class TriggerDeploy extends SfdxCommand {
6565
const deployAction = new Deploy('TriggerContainer', 'ApexTriggerMember' , triggerId , filebody, conn);
6666
const deployResult = await deployAction.deployMetadata() as DeployResult;
6767
if (deployResult.success) {
68-
this.ux.stopSpinner(chalk.bold.greenBright('Trigger Successfully Updated'));
68+
this.ux.stopSpinner(chalk.bold.greenBright('Trigger Successfully Updated'));
6969
return '';
7070
} else {
7171
if (deployResult.queryResult.records.length > 0 && deployResult.queryResult.records[0].DeployDetails.componentFailures.length > 0) {
7272
display(deployResult, this.ux);
7373
}
74-
this.ux.stopSpinner(chalk.bold.redBright('Trigger Update Failed'));
74+
this.ux.stopSpinner(chalk.bold.redBright('Trigger Update Failed'));
7575
if ( typeof deployResult.error !== 'undefined' ) {
7676
console.log(chalk.bold.redBright(deployResult.error));
7777
}
@@ -88,11 +88,11 @@ export default class TriggerDeploy extends SfdxCommand {
8888
try {
8989
const triggerResult = await conn.tooling.sobject('ApexTrigger').create(apexTrigger) as SobjectResult;
9090
if ( triggerResult.success) {
91-
this.ux.stopSpinner(chalk.bold.green('Trigger Successfully Created'));
91+
this.ux.stopSpinner(chalk.bold.green('Trigger Successfully Created'));
9292
return '';
9393
} else {
9494
this.ux.table(triggerResult.errors);
95-
this.ux.stopSpinner(chalk.bold.red('Trigger Creation Failed'));
95+
this.ux.stopSpinner(chalk.bold.red('Trigger Creation Failed'));
9696
}
9797
} catch (ex) {
9898
this.ux.stopSpinner(chalk.bold.red(ex));

src/commands/deploy/vf.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ export default class VfDeploy extends SfdxCommand {
6565
const deployAction = new Deploy('VfContainer', 'ApexPageMember' , pageId , filebody, conn);
6666
const deployResult = await deployAction.deployMetadata() as DeployResult;
6767
if (deployResult.success) {
68-
this.ux.stopSpinner(chalk.bold.greenBright('Visualforce Page Successfully Updated'));
68+
this.ux.stopSpinner(chalk.bold.greenBright('Visualforce Page Successfully Updated'));
6969
return '';
7070
} else {
7171
display(deployResult, this.ux);
72-
this.ux.stopSpinner(chalk.bold.redBright('Visualforce Page Update Failed'));
72+
this.ux.stopSpinner(chalk.bold.redBright('Visualforce Page Update Failed'));
7373
if ( typeof deployResult.error !== 'undefined' ) {
7474
displaylog(chalk.bold.redBright(deployResult.error), this.ux);
7575
}
@@ -86,17 +86,17 @@ export default class VfDeploy extends SfdxCommand {
8686
try {
8787
const vfSaveResult = await conn.tooling.sobject('ApexPage').create(vfPage) as SobjectResult;
8888
if ( vfSaveResult.success) {
89-
this.ux.stopSpinner(chalk.bold.green('Visualforce Page Successfully Created'));
89+
this.ux.stopSpinner(chalk.bold.green('Visualforce Page Successfully Created'));
9090
return '';
9191
} else {
9292
for (const error of vfSaveResult.errors) {
9393
displaylog(chalk.redBright(error), this.ux);
9494
}
95-
this.ux.stopSpinner(chalk.bold.red('Visualforce Page Creation Failed'));
95+
this.ux.stopSpinner(chalk.bold.red('Visualforce Page Creation Failed'));
9696
}
9797
} catch (ex) {
9898
displaylog(chalk.redBright(ex), this.ux);
99-
this.ux.stopSpinner(chalk.bold.red('Visualforce Page Creation Failed'));
99+
this.ux.stopSpinner(chalk.bold.red('Visualforce Page Creation Failed'));
100100
}
101101
}
102102
}

src/commands/deploy/vfcomponent.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ export default class ApexComponentDeploy extends SfdxCommand {
6565
const deployAction = new Deploy('VfComponent', 'ApexComponentMember' , apexPageComponentId , filebody, conn);
6666
const deployResult = await deployAction.deployMetadata() as DeployResult;
6767
if (deployResult.success) {
68-
this.ux.stopSpinner(chalk.bold.greenBright('Visualforce Component Successfully Updated'));
68+
this.ux.stopSpinner(chalk.bold.greenBright('Visualforce Component Successfully Updated'));
6969
return '';
7070
} else {
7171
display(deployResult, this.ux);
72-
this.ux.stopSpinner(chalk.bold.redBright('Visualforce Component Update Failed'));
72+
this.ux.stopSpinner(chalk.bold.redBright('Visualforce Component Update Failed'));
7373
if ( typeof deployResult.error !== 'undefined' ) {
7474
displaylog(chalk.bold.redBright(deployResult.error), this.ux);
7575
}
@@ -86,17 +86,17 @@ export default class ApexComponentDeploy extends SfdxCommand {
8686
try {
8787
const vfComponentSaveResult = await conn.tooling.sobject('ApexComponent').create(vfComponent) as SobjectResult;
8888
if ( vfComponentSaveResult.success) {
89-
this.ux.stopSpinner(chalk.bold.green('Visualforce Component Successfully Created'));
89+
this.ux.stopSpinner(chalk.bold.green('Visualforce Component Successfully Created'));
9090
return '';
9191
} else {
9292
for (const error of vfComponentSaveResult.errors) {
9393
displaylog(chalk.redBright(error), this.ux);
9494
}
95-
this.ux.stopSpinner(chalk.bold.red('Visualforce Component Creation Failed'));
95+
this.ux.stopSpinner(chalk.bold.red('Visualforce Component Creation Failed'));
9696
}
9797
} catch (ex) {
9898
displaylog(ex, this.ux);
99-
this.ux.stopSpinner(chalk.bold.red('Vf Component Save Failed'));
99+
this.ux.stopSpinner(chalk.bold.red('Vf Component Save Failed'));
100100
}
101101
}
102102
}

src/commands/retrieve/dxsource.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default class DxSource extends SfdxCommand {
7878

7979
if (!errored) {
8080
this.ux.stopSpinner(
81-
chalk.greenBright('Retrieve Completed. Unzipping...')
81+
chalk.greenBright('Retrieve Completed. Unzipping...')
8282
);
8383
// unzip result to a temp folder mdapi
8484
if (process.platform.includes('darwin')) {
@@ -98,7 +98,7 @@ export default class DxSource extends SfdxCommand {
9898
// Prepare folder and directory for DX Conversion
9999
this.ux.startSpinner(
100100
chalk.yellowBright(
101-
'Unzip Completed. Converting To DX Source Format...'
101+
'Unzip Completed. Converting To DX Source Format...'
102102
)
103103
);
104104
if (process.platform.includes('darwin')) {
@@ -123,23 +123,23 @@ export default class DxSource extends SfdxCommand {
123123
`sfdx force:mdapi:convert -r ./${tmpDir} -d ${target} --json`
124124
);
125125
this.ux.stopSpinner(
126-
chalk.greenBright('Done Converting mdapi to DX format.....')
126+
chalk.greenBright('Done Converting mdapi to DX format')
127127
);
128128
} catch (err) {
129129
this.ux.errorJson(err);
130-
this.ux.error(chalk.redBright('Error from conversion'));
130+
this.ux.error(chalk.redBright('Error from conversion'));
131131
}
132132
if (!this.flags.retainmetadata) {
133133
this.ux.startSpinner(
134-
chalk.blueBright('Cleaning Unused Directory Started')
134+
chalk.blueBright('Cleaning Unused Directory Started')
135135
);
136136
if (process.platform.includes('darwin')) {
137137
await exec(`rm -rf ./${tmpDir}`);
138138
} else {
139139
fs.removeSync(`./${tmpDir}`);
140140
}
141141
}
142-
this.ux.stopSpinner(chalk.greenBright('Finished.'));
142+
this.ux.stopSpinner(chalk.greenBright('Finished'));
143143
}
144144

145145
return '';

src/commands/retrieve/pkgsource.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ export default class Pkgsource extends SfdxCommand {
5454
} catch (exception) {
5555
errored = true;
5656
this.ux.errorJson(exception);
57-
this.ux.stopSpinner(chalk.redBright('Retrieve Operation Failed.'));
57+
this.ux.stopSpinner(chalk.redBright('Retrieve Operation Failed'));
5858
}
5959

6060
if (!errored) {
6161
this.ux.stopSpinner(
62-
chalk.greenBright('Retrieve Completed. Unzipping...')
62+
chalk.greenBright('Retrieve Completed. Unzipping...')
6363
);
6464
// unzip result to a temp folder mdapi
6565
if (process.platform.includes('darwin')) {
@@ -70,14 +70,14 @@ export default class Pkgsource extends SfdxCommand {
7070
const zip = new AdmZip('./' + tmpDir + '/unpackaged.zip');
7171
await zip.extractAllTo('./' + tmpDir, true);
7272
} catch (error) {
73-
console.error(chalk.redBright(error));
73+
console.error(chalk.redBright(error + '✖'));
7474
return;
7575
}
7676
}
7777

78-
this.ux.startSpinner(chalk.yellowBright('Unzip Completed.'));
78+
this.ux.startSpinner(chalk.yellowBright('Unzip Completed'));
7979
await fs.unlink('./' + tmpDir + '/unpackaged.zip');
80-
this.ux.stopSpinner(chalk.greenBright('Finished.'));
80+
this.ux.stopSpinner(chalk.greenBright('Finished'));
8181
}
8282

8383
return '';

0 commit comments

Comments
 (0)