@@ -26,8 +26,7 @@ const SFDX_PROJECT_FILE = 'sfdx-project.json';
2626export default class DotEnvExport extends SfCommand < void > {
2727 public static pluginName = PLUGIN_NAME ;
2828
29- public static readonly summary =
30- 'Generate or update an .env file with "replaceWithEnv" entries in sfdx-project.json' ;
29+ public static readonly summary = 'Generate or update an .env file with "replaceWithEnv" entries in sfdx-project.json' ;
3130 public static readonly description =
3231 'Reads sfdx-project.json and writes any "replaceWithEnv" values from the "replacements" node to a .env file. ' +
3332 'If the output file already exists, only missing keys are appended.' ;
@@ -82,9 +81,7 @@ export default class DotEnvExport extends SfCommand<void> {
8281 const projectFilePath = path . resolve ( process . cwd ( ) , SFDX_PROJECT_FILE ) ;
8382
8483 if ( ! fs . existsSync ( projectFilePath ) ) {
85- this . error (
86- `Could not find ${ SFDX_PROJECT_FILE } in the current directory (${ process . cwd ( ) } ).`
87- ) ;
84+ this . error ( `Could not find ${ SFDX_PROJECT_FILE } in the current directory (${ process . cwd ( ) } ).` ) ;
8885 }
8986
9087 try {
@@ -154,11 +151,7 @@ export default class DotEnvExport extends SfCommand<void> {
154151 return { outputFilePath, existingContent, existingKeys } ;
155152 }
156153
157- private getMissingKeys (
158- environmentKeys : string [ ] ,
159- existingKeys : Set < string > ,
160- outputFile : string
161- ) : string [ ] | null {
154+ private getMissingKeys ( environmentKeys : string [ ] , existingKeys : Set < string > , outputFile : string ) : string [ ] | null {
162155 const missingKeys = environmentKeys . filter ( ( k ) => ! existingKeys . has ( k ) ) . sort ( ) ;
163156
164157 if ( missingKeys . length === 0 ) {
@@ -193,11 +186,7 @@ export default class DotEnvExport extends SfCommand<void> {
193186 return envFileNewLines . join ( '\n' ) ;
194187 }
195188
196- private writeEnvFile (
197- outputFilePath : string ,
198- appendContent : string ,
199- existingContent : string
200- ) : void {
189+ private writeEnvFile ( outputFilePath : string , appendContent : string , existingContent : string ) : void {
201190 if ( existingContent ) {
202191 fs . appendFileSync ( outputFilePath , appendContent , 'utf-8' ) ;
203192 } else {
0 commit comments