<commit_before>var create = require('./create')
var path = require('path')
var Inject = require('./inject')

exports.manifest = {
  get: 'source',
  add: 'sink',
  ls: 'source',
  has: 'async',
  size: 'async',
  meta: 'async',
  want: 'async',
  changes: 'source',
  createWants: 'source'
}

exports.name = 'blobs'

exports.version = require('./package.json').version

exports.permissions = {
    anonymous: {allow: ['has', 'get', 'changes', 'createWants']},
}

exports.init = function (sbot, config) {
  var blobs = create(path.join(config.path, 'blobs'))
  return Inject(blobs, sbot.id)
}


<commit_msg>connect any new peers to blobs replication<commit_after>var create = require('./create')
var path = require('path')
var Inject = require('./inject')

exports.manifest = {
  get: 'source',
  add: 'sink',
  ls: 'source',
  has: 'async',
  size: 'async',
  meta: 'async',
  want: 'async',
  changes: 'source',
  createWants: 'source'
}

exports.name = 'blobs'

exports.version = require('./package.json').version

exports.permissions = {
    anonymous: {allow: ['has', 'get', 'changes', 'createWants']},
}

exports.init = function (sbot, config) {
  var mb = create(path.join(config.path, 'blobs'))
  var blobs = Inject(mb, sbot.id)

  sbot.on('rpc:connect', function (rpc) {
    blobs._onConnect(rpc, rpc.id)
  })
  return blobs
}



{'fraction_non_alphanumeric': 0.18922961854899029, 'fraction_numerical': 0.0, 'mean_word_length': 4.1461538461538465, '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': '150514', 'n_tokens_mistral': 484, 'n_tokens_neox': 476, 'n_words': 114}