import { SFDXCommand } from "../command/SFDXCommand" ; import { Logger , LoggerLevel } from "../logger/SFPLogger" ; export default class CreateUnlockedPackageVersionImpl extends SFDXCommand { constructor ( private devHub , private projectDirectory , private sfdxPackage , private waitTime , private configFilePath , protected logger , protected logLevel , private versionNumber ? , private isByPassInstallationKey = true , private installationKey ? , private tag ? , private isSkipValidation = false , private isOrgDependentPackage = false , private isCoverageEnabled = true ) { super ( null , projectDirectory , logger , logLevel ) ; } getSFDXCommand ( ) { return "sfdx force:package:version:create" ; } getCommandName ( ) { return "PackageVersionCreate" ; } getGeneratedParams ( ) { let params = `-p ${ this . sfdxPackage }  -w ${ this . waitTime } --definitionfile ${ this . configFilePath }` ; if ( this . versionNumber ) params += `  --versionnumber ${ this . versionNumber }` ; if ( this . isByPassInstallationKey ) params += ` -x` ; else params += ` -k ${ this . installationKey }` ; if ( this . tag ) params += ` -t ${ this . tag }` ; if ( this . isCoverageEnabled && ! this . isOrgDependentPackage ) params += ` -c` ; if ( this . isSkipValidation && ! this . isOrgDependentPackage ) params += ` --skipvalidation` ; params += ` -v ${ this . devHub }` ; return params ; } }