<commit_before>'use strict';

let Promise = require('bluebird'),
  urlParser = require('url'),
  log = require('intel'),
  BmpRunner = require('./bmp_runner'),
  harBuilder = require('../support/har_builder'),
  trafficShapeParser = require('../support/traffic_shape_parser');

class ProxyRunDelegate {
  constructor(options) {
    this.trafficShapeConfig = trafficShapeParser.parseTrafficShapeConfig(options);
    this.createHar = !options.skipHar;

    if (this.trafficShapeConfig || this.createHar === true) {
      this.bmpRunner = new BmpRunner();
    }
  }

  __runIfProxy(block) {
    if (this.bmpRunner) {<commit_msg>Actually start proxy when basicAuth is active.<commit_after>'use strict';

let Promise = require('bluebird'),
  urlParser = require('url'),
  log = require('intel'),
  BmpRunner = require('./bmp_runner'),
  harBuilder = require('../support/har_builder'),
  trafficShapeParser = require('../support/traffic_shape_parser');

class ProxyRunDelegate {
  constructor(options) {
    this.trafficShapeConfig = trafficShapeParser.parseTrafficShapeConfig(options);
    this.createHar = !options.skipHar;

    if (this.trafficShapeConfig || options.basicAuth || this.createHar === true) {
      this.bmpRunner = new BmpRunner();
    }
  }

  __runIfProxy(block) {
    if (this.bmpRunner) {
{'fraction_non_alphanumeric': 0.14263803680981596, 'fraction_numerical': 0.0, 'mean_word_length': 4.506329113924051, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6621234', 'n_tokens_mistral': 400, 'n_tokens_neox': 396, 'n_words': 71}