Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ssb-git-repo

Package Overview
Dependencies
Maintainers
5
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssb-git-repo - npm Package Compare versions

Comparing version 2.7.0 to 2.8.0

29

lib/repo.js

@@ -1031,5 +1031,7 @@ var pull = require('pull-stream')

function fetchBlobs(blobs, blobIds, output, cb) {
function fetchBlobs(blobs, blobIds, output, opts, cb) {
var aborted
var fetched = 0
var wanted = {}
var debounceProgress

@@ -1041,4 +1043,12 @@ function printProgress() {

function printProgressBig() {
output.write('Still waiting for blobs: ' +
Object.keys(wanted).join(' ') + '\n')
}
if (opts.verbosity > 1) debounceProgress = setTimeout(printProgressBig, 5000)
blobIds.forEach(function (blobId) {
if (aborted) return
if (opts.verbosity > 1) output.write('want blob ' + blobId + '\n')
wanted[blobId] = true
blobs.want(blobId, function (err, got) {

@@ -1049,3 +1059,11 @@ if (aborted) return

fetched++
delete wanted[blobId]
if (output) printProgress()
if (opts.verbosity > 1) {
output.write('got blob ' + blobId + '\n')
if (debounceProgress) clearTimeout(debounceProgress)
if (fetched < blobIds.length) {
debounceProgress = setTimeout(printProgressBig, 5000)
}
}
if (fetched === blobIds.length) cb()

@@ -1089,3 +1107,6 @@ })

if (!process.env.GITSSB_OLD_PACKS)
Repo.prototype.getPack = function (wants, haves, cb) {
Repo.prototype.getPack = function (wants, haves, opts, cb) {
if (typeof opts === 'function') cb = opts, opts = null
if (!opts) opts = {}
// ensure our id is present

@@ -1095,3 +1116,3 @@ if (!this.sbot.id) return this.sbot.whoami(function (err, feed) {

this.sbot.id = feed.id
this.getPack(wants, haves, cb)
this.getPack(wants, haves, opts, cb)
}.bind(this))

@@ -1192,3 +1213,3 @@

var blobs = this.sbot.blobs
fetchBlobs(blobs, blobIds, this.output, function (err) {
fetchBlobs(blobs, blobIds, this.output, opts, function (err) {
if (err) return cb(aborted = err)

@@ -1195,0 +1216,0 @@ packs.forEach(function (pack) {

@@ -38,1 +38,9 @@ var u = exports

}
u.debounce = function (cb, timeout) {
var timer
return function () {
if (timer) clearTimeout(timer), timer = null
timer = setTimeout(cb, timeout)
}
}

2

package.json
{
"name": "ssb-git-repo",
"version": "2.7.0",
"version": "2.8.0",
"description": "git repos in secure-scuttlebutt",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -135,3 +135,10 @@ # ssb-git-repo

} ]?,
tags: [ {
sha1: String,
object: String,
type: String?,
tag: String?,
} ]?,
commits_more: Number?,
tags_more: Number?,
num_objects: Number?,

@@ -157,5 +164,10 @@ object_ids: [ String ]?,

`"refs/heads/master"`
- `commits`: array of info about commits that are included in `packs`, for
display purposes
- `commits\_more`: number of commits included in `packs` but not in `commits`
- `commits`: array of info about commits that are included in `packs`
- `commits_more`: number of commits included in `packs` but not in `commits`
- `tags`: array of info about tags that are included in `packs`
- `tag.type`: type of the git object pointed to by the tag, e.g. "commit"
- `tag.object`: id of the git object pointed to by the tag
- `tag.tag`: name of the tag
- `tag.sha1`: id of the tag
- `tags_more`: number of tags included in `packs` but not in `tags`
- `num_objects`: number of objects included in `packs`

@@ -162,0 +174,0 @@ - `object_ids`: sha1 hashes of git objects included in `packs`, other than

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc