Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(configuration: BintrayOptions, runtimeOptions: ProviderRuntimeOptions) {
super(runtimeOptions)
this.client = new BintrayClient(configuration, runtimeOptions.executor, new CancellationToken())
this.baseUrl = newBaseUrl(`https://dl.bintray.com/${this.client.owner}/${this.client.repo}`)
}
let token = info.token
if (isEmptyOrSpaces(token)) {
token = process.env.BT_TOKEN
if (isEmptyOrSpaces(token)) {
throw new InvalidConfigurationError(`Bintray token is not set, neither programmatically, nor using env "BT_TOKEN" (see https://www.electron.build/configuration/publish#bintrayoptions)`)
}
token = token.trim()
if (!isTokenCharValid(token)) {
throw new InvalidConfigurationError(`Bintray token (${JSON.stringify(token)}) contains invalid characters, please check env "BT_TOKEN"`)
}
}
this.client = new BintrayClient(info, httpExecutor, this.context.cancellationToken, token)
}