Skip to content
Permalink
Browse files

emit a commit

  • Loading branch information...
mmckegg committed May 1, 2019
0 parents commit b353abda548ef0b1ab92d579a37f68fda471919c
Showing with 164 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +35 −0 index.js
  3. +5 −0 manifest.json
  4. +107 −0 package-lock.json
  5. +16 −0 package.json
@@ -0,0 +1 @@
node_modules
@@ -0,0 +1,35 @@
const pull = require('pull-stream')
var OffsetLog = require('flumelog-offset')
module.exports = {
name: 'shared-identity',
version: '1.0.0',
manifest: require('./manifest.json'),
init: function (ssb, config) {
// CACHE!!?????
return {
rebuild: function (opts, cb) {
if (typeof opts === 'function' && !cb) {
cb = opts
opts = {}
}
var log = OffsetLog('/Users/matt/butt.offset', {
flags: 'w',
codec: {
decode: JSON.parse,
encode: JSON.stringify,
buffer: false,
type: 'ssb'
}
})
pull(
ssb.createUserStream({ id: ssb.id, live: false }),
pull.asyncMap((msg, cb) => {
log.append([msg], cb)
console.log('+')
}),
pull.drain(null, cb)
)
}
}
}
}
@@ -0,0 +1,5 @@
{
"rebuild": "async",
"publish": "async",
"latest": "async"
}

Some generated files are not rendered by default. Learn more.

@@ -0,0 +1,16 @@
{
"name": "ssb-shared-identity",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"flumelog-offset": "^3.4.0",
"pull-stream": "^3.6.9"
}
}

0 comments on commit b353abd

Please sign in to comment.
You can’t perform that action at this time.