<commit_before>/* Copyright (c) 2010-2016 <NAME> and other contributors, MIT License */
'use strict'

// Node API modules
var Assert = require('assert')
var Events = require('events')
var Util = require('util')

// External modules.
var _ = require('lodash')
var Eraro = require('eraro')
var GateExecutor = require('gate-executor')
var Jsonic = require('jsonic')
var Lrucache = require('lru-cache')
var Makeuse = require('use-plugin')
var Nid = require('nid')
var Norma = require('norma')
var Patrun = require('patrun')
var Stats = require('rolling-stats')


// Internal modules.
var Actions = require('./lib/actions')
var Common = require('./lib/common')
var Errors = require('./lib/errors')
var Legacy = require('./lib/legacy')
var Optioner = require('./lib/optioner')
var Package = require('./package.json')
var Plugins = require('./lib/plugins')
var Print = require('./lib/print')
var Transport = require('./lib/transport')

// Shortcuts
var arrayify = Function.prototype.apply.bind(Array.prototype.slice)
var errlog = Common.make_standard_err_log_entry
var actlog = Common.make_standard_act_log_entry

var internals = {
  error: Eraro({
    package: 'seneca',
    msgmap: Errors,
    override: true
  }),
  defaults: {
    // Tag this Seneca instance, will be appended to instance identifier.
    tag: '-',

    // Standard length of identifiers for actions.
    idlen: 12,

    // Standard timeout for actions.
    timeout: 22222,

    // Register (true) default plugins. Set false to not register when
    // using custom versions.
    default_plugins: {
      transport: true
    },

    // Debug settings.
    debug: {
      // Throw (some) errors from seneca.act.
      fragile: false,

      // Fatal errors ... aren't fatal. Not for production!
      undead: false,

      // Print debug info to console
      print: {
        // Print options. Best used via --seneca.print.options.
        options: false
      },

      // Trace action caller and place in args.caller$.
      act_caller: false,

      // Shorten all identifiers to 2 characters.
      short_logs: false,

      // Record and log callpoints (calling code locations).
      callpoint: false
    },

    // Enforce strict behaviours. Relax when backwards compatibility needed.
    strict: {
      // Action result must be a plain object.
      result: true,

      // Delegate fixedargs override action args.
      fixedargs: true,

      // Adding a pattern overrides existing pattern only if matches exactly.
      add: false,

      // If no action is found and find is false,
      // then no error returned along with empty object
      find: true,

      // Maximum number of times an action can call itself
      maxloop: 11
    },

    // Action cache. Makes inbound messages idempotent.
    actcache: {
      active: true,
      size: 11111
    },

    // Action executor tracing. See gate-executor module.
    trace: {
      act: false,
      stack: false,
      unknown: true
    },

    // Action statistics settings. See rolling-stats module.
    stats: {
      size: 1024,
      interval: 60000,
      running: false
    },

    // Wait time for plugins to close gracefully.
    deathdelay: 11111,

    // Plugin settings
    plugin: {},

    // System wide functionality.
    system: {
      // seneca.add uses catchall (pattern='') prior
      catchall: false,

      // Close instance on these signals, if true.
      close_signals: {
        SIGHUP: true,
        SIGTERM: true,
        SIGINT: true,
        SIGBREAK: true
      }
    },

    // Internal functionality. Reserved for objects and funtions only.
    internal: {},

    // Log status at periodic intervals.
    status: {
      interval: 60000,

      // By default, does not run.
      running: false
    },

    pin: {
      // run pin function without waiting for pin event
      immediate: false
    },

    // backwards compatibility settings
    legacy: {
      // use old error codes, until version 3.x
      error_codes: true,

      // use old logging, until version 3.x
      logging: true
    }
  }
}<commit_msg>Removed pin default options<commit_after>/* Copyright (c) 2010-2016 <NAME> and other contributors, MIT License */
'use strict'

// Node API modules
var Assert = require('assert')
var Events = require('events')
var Util = require('util')

// External modules.
var _ = require('lodash')
var Eraro = require('eraro')
var GateExecutor = require('gate-executor')
var Jsonic = require('jsonic')
var Lrucache = require('lru-cache')
var Makeuse = require('use-plugin')
var Nid = require('nid')
var Norma = require('norma')
var Patrun = require('patrun')
var Stats = require('rolling-stats')


// Internal modules.
var Actions = require('./lib/actions')
var Common = require('./lib/common')
var Errors = require('./lib/errors')
var Legacy = require('./lib/legacy')
var Optioner = require('./lib/optioner')
var Package = require('./package.json')
var Plugins = require('./lib/plugins')
var Print = require('./lib/print')
var Transport = require('./lib/transport')

// Shortcuts
var arrayify = Function.prototype.apply.bind(Array.prototype.slice)
var errlog = Common.make_standard_err_log_entry
var actlog = Common.make_standard_act_log_entry

var internals = {
  error: Eraro({
    package: 'seneca',
    msgmap: Errors,
    override: true
  }),
  defaults: {
    // Tag this Seneca instance, will be appended to instance identifier.
    tag: '-',

    // Standard length of identifiers for actions.
    idlen: 12,

    // Standard timeout for actions.
    timeout: 22222,

    // Register (true) default plugins. Set false to not register when
    // using custom versions.
    default_plugins: {
      transport: true
    },

    // Debug settings.
    debug: {
      // Throw (some) errors from seneca.act.
      fragile: false,

      // Fatal errors ... aren't fatal. Not for production!
      undead: false,

      // Print debug info to console
      print: {
        // Print options. Best used via --seneca.print.options.
        options: false
      },

      // Trace action caller and place in args.caller$.
      act_caller: false,

      // Shorten all identifiers to 2 characters.
      short_logs: false,

      // Record and log callpoints (calling code locations).
      callpoint: false
    },

    // Enforce strict behaviours. Relax when backwards compatibility needed.
    strict: {
      // Action result must be a plain object.
      result: true,

      // Delegate fixedargs override action args.
      fixedargs: true,

      // Adding a pattern overrides existing pattern only if matches exactly.
      add: false,

      // If no action is found and find is false,
      // then no error returned along with empty object
      find: true,

      // Maximum number of times an action can call itself
      maxloop: 11
    },

    // Action cache. Makes inbound messages idempotent.
    actcache: {
      active: true,
      size: 11111
    },

    // Action executor tracing. See gate-executor module.
    trace: {
      act: false,
      stack: false,
      unknown: true
    },

    // Action statistics settings. See rolling-stats module.
    stats: {
      size: 1024,
      interval: 60000,
      running: false
    },

    // Wait time for plugins to close gracefully.
    deathdelay: 11111,

    // Plugin settings
    plugin: {},

    // System wide functionality.
    system: {
      // seneca.add uses catchall (pattern='') prior
      catchall: false,

      // Close instance on these signals, if true.
      close_signals: {
        SIGHUP: true,
        SIGTERM: true,
        SIGINT: true,
        SIGBREAK: true
      }
    },

    // Internal functionality. Reserved for objects and funtions only.
    internal: {},

    // Log status at periodic intervals.
    status: {
      interval: 60000,

      // By default, does not run.
      running: false
    },

    // backwards compatibility settings
    legacy: {
      // use old error codes, until version 3.x
      error_codes: true,

      // use old logging, until version 3.x
      logging: true
    }
  }
}
{'fraction_non_alphanumeric': 0.10952970297029703, 'fraction_numerical': 0.01089108910891089, 'mean_word_length': 2.3545039435450392, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2292952', 'n_tokens_mistral': 2392, 'n_tokens_neox': 2226, 'n_words': 800}