Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
): Promise {
if (updateMetadata.rollout === 100) {
// If rollout is 100% we shouldn't pass it in the HTTP request
delete updateMetadata.rollout
}
try {
return this.codePush.promote(
appName,
sourceDeploymentName,
destinationDeploymentName,
updateMetadata
)
} catch (error) {
if (
disableDuplicateReleaseError &&
error.statusCode === CodePush.ERROR_CONFLICT
) {
log.warn(error.message)
} else {
throw new Error(error)
}
}
}
const amRemove = (args)=> {
const [collaborator, ...rest] = args;
return removeApps(new AccountManager(...rest), collaborator)
};
constructor(initConfig: CodePushInitConfig) {
this.codePush = new CodePush(
initConfig.accessKey,
initConfig.customHeaders,
initConfig.customServerUrl,
initConfig.proxy
)
}
constructor (initConfig: CodePushInitConfig) {
this._codePush = new CodePush(initConfig.accessKey, initConfig.customHeaders, initConfig.customServerUrl, initConfig.proxy)
}