File tree Expand file tree Collapse file tree 4 files changed +25
-25
lines changed Expand file tree Collapse file tree 4 files changed +25
-25
lines changed Original file line number Diff line number Diff line change 30
30
},
31
31
"homepage" : " https://github.com/ipfs/js-ipfs-unixfs#readme" ,
32
32
"devDependencies" : {
33
- "aegir" : " ^2 .1.1 " ,
33
+ "aegir" : " ^8 .1.2 " ,
34
34
"chai" : " ^3.5.0" ,
35
- "pre-commit" : " ^1.1.2 "
35
+ "pre-commit" : " ^1.1.3 "
36
36
},
37
37
"dependencies" : {
38
- "protocol-buffers" : " ^3.1.5 "
38
+ "protocol-buffers" : " ^3.1.6 "
39
39
},
40
40
"pre-commit" : [
41
41
" lint" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
- const fs = require ( 'fs' )
4
- const path = require ( 'path' )
5
3
const protobuf = require ( 'protocol-buffers' )
6
- const schema = fs . readFileSync ( path . resolve ( __dirname , '../protos/unixfs.proto' ) )
7
- const pb = protobuf ( schema )
4
+ const pb = protobuf ( require ( './unixfs.proto' ) )
8
5
// encode/decode
9
6
const unixfsData = pb . Data
10
7
// const unixfsMetadata = pb.MetaData // encode/decode
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
3
+ module . exports = new Buffer ( `message Data {
4
+ enum DataType {
5
+ Raw = 0;
6
+ Directory = 1;
7
+ File = 2;
8
+ Metadata = 3;
9
+ Symlink = 4;
10
+ }
11
+
12
+ required DataType Type = 1;
13
+ optional bytes Data = 2;
14
+ optional uint64 filesize = 3;
15
+ repeated uint64 blocksizes = 4;
16
+ }
17
+
18
+ message Metadata {
19
+ required string MimeType = 1;
20
+ }
21
+ ` )
You can’t perform that action at this time.
0 commit comments