import { SFDXCommand } from "../command/SFDXCommand" ; import { Logger , LoggerLevel } from "../logger/SFPLogger" ; export default class InstallUnlockedPackageImpl extends SFDXCommand { public constructor ( logger , logLevel , working_directory , private targetUserName , private packageId , private waitTime , private publishWaitTime ? , private installationkey ? , private securityType ? , private upgradeType ? ) { super ( targetUserName , working_directory , logger , logLevel ) ; } public async exec ( quiet ? ) { let result = await super . exec ( quiet , 0 , true ) ; return result ; } getCommandName ( ) { return "InstallUnlockedPackageImpl" ; } getSFDXCommand ( ) { return `sfdx force:package:install` ; } getGeneratedParams ( ) { let command = `--targetusername ${ this . targetUserName } --package ${ this . packageId } --apexcompile=package --noprompt --wait ${ this . waitTime }` ; if ( this . installationkey ) command += ` --installationkey=${ this . installationkey }` ; if ( this . publishWaitTime ) command += ` --publishwait=${ this . publishWaitTime }` ; if ( this . securityType ) command += ` --securitytype=${ this . securityType }` ; if ( this . upgradeType ) command += ` --upgradetype=${ this . upgradeType }` ; return command ; } }