This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +14
-8
lines changed
examples/bundle-browserify Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 11
11
"keywords" : [],
12
12
"license" : " MIT" ,
13
13
"devDependencies" : {
14
- "browserify" : " ^13.1.1 " ,
15
- "concat-stream" : " ^1.5.2 " ,
14
+ "browserify" : " ^14.0.0 " ,
15
+ "concat-stream" : " ^1.6.0 " ,
16
16
"http-server" : " ^0.9.0" ,
17
17
"browserify-zlib-next" : " ^1.0.1"
18
18
},
Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
- var IPFS = require ( '../../../src/core' ) // replace this by line below
3
+ const concat = require ( 'concat-stream' )
4
+ const IPFS = require ( '../../../src/core' ) // replace this by line below
4
5
// var IPFS = require('ipfs')
5
6
6
7
// Create the IPFS node instance
7
8
// for simplicity, we create a new repo everytime the node
8
9
// is created, because you can't init already existing repos
9
10
const repoPath = String ( Math . random ( ) )
11
+
10
12
const node = new IPFS ( {
11
13
repo : repoPath ,
12
14
EXPERIMENTAL : {
13
15
pubsub : false
14
16
}
15
17
} )
16
- const concat = require ( 'concat-stream' )
18
+
19
+ // expose the node to the window, for the fun!
20
+ window . ipfs = node
17
21
18
22
node . init ( { emptyRepo : true , bits : 2048 } , function ( err ) {
19
23
if ( err ) {
Original file line number Diff line number Diff line change 90
90
"async" : " ^2.1.4" ,
91
91
"bl" : " ^1.2.0" ,
92
92
"boom" : " ^4.2.0" ,
93
- "debug" : " ^2.6.0 " ,
93
+ "debug" : " ^2.6.1 " ,
94
94
"fs-pull-blob-store" : " ~0.3.0" ,
95
95
"glob" : " ^7.1.1" ,
96
96
"hapi" : " ^16.1.0" ,
109
109
"isstream" : " ^0.1.2" ,
110
110
"joi" : " ^10.2.2" ,
111
111
"libp2p-floodsub" : " ~0.7.3" ,
112
- "libp2p-ipfs-browser" : " ~0.18.0 " ,
113
- "libp2p-ipfs-nodejs" : " ~0.18.0 " ,
112
+ "libp2p-ipfs-browser" : " ~0.18.2 " ,
113
+ "libp2p-ipfs-nodejs" : " ~0.18.1 " ,
114
114
"lodash.flatmap" : " ^4.5.0" ,
115
115
"lodash.get" : " ^4.4.2" ,
116
116
"lodash.has" : " ^4.5.2" ,
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ class IPFS {
22
22
configOpts . EXPERIMENTAL = configOpts . EXPERIMENTAL || { }
23
23
24
24
// IPFS utils
25
- this . types = { }
25
+ this . types = {
26
+ Buffer : Buffer
27
+ }
26
28
this . log = debug ( 'jsipfs' )
27
29
this . log . err = debug ( 'jsipfs:err' )
28
30
You can’t perform that action at this time.
0 commit comments