<commit_before>const { URL } = require('url')
const fs = require('fs')
const path = require('path')
const http = require('http')
const https = require('https')
const Wappalyzer = require('./wappalyzer')

const {
  setTechnologies,
  setCategories,
  analyze,
  analyzeManyToMany,
  resolve,
} = Wappalyzer

const { AWS_LAMBDA_FUNCTION_NAME, CHROMIUM_BIN } = process.env

let puppeteer
let chromiumArgs = [
  '--no-sandbox',
  '--disable-gpu',
  '--ignore-certificate-errors',
  '--allow-running-insecure-content',
  '--disable-web-security',
  '--user-data-dir=/tmp/chromium',
]
let chromiumBin = CHROMIUM_BIN

if (AWS_LAMBDA_FUNCTION_NAME) {<commit_msg>Optionally specify Chromium user data directory with CHROMIUM_DATA_DIR environment variable<commit_after>const { URL } = require('url')
const fs = require('fs')
const path = require('path')
const http = require('http')
const https = require('https')
const Wappalyzer = require('./wappalyzer')

const {
  setTechnologies,
  setCategories,
  analyze,
  analyzeManyToMany,
  resolve,
} = Wappalyzer

const {
  AWS_LAMBDA_FUNCTION_NAME,
  CHROMIUM_BIN,
  CHROMIUM_DATA_DIR,
} = process.env

let puppeteer
let chromiumArgs = [
  '--no-sandbox',
  '--disable-gpu',
  '--ignore-certificate-errors',
  '--allow-running-insecure-content',
  '--disable-web-security',
  `--user-data-dir=${CHROMIUM_DATA_DIR || '/tmp/chromium'}`,
]
let chromiumBin = CHROMIUM_BIN

if (AWS_LAMBDA_FUNCTION_NAME) {
{'fraction_non_alphanumeric': 0.14673157162726008, 'fraction_numerical': 0.0, 'mean_word_length': 4.733067729083666, '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': '3483928', 'n_tokens_mistral': 529, 'n_tokens_neox': 519, 'n_words': 99}