<commit_before>const app = require('hadron-app');
const {{pascalcase name}}Component = require('./lib/components');
const {{pascalcase name}}Actions = require('./lib/actions');
const {{pascalcase name}}Store = require('./lib/stores');

/**
 * Activate all the components in the {{capitalcase name}} package.
 */
function activate() {
  app.appRegistry.registerComponent('{{pascalcase scope}}:{{pascalcase name}}', {{pascalcase name}}Component);
  app.appRegistry.registerAction('{{pascalcase name}}Actions', {{pascalcase name}}Actions);
  app.appRegistry.registerStore('{{pascalcase name}}Store', {{pascalcase name}}Store);
}

/**
 * Deactivate all the components in the {{capitalcase name}} package.
 */
function deactivate() {
  app.appRegistry.deregisterComponent('{{pascalcase scope}}:{{pascalcase name}}');
  app.appRegistry.deregisterAction('{{pascalcase name}}Actions');
  app.appRegistry.deregisterStore('{{pascalcase name}}Store');
}

module.exports = {{pascalcase name}}Component;
module.exports.activate = activate;
module.exports.deactivate = deactivate;<commit_msg>COMPASS-1058: Default template to collection tab role<commit_after>const app = require('hadron-app');
const {{pascalcase name}}Component = require('./lib/components');
const {{pascalcase name}}Actions = require('./lib/actions');
const {{pascalcase name}}Store = require('./lib/stores');

/**
 * A sample role for the component.
 */
const ROLE = {
  name: "{{ pascalcase name }}",
  component: {{pascalcase name}}Component
}

/**
 * Activate all the components in the {{capitalcase name}} package.
 */
function activate() {
  // Register the {{pascalcase name}}Component as a collection tab Role in Compass
  //
  // Note that available roles are:
  //   - Collection.Tab
  //   - CollectionStats.CollectionStatsItem
  //   - Database.Tab
  //   - Instance.Tab
  //
  app.appRegistry.registerRole('Collection.Tab', ROLE);

  app.appRegistry.registerComponent('{{pascalcase scope}}:{{pascalcase name}}', {{pascalcase name}}Component);
  app.appRegistry.registerAction('{{pascalcase name}}Actions', {{pascalcase name}}Actions);
  app.appRegistry.registerStore('{{pascalcase name}}Store', {{pascalcase name}}Store);
}

/**
 * Deactivate all the components in the {{capitalcase name}} package.
 */
function deactivate() {
  app.appRegistry.deregisterRole('Collection.Tab', ROLE);

  app.appRegistry.deregisterComponent('{{pascalcase scope}}:{{pascalcase name}}');
  app.appRegistry.deregisterAction('{{pascalcase name}}Actions');
  app.appRegistry.deregisterStore('{{pascalcase name}}Store');
}

module.exports = {{pascalcase name}}Component;
module.exports.activate = activate;
module.exports.deactivate = deactivate;
{'fraction_non_alphanumeric': 0.1642512077294686, 'fraction_numerical': 0.0014864362690449647, 'mean_word_length': 5.73, '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': '1022671', 'n_tokens_mistral': 787, 'n_tokens_neox': 771, 'n_words': 171}