<commit_before>const fs = require('fs')
const path = require('path')

module.exports = [
  // {
  //   abbr: 'v',
  //   flag: true,
  //   help: 'Print the logs to console\n'
  // },
  {
    name: 'root',
    help: 'Root folder to serve (defaut: \'./\')',
    question: 'Path to the folder you want to serve. Default is',
    default: './',
    prompt: true,
    filter: (value) => path.resolve(value)
  },
  {
    name: 'port',
    help: 'SSL port to use',
    question: 'SSL port to run on. Default is',
    default: '8443',
    prompt: true
  },
  {
    name: 'webid',
    help: 'Enable WebID+TLS authentication (use `--no-webid` for HTTP instead of HTTPS)',
    flag: true,
    question: 'Enable WebID authentication',
    prompt: true
  },
  {
    name: 'auth',
    help: 'Pick an authentication strategy `tls` or `oidc`',
    question: 'What authentication strategy do you want to provide?',
    type: 'list',
    choices: [
      'TLS',
      'OpenID Connect'
    ],
    prompt: true,
    default: 'TLS',
    filter: (value) => {
      if (value === 'TLS') return 'tls'
      if (value === 'OpenID Connect') return 'oidc'
    },
    when: (answers) => {
      return answers.webid
    }
  },
  {
    name: 'useOwner',
    question: 'Do you already have a WebID?',
    type: 'confirm',
    default: false,
    hide: true
  },
  {
    name: 'owner',
    help: 'Set the owner of the storage',
    question: 'Your webid',
    validate: function (value) {
      if (value === '' || !value.startsWith('http')) {
        return 'Enter a valid Webid'
      }<commit_msg>better cli ui<commit_after>const fs = require('fs')
const path = require('path')

module.exports = [
  // {
  //   abbr: 'v',
  //   flag: true,
  //   help: 'Print the logs to console\n'
  // },
  {
    name: 'root',
    help: 'Root folder to serve (defaut: \'./\')',
    question: 'Path to the folder you want to serve. Default is',
    default: './',
    prompt: true,
    filter: (value) => path.resolve(value)
  },
  {
    name: 'port',
    help: 'SSL port to use',
    question: 'SSL port to run on. Default is',
    default: '8443',
    prompt: true
  },
  {
    name: 'webid',
    help: 'Enable WebID+TLS authentication (use `--no-webid` for HTTP instead of HTTPS)',
    flag: true,
    question: 'Enable WebID authentication',
    prompt: true
  },
  {
    name: 'auth',
    help: 'Pick an authentication strategy for WebID: `tls` or `oidc`',
    question: 'Select authentication strategy',
    type: 'list',
    choices: [
      'WebID-TLS',
      'WebID-OpenID Connect'
    ],
    prompt: true,
    default: 'WebID-TLS',
    filter: (value) => {
      if (value === 'WebID-TLS') return 'tls'
      if (value === 'WebID-OpenID Connect') return 'oidc'
    },
    when: (answers) => {
      return answers.webid
    }
  },
  {
    name: 'useOwner',
    question: 'Do you already have a WebID?',
    type: 'confirm',
    default: false,
    hide: true
  },
  {
    name: 'owner',
    help: 'Set the owner of the storage',
    question: 'Your webid',
    validate: function (value) {
      if (value === '' || !value.startsWith('http')) {
        return 'Enter a valid Webid'
      }
{'fraction_non_alphanumeric': 0.16302627413738524, 'fraction_numerical': 0.0025324469768914213, 'mean_word_length': 2.3510074231177094, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3664086', 'n_tokens_mistral': 1068, 'n_tokens_neox': 1059, 'n_words': 331}