Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

Commit bd2b216

Browse files
authored
fix(docs): some typos in documentation and comments (#1433)
* fix(doc): use pnpm instead of npm * fix(doc): readme typos * fix(doc): fix sfpowerscripts-cli path * fix(src): typos in comments
1 parent ab1a369 commit bd2b216

File tree

6 files changed

+50
-51
lines changed

6 files changed

+50
-51
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ A build system for package based development in Salesforce, delivered as a node
2626
- Integrate with any CI/CD system of choice
2727
- All commands are enabled with statsD, for collecting metrics about your pipeline.
2828

29-
There are lot more features to explore. Read more at https://docs.dxatscale.io
29+
There are lot more features to explore. Read more at https://docs.dxatscale.io
3030

31-
The project is delivered as a <b>CLI</b> that can be deployed in any CI/CD system, The module is available in [NPM](https://www.npmjs.com/package/@dxatscale/sfpowerscripts) or can be
31+
The project is delivered as a <b>CLI</b> that can be deployed in any CI/CD system, The module is available in [NPM](https://www.npmjs.com/package/@dxatscale/sfpowerscripts) or can be
3232
used by using the [docker image](https://github.com/dxatscale/sfpowerscripts/pkgs/container/sfpowerscripts)
3333

3434

@@ -51,8 +51,8 @@ Getting started guides for popular CI/CD platforms along with reference pipeline
5151

5252
sfpowerscripts can be installed on your local device using npm
5353

54-
```
55-
npm i -g @dxatscale/sfpowerscripts
54+
```
55+
npm i -g @dxatscale/sfpowerscripts
5656
```
5757

5858

@@ -62,12 +62,12 @@ Docker images for sfpowerscripts are available at [GitHub Container Registry](ht
6262

6363
We recommend using the sfpowerscripts docker image to avoid breakages in your CI/CD pipelines due to updates in sfpowerscripts or any of its dependencies such as the SFDX CLI.
6464

65-
#### Build Instructions
66-
To build sfpowerscripts execute the following on the terminal:
65+
#### Build Instructions
66+
To build sfpowerscripts execute the following on the terminal:
6767
```
6868
npm i -g lerna #Install Lerna Globally
69-
cd <sfpowerscrips directory> # Navigate to the checked out directory
70-
npm i
69+
cd <sfpowerscripts directory> # Navigate to the checked out directory
70+
pnpm i
7171
lerna run build
7272
```
7373

@@ -80,7 +80,7 @@ lerna run test
8080
To debug and test plugin
8181

8282
```
83-
cd sfpowerscripts-cli
83+
cd packages/sfpowerscripts-cli
8484
npm link
8585
```
8686

@@ -91,7 +91,7 @@ List of Maintainers are available in the [link](https://docs.dxatscale.io/about-
9191

9292
#### Where do I reach for queries?
9393

94-
Please create an issue in the repo for bugs or utilize GitHub Discussions for other queries. Join our [Slack Community](https://launchpass.com/dxatscale) as well.
94+
Please create an issue in the repo for bugs or utilize GitHub Discussions for other queries. Join our [Slack Community](https://launchpass.com/dxatscale) as well.
9595

9696

9797
## License
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Migrate sfpowerscripts artifact to utilize custom settings instead of a custom object
22

3-
* Status: Accepted <!-- optional -->
3+
* Status: Accepted <!-- optional -->
44
* Deciders: Azlam, Alan <!-- optional -->
5-
* Date: <!-- optional -->
5+
* Date: <!-- optional -->
66

77
Issue [Issue #476](https://github.com/dxatscale/sfpowerscripts/issues/476) <!-- optional -->
88

@@ -13,11 +13,11 @@ sfpowerscripts artifacts is an unlocked package that keeps track of all the pack
1313
To solve this, these records should be stored in custom settings, which are preserved during refreshes. The cli should support utilising custom settings to store these records with a backward compatibility layer, so that none of the data gets lost while the migration is underway
1414

1515

16-
## Decision
16+
## Decision
1717

1818

19-
This migration will be done in the following manner in the intermiediate release
20-
- CLI commands to check for the existense of sfpowerscripts_artifact_c object and any associate records on every run
19+
This migration will be done in the following manner in the intermediate release
20+
- CLI commands to check for the existence of sfpowerscripts_artifact_c object and any associate records on every run
2121
- If associated records are found, proceed to migrate all the existing records into the newly created custom setting object
2222
- Delete all the records in sfpowerscripts_artifact_c object.
2323
- Utilize custom settings moving forward
@@ -27,9 +27,9 @@ An upgrade to sfpowerscripts_package will be pushed to all the users who are uti
2727
On a subsequent release, the custom object will be deprecated and CLI commands will remove the associated check and migration code
2828

2929

30-
## Conseuqences <!-- optional -->
30+
## Consequences <!-- optional -->
3131

32-
There will be a slight delay during deploy command, as it has to check for the existense. But once this migration is over it will be provide better accuracy and tie it back to the exact version of the package even when the org is refreshed from another one.
32+
There will be a slight delay during deploy command, as it has to check for the existence. But once this migration is over it will be provide better accuracy and tie it back to the exact version of the package even when the org is refreshed from another one.
3333

3434

3535
<!-- markdownlint-disable-file MD013 -->

packages/core/src/deployers/DeploySourceToOrgImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export default class DeploySourceToOrgImpl implements DeploymentExecutor {
184184
return result;
185185
}
186186

187-
//For compatibilty with cli output
187+
//For compatibility with cli output
188188
private formatResultAsJSON(result) {
189189
const response = result?.response ? result.response : {};
190190
return {

packages/core/src/package/packageInstallers/InstallSourcePackageImpl.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default class InstallSourcePackageImpl extends InstallPackage {
4848

4949
// Apply Destructive Manifest
5050
await this.applyDestructiveChanges();
51-
51+
5252

5353
//Apply Reconcile if Profiles are found
5454
//To Reconcile we have to go for multiple deploys, first we have to reconcile profiles and deploy the metadata
@@ -118,7 +118,7 @@ export default class InstallSourcePackageImpl extends InstallPackage {
118118
}
119119

120120
//Check if there are components to be deployed after filtering
121-
//Asssume its suscessfully deployed
121+
//Assume its successfully deployed
122122
if (componentSet.size == 0) {
123123
return {
124124
deploy_id: `000000`,
@@ -132,8 +132,9 @@ export default class InstallSourcePackageImpl extends InstallPackage {
132132
PackageComponentPrinter.printComponentTable(components, this.logger);
133133

134134

135-
if (!this.options.isInstallingForValidation)
135+
if (!this.options.isInstallingForValidation) {
136136
DeploymentOptionDisplayer.printDeploymentOptions(deploymentOptions, this.logger);
137+
}
137138

138139
let deploySourceToOrgImpl: DeploymentExecutor = new DeploySourceToOrgImpl(
139140
this.sfpOrg,
@@ -188,7 +189,7 @@ export default class InstallSourcePackageImpl extends InstallPackage {
188189

189190

190191
if (status.result == 'break') {
191-
throw new Error('No compoments in the package, Please check your build again');
192+
throw new Error('No components in the package, Please check your build again');
192193
} else if (status.result == 'skip') {
193194
return {
194195
isToSkip: true,
@@ -238,7 +239,7 @@ export default class InstallSourcePackageImpl extends InstallPackage {
238239
Either the components are already deleted or there are components which \
239240
have dependency to components in the manifest. \
240241
Please check whether this manifest works! \
241-
Acutal Error Observed: \
242+
Actual Error Observed: \
242243
-------------------------------------- \
243244
${COLOR_ERROR(error.message)}`,
244245
LoggerLevel.INFO,
@@ -325,7 +326,7 @@ export default class InstallSourcePackageImpl extends InstallPackage {
325326
);
326327
await reconcileProfileAgainstOrg.exec();
327328

328-
//Now deploy the profies alone
329+
//Now deploy the profiles alone
329330

330331
const profilesDirs = globSync('**/profiles/', {
331332
cwd: path.join(sourceDirectoryPath, sourceDirectory),

packages/sfpowerscripts-cli/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ A build system for package based development in Salesforce, delivered as a node
2626
- Integrate with any CI/CD system of choice
2727
- All commands are enabled with statsD, for collecting metrics about your pipeline.
2828

29-
There are lot more features to explore. Read more at https://docs.dxatscale.io
29+
There are lot more features to explore. Read more at https://docs.dxatscale.io
3030

31-
The project is delivered as a <b>CLI</b> that can be deployed in any CI/CD system, The module is available in [NPM](https://www.npmjs.com/package/@dxatscale/sfpowerscripts) or can be
31+
The project is delivered as a <b>CLI</b> that can be deployed in any CI/CD system, The module is available in [NPM](https://www.npmjs.com/package/@dxatscale/sfpowerscripts) or can be
3232
used by using the [docker image](https://github.com/dxatscale/sfpowerscripts/pkgs/container/sfpowerscripts)
3333

3434

@@ -51,8 +51,8 @@ Getting started guides for popular CI/CD platforms along with reference pipeline
5151

5252
sfpowerscripts can be installed on your local device using npm
5353

54-
```
55-
npm i -g @dxatscale/sfpowerscripts
54+
```
55+
npm i -g @dxatscale/sfpowerscripts
5656
```
5757

5858

@@ -62,11 +62,11 @@ Docker images for sfpowerscripts are available at [GitHub Container Registry](ht
6262

6363
We recommend using the sfpowerscripts docker image to avoid breakages in your CI/CD pipelines due to updates in sfpowerscripts or any of its dependencies such as the SFDX CLI.
6464

65-
#### Build Instructions
66-
To build sfpowerscripts execute the following on the terminal:
65+
#### Build Instructions
66+
To build sfpowerscripts execute the following on the terminal:
6767
```
6868
npm i -g lerna #Install Lerna Globally
69-
cd <sfpowerscrips directory> # Navigate to the checked out directory
69+
cd <sfpowerscripts directory> # Navigate to the checked out directory
7070
npm i
7171
lerna run build
7272
```
@@ -80,7 +80,7 @@ lerna run test
8080
To debug and test plugin
8181

8282
```
83-
cd sfpowerscripts-cli
83+
cd packages/sfpowerscripts-cli
8484
npm link
8585
```
8686

@@ -91,7 +91,7 @@ List of Maintainers are available in the [link](https://docs.dxatscale.io/about-
9191

9292
#### Where do I reach for queries?
9393

94-
Please create an issue in the repo for bugs or utilize GitHub Discussions for other queries. Join our [Slack Community](https://launchpass.com/dxatscale) as well.
94+
Please create an issue in the repo for bugs or utilize GitHub Discussions for other queries. Join our [Slack Community](https://launchpass.com/dxatscale) as well.
9595

9696

9797
## License

packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ export default class DeployImpl {
100100

101101
//Filter artifacts based on release config
102102
sfpPackages = this.filterSfPPackagesBasedOnReleaseConfig(sfpPackages,this.props.releaseConfigPath,this.props.logger);
103-
103+
104104
//Grab the latest projectConfig from Packages
105105
let sfpPackageInquirer: SfpPackageInquirer = new SfpPackageInquirer(sfpPackages, this.props.logger);
106106
let sfdxProjectConfig = sfpPackageInquirer.getLatestProjectConfig();
107107
if (sfdxProjectConfig == null) {
108-
// If unable to find latest package manfest in artifacts, use package manifest in project directory
108+
// If unable to find latest package manifest in artifacts, use package manifest in project directory
109109
sfdxProjectConfig = ProjectConfig.getSFDXProjectConfig(null);
110110
}
111111

@@ -232,7 +232,7 @@ export default class DeployImpl {
232232
result: PackageInstallationStatus.Failed,
233233
message: error,
234234
};
235-
235+
236236

237237
FileOutputHandler.getInstance().writeOutput(`deployment-error.md`,`### 💣 Deployment Failed 💣`);
238238
FileOutputHandler.getInstance().appendOutput(`deployment-error.md`,`Package Installation failed for **${queue[i].packageName}**`);
@@ -255,7 +255,7 @@ export default class DeployImpl {
255255
return true;
256256
else if (isToBeRetried && retryCount <= maxRetryCount )
257257
return true;
258-
else
258+
else
259259
return false;
260260
} else return false;
261261
}
@@ -306,7 +306,7 @@ export default class DeployImpl {
306306
failed: failed,
307307
queue: queue,
308308
packagesToPackageInfo: packagesToPackageInfo,
309-
error: null
309+
error: null
310310
};
311311
} catch (err) {
312312
SFPLogger.log(err, LoggerLevel.ERROR, this.props.logger);
@@ -331,7 +331,7 @@ export default class DeployImpl {
331331
let packages = releaseConfig.getPackagesAsPerReleaseConfig();
332332
//Filter artifacts based on packages
333333
let filteredSfPPackages:SfpPackage[] = [];
334-
334+
335335
for (const sfpPackage of sfpPackages) {
336336
if (packages.includes(sfpPackage.packageName)) {
337337
filteredSfPPackages.push(sfpPackage);
@@ -376,7 +376,6 @@ export default class DeployImpl {
376376
SFPLogger.printHeaderLine('',COLOR_HEADER,LoggerLevel.INFO);
377377
SFPLogger.log(`Retrying On Failure Attempt: ${count}`, LoggerLevel.INFO, this.props.logger);
378378
SFPLogger.printHeaderLine('',COLOR_HEADER,LoggerLevel.INFO);
379-
380379
}
381380
}
382381

@@ -469,7 +468,6 @@ export default class DeployImpl {
469468
});
470469

471470
queue.forEach((pkg) => {
472-
473471
maxTable.push(processColoursForAllPackages(pkg));
474472
});
475473

@@ -479,7 +477,7 @@ export default class DeployImpl {
479477
//Insane Hack
480478
//TODO: Export the value to the caller
481479
printDeploymentBreakDownInMarkdown();
482-
480+
483481
groupSection.end();
484482

485483
groupSection = new GroupConsoleLogs(`Packages to be deployed`, this.props.logger).begin();
@@ -531,12 +529,12 @@ export default class DeployImpl {
531529

532530
function processColoursForAllPackages(pkg) {
533531
const pkgInfo = packagesToPackageInfo[pkg.packageName];
534-
532+
535533
let packageName = pkg.packageName;
536534
let versionNumber = pkg.versionNumber;
537535
let versionInstalledInOrg = pkgInfo.versionInstalledInOrg ? pkgInfo.versionInstalledInOrg : 'N/A';
538536
let isPackageInstalled = pkgInfo.isPackageInstalled ? 'No' : 'Yes';
539-
537+
540538
if (pkgInfo.isPackageInstalled) {
541539
packageName = COLOR_SUCCESS(packageName);
542540
versionNumber = COLOR_SUCCESS(versionNumber);
@@ -551,20 +549,20 @@ export default class DeployImpl {
551549
isPackageInstalled = COLOR_ERROR(isPackageInstalled);
552550

553551
}
554-
552+
555553
return [packageName, versionNumber, versionInstalledInOrg, isPackageInstalled];
556554
}
557555

558-
556+
559557
function getRowForMarkdownTable(pkg:SfpPackage, props:DeployProps) {
560558
const pkgInfo = packagesToPackageInfo[pkg.packageName];
561-
559+
562560
let packageName = pkg.packageName;
563561
let versionNumber = pkg.versionNumber;
564562
let versionInstalledInOrg = pkgInfo.versionInstalledInOrg ? pkgInfo.versionInstalledInOrg : 'N/A';
565563
let isPackageToBeInstalled = pkgInfo.isPackageInstalled ? 'No' : 'Yes';
566564
let promotionStatus = 'N/A';
567-
565+
568566
if(isPackageToBeInstalled=="Yes")
569567
{
570568
isPackageToBeInstalled = `![Yes](https://img.shields.io/badge/Yes-green.svg)`;
@@ -615,10 +613,10 @@ export default class DeployImpl {
615613
});
616614
SFPLogger.log(table.toString(), LoggerLevel.INFO, this.props.logger);
617615
groupSection.end();
618-
616+
619617
printDeploymentBreakDownInMarkdown();
620618

621-
619+
622620
function printDeploymentBreakDownInMarkdown() {
623621
let tableData = {
624622
table: {
@@ -731,7 +729,7 @@ export default class DeployImpl {
731729

732730
//Add Installation Options
733731
let installationOptions = new SfpPackageInstallationOptions();
734-
installationOptions.installationkey = null,
732+
installationOptions.installationkey = null,
735733
installationOptions.apexcompile = 'package';
736734
installationOptions.waitTime = waitTime;
737735
installationOptions.apiVersion = apiVersion;

0 commit comments

Comments
 (0)