<commit_before>import { herokuConfig } from './util'
import { extend, pick } from 'lodash'

const keys = [
  'ASSET_HOST',
  'ASSET_PATH',
  'AWS_ACCESS_KEY_ID',
  'AWS_S3_BUCKET',
  'AWS_S3_HOST',
  'AWS_SECRET_ACCESS_KEY',
  'FACEBOOK_APP_ID',
  'FILEPICKER_API_KEY',
  'GOOGLE_BROWSER_KEY',
  'GOOGLE_CLIENT_ID',
  'HOST',
  'LOG_LEVEL',
  'NODE_ENV',
  'SEGMENT_KEY',
  'SLACK_APP_CLIENT_ID',
  'SOCKET_HOST',
  'UPSTREAM_HOST'
]

export default function (done) {
  herokuConfig().info((err, vars) => {
    if (err) done(err)

    extend(process.env, pick(vars, keys))
    done()
  })
}<commit_msg>add all feature flag env variables during deployment<commit_after>import { herokuConfig } from './util'
import { each, includes } from 'lodash'

const keys = [
  'ASSET_HOST',
  'ASSET_PATH',
  'AWS_ACCESS_KEY_ID',
  'AWS_S3_BUCKET',
  'AWS_S3_HOST',
  'AWS_SECRET_ACCESS_KEY',
  'FACEBOOK_APP_ID',
  'FILEPICKER_API_KEY',
  'GOOGLE_BROWSER_KEY',
  'GOOGLE_CLIENT_ID',
  'HOST',
  'LOG_LEVEL',
  'NODE_ENV',
  'SEGMENT_KEY',
  'SLACK_APP_CLIENT_ID',
  'SOCKET_HOST',
  'UPSTREAM_HOST'
]

export default function (done) {
  herokuConfig().info((err, vars) => {
    if (err) done(err)
    each(vars, (v, k) => {
      if (includes(keys, k) || k.startsWith('FEATURE_FLAG_')) {
        process.env[k] = v
      }
    })

    done()
  })
}
{'fraction_non_alphanumeric': 0.1594311377245509, 'fraction_numerical': 0.0029940119760479044, 'mean_word_length': 4.0643939393939394, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '80320', 'n_tokens_mistral': 575, 'n_tokens_neox': 571, 'n_words': 95}