This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree 4 files changed +132
-88
lines changed
4 files changed +132
-88
lines changed Original file line number Diff line number Diff line change 40
40
},
41
41
"homepage" : " https://github.com./ipfs/js-ipfs#readme" ,
42
42
"devDependencies" : {
43
- "aegir" : " ^8.0.1 " ,
43
+ "aegir" : " ^8.1.2 " ,
44
44
"buffer-loader" : " 0.0.1" ,
45
45
"chai" : " ^3.5.0" ,
46
46
"execa" : " ^0.5.0" ,
47
47
"expose-loader" : " ^0.7.1" ,
48
48
"form-data" : " ^2.0.0" ,
49
49
"fs-pull-blob-store" : " ^0.4.1" ,
50
50
"gulp" : " ^3.9.1" ,
51
- "interface-ipfs-core" : " ^0.15.0 " ,
51
+ "interface-ipfs-core" : " ^0.16.6 " ,
52
52
"left-pad" : " ^1.1.1" ,
53
53
"lodash" : " ^4.15.0" ,
54
54
"ncp" : " ^2.0.0" ,
70
70
"glob" : " ^7.0.6" ,
71
71
"hapi" : " ^15.0.3" ,
72
72
"idb-pull-blob-store" : " ^0.5.1" ,
73
- "ipfs-api" : " ^9 .0.0" ,
73
+ "ipfs-api" : " ^10 .0.0" ,
74
74
"ipfs-bitswap" : " ^0.7.0" ,
75
75
"ipfs-block" : " ^0.4.0" ,
76
76
"ipfs-block-service" : " ^0.6.0" ,
77
77
"ipfs-multipart" : " ^0.1.0" ,
78
78
"ipfs-repo" : " ^0.10.0" ,
79
79
"ipfs-unixfs" : " ^0.1.4" ,
80
- "ipfs-unixfs-engine" : " ^0.11.3" ,
80
+ "ipfs-unixfs-engine" : " ^0.12.0" ,
81
+ "ipld-resolver" : " ^0.1.1" ,
81
82
"isstream" : " ^0.1.2" ,
82
83
"joi" : " ^9.0.4" ,
83
84
"libp2p-ipfs" : " ^0.14.1" ,
97
98
"peer-id" : " ^0.7.0" ,
98
99
"peer-info" : " ^0.7.1" ,
99
100
"promisify-es6" : " ^1.0.1" ,
100
- "pull-file" : " ^1.1ed .0" ,
101
+ "pull-file" : " ^1.0 .0" ,
101
102
"pull-paramap" : " ^1.1.6" ,
102
103
"pull-pushable" : " ^2.0.1" ,
103
104
"pull-sort" : " ^1.0.0" ,
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ module.exports = function files (self) {
32
32
33
33
add : promisify ( ( data , callback ) => {
34
34
if ( ! callback || typeof callback !== 'function' ) {
35
- callback = function noop ( ) { }
35
+ callback = noop
36
36
}
37
37
38
38
pull (
@@ -97,17 +97,22 @@ module.exports = function files (self) {
97
97
}
98
98
}
99
99
100
- function prepareFile ( self , file , cb ) {
100
+ function prepareFile ( self , file , callback ) {
101
101
const bs58mh = multihashes . toB58String ( file . multihash )
102
102
self . object . get ( file . multihash , ( err , node ) => {
103
103
if ( err ) {
104
- return cb ( err )
104
+ return callback ( err )
105
105
}
106
106
107
- cb ( null , {
108
- path : file . path || bs58mh ,
109
- hash : bs58mh ,
110
- size : node . size ( )
107
+ node . size ( ( err , size ) => {
108
+ if ( err ) {
109
+ return callback ( err )
110
+ }
111
+ callback ( null , {
112
+ path : file . path || bs58mh ,
113
+ hash : bs58mh ,
114
+ size : size
115
+ } )
111
116
} )
112
117
} )
113
118
}
@@ -147,3 +152,5 @@ function normalizeContent (content) {
147
152
return data
148
153
} )
149
154
}
155
+
156
+ function noop ( ) { }
You can’t perform that action at this time.
0 commit comments