How to use the builder-util-runtime/out/bintray.BintrayClient function in builder-util-runtime

To help you get started, we’ve selected a few builder-util-runtime examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github electron-userland / electron-builder / packages / electron-updater / src / providers / BintrayProvider.ts View on Github external
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}`)
  }
github electron-userland / electron-builder / packages / app-builder-lib / src / publish / BintrayPublisher.ts View on Github external
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)
  }