<commit_before>require 'yaml'

module Nanobox
  module Boxfile

    # Base templates for the different nodes in the boxfile.

    BOXFILE_DATA_DEFAULTS = {
      type: :hash,
      default: {},
      template:  {
        config:         {type: :hash, default: {}},
        image:          {type: :string, default: nil}
      }
    }

    BOXFILE_BUILD_DEFAULTS = {
      type: :hash,
      default: {},
      template: {
        config:         {type: :hash, default: {}},
        engine:         {type: :string, default: nil},
        image:          {type: :string, default: nil},
        lib_dirs:       {type: :array, of: :folders, default: []},
        extra_packages: {type: :array, of: :strings, default: nil},
        dev_packages:   {type: :array, of: :strings, default: nil},

        before_setup:     {type: :array, of: :string, default: []},
        after_setup:      {type: :array, of: :string, default: []},
        before_prepare:   {type: :array, of: :string, default: []},
        after_prepare:    {type: :array, of: :string, default: []},
        before_compile:   {type: :array, of: :string, default: []},
        after_compile:    {type: :array, of: :string, default: []}
      }
    }

    BOXFILE_DEPLOY_DEFAULTS = {
      type: :hash,
      default: {},
      template: {
        deploy_hook_timeout:  {type: :integer, default: nil},
        transform:            {type: :array, of: :string, default: []}
      }
    }

    BOXFILE_DEV_DEFAULTS = {
      type: :hash,
      default: {},
      template: {
        cwd:      {type: :folder, default: nil},
        fs_watch: {type: :on_off, default: nil}
      }
    }

    BOXFILE_WEB_STRING_DEFAULTS = {
      type: :hash,
      default: {},
      template: {
        image:          {type: :string, default: nil},
        start:          {type: :string, default: nil},
        routes:         {type: :array, of: :string, default: []},
        ports:          {type: :array, of: :string, default: []},
        writable_dirs:  {type: :array, of: :string, default: []},
        network_dirs:   {type: :hash, default: {}},
        log_watch:       {type: :hash, default: {}}
      }
    }

    BOXFILE_WORKER_STRING_DEFAULTS = {
      type: :hash,
      default: {},
      template: {
        image:          {type: :string, default: nil},
        start:          {type: :string, default: nil},
        writable_dirs:  {type: :array, of: :string, default: []},
        network_dirs:   {type: :hash, default: {}},
        log_watch:       {type: :hash, default: {}}
      }
    }

    BOXFILE_WEB_ARRAY_STRING_DEFAULTS = {
      type: :hash,
      default: {},
      template: {
        image:          {type: :string, default: nil},
        start:          {type: :string, default: nil},
        routes:         {type: :array, of: :string, default: []},
        ports:          {type: :array, of: :string, default: []},
        writable_dirs:  {type: :array, of: :string, default: []},
        network_dirs:   {type: :hash, default: {}},
        log_watch:       {type: :hash, default: {}}
      }
    }

    BOXFILE_WORKER_ARRAY_STRING_DEFAULTS = {
      type: :hash,
      default: {},
      template: {
        image:          {type: :string, default: nil},
        start:          {type: :string, default: nil},
        writable_dirs:  {type: :array, of: :string, default: []},
        network_dirs:   {type: :hash, default: {}},
        log_watch:       {type: :hash, default: {}}<commit_msg>change template for array of strings to accept an array of strings rather than just strings<commit_after>require 'yaml'

module Nanobox
  module Boxfile

    # Base templates for the different nodes in the boxfile.

    BOXFILE_DATA_DEFAULTS = {
      type: :hash,
      default: {},
      template:  {
        config:         {type: :hash, default: {}},
        image:          {type: :string, default: nil}
      }
    }

    BOXFILE_BUILD_DEFAULTS = {
      type: :hash,
      default: {},
      template: {
        config:         {type: :hash, default: {}},
        engine:         {type: :string, default: nil},
        image:          {type: :string, default: nil},
        lib_dirs:       {type: :array, of: :folders, default: []},
        extra_packages: {type: :array, of: :strings, default: nil},
        dev_packages:   {type: :array, of: :strings, default: nil},

        before_setup:     {type: :array, of: :string, default: []},
        after_setup:      {type: :array, of: :string, default: []},
        before_prepare:   {type: :array, of: :string, default: []},
        after_prepare:    {type: :array, of: :string, default: []},
        before_compile:   {type: :array, of: :string, default: []},
        after_compile:    {type: :array, of: :string, default: []}
      }
    }

    BOXFILE_DEPLOY_DEFAULTS = {
      type: :hash,
      default: {},
      template: {
        deploy_hook_timeout:  {type: :integer, default: nil},
        transform:            {type: :array, of: :string, default: []}
      }
    }

    BOXFILE_DEV_DEFAULTS = {
      type: :hash,
      default: {},
      template: {
        cwd:      {type: :folder, default: nil},
        fs_watch: {type: :on_off, default: nil}
      }
    }

    BOXFILE_WEB_STRING_DEFAULTS = {
      type: :hash,
      default: {},
      template: {
        image:          {type: :string, default: nil},
        start:          {type: :string, default: nil},
        routes:         {type: :array, of: :string, default: []},
        ports:          {type: :array, of: :string, default: []},
        writable_dirs:  {type: :array, of: :string, default: []},
        network_dirs:   {type: :hash, default: {}},
        log_watch:       {type: :hash, default: {}}
      }
    }

    BOXFILE_WORKER_STRING_DEFAULTS = {
      type: :hash,
      default: {},
      template: {
        image:          {type: :string, default: nil},
        start:          {type: :string, default: nil},
        writable_dirs:  {type: :array, of: :string, default: []},
        network_dirs:   {type: :hash, default: {}},
        log_watch:       {type: :hash, default: {}}
      }
    }

    BOXFILE_WEB_ARRAY_STRING_DEFAULTS = {
      type: :hash,
      default: {},
      template: {
        image:          {type: :string, default: nil},
        start:          {type: :array, of: :string, default: nil},
        routes:         {type: :array, of: :string, default: []},
        ports:          {type: :array, of: :string, default: []},
        writable_dirs:  {type: :array, of: :string, default: []},
        network_dirs:   {type: :hash, default: {}},
        log_watch:       {type: :hash, default: {}}
      }
    }

    BOXFILE_WORKER_ARRAY_STRING_DEFAULTS = {
      type: :hash,
      default: {},
      template: {
        image:          {type: :string, default: nil},
        start:          {type: :array, of: :string, default: nil},
        writable_dirs:  {type: :array, of: :string, default: []},
        network_dirs:   {type: :hash, default: {}},
        log_watch:       {type: :hash, default: {}}
{'fraction_non_alphanumeric': 0.15515771526001704, 'fraction_numerical': 0.0, 'mean_word_length': 1.9675379426644182, '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': '2350390', 'n_tokens_mistral': 2276, 'n_tokens_neox': 2253, 'n_words': 569}