<commit_before>var async = require('async');
var utils = require('prana').utils;

var page = module.exports;

/**
 * The permission() hook.
 */
page.permission = function(permissions, callback) {
  var newPermissions = {};

  newPermissions['manage-pages'] = {
    title: 'Manage pages',
    description: 'List, create and edit pages.'
  };

  callback(null, newPermissions);
};

/**
 * The type() hook.
 */
page.type = function(types, callback) {
  var newTypes = {};

  newTypes['page'] = {
    title: 'Page',
    description: 'An application page.',
    access: {
      'list': 'manage-pages',
      'load': 'manage-pages',
      'add': 'manage-pages',
      'edit': 'manage-pages',
      'delete': 'manage-pages'
    }
  };

  callback(null, newTypes);
};

/**
 * The page() hook.
 */
page.page = function(pages, callback) {
  var newPages = {};
<commit_msg>Adding some fields to page type. Issue #64.<commit_after>var async = require('async');
var utils = require('prana').utils;

var page = module.exports;

/**
 * The permission() hook.
 */
page.permission = function(permissions, callback) {
  var newPermissions = {};

  newPermissions['manage-pages'] = {
    title: 'Manage pages',
    description: 'List, create and edit pages.'
  };

  callback(null, newPermissions);
};

/**
 * The type() hook.
 */
page.type = function(types, callback) {
  var newTypes = {};

  newTypes['page'] = {
    title: 'Page',
    description: 'An application page.',
    fields: {
      name: {
        title: 'Name',
        type: 'text',
        required: 'true'
      },
      path: {
        title: 'Path',
        type: 'text'
      },
      title: {
        title: 'Title',
        type: 'text',
        required: 'true'
      }
    },
    access: {
      'list': 'manage-pages',
      'load': 'manage-pages',
      'add': 'manage-pages',
      'edit': 'manage-pages',
      'delete': 'manage-pages'
    }
  };

  callback(null, newTypes);
};

/**
 * The page() hook.
 */
page.page = function(pages, callback) {
  var newPages = {};

{'fraction_non_alphanumeric': 0.18087727944800394, 'fraction_numerical': 0.0009857072449482504, 'mean_word_length': 2.625, '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': '5821132', 'n_tokens_mistral': 666, 'n_tokens_neox': 653, 'n_words': 157}