This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 11 files changed +157
-6
lines changed Expand file tree Collapse file tree 11 files changed +157
-6
lines changed Original file line number Diff line number Diff line change 1+ const Command = require ( 'ronin' ) . Command
2+ const utils = require ( '../../utils' )
3+ const bs58 = require ( 'bs58' )
4+ const debug = require ( 'debug' )
5+ const log = debug ( 'cli:object' )
6+ log . error = debug ( 'cli:object:error' )
7+
8+ module . exports = Command . extend ( {
9+ desc : '' ,
10+
11+ options : { } ,
12+
13+ run : ( ) => {
14+ utils . getIPFS ( ( err , ipfs ) => {
15+ if ( err ) {
16+ throw err
17+ }
18+ // TODO
19+ } )
20+ }
21+ } )
Original file line number Diff line number Diff line change 1+ const Command = require ( 'ronin' ) . Command
2+ const utils = require ( '../../../utils' )
3+ const bs58 = require ( 'bs58' )
4+ const debug = require ( 'debug' )
5+ const log = debug ( 'cli:object' )
6+ log . error = debug ( 'cli:object:error' )
7+
8+ module . exports = Command . extend ( {
9+ desc : '' ,
10+
11+ options : { } ,
12+
13+ run : ( ) => {
14+ utils . getIPFS ( ( err , ipfs ) => {
15+ if ( err ) {
16+ throw err
17+ }
18+ // TODO
19+ } )
20+ }
21+ } )
Original file line number Diff line number Diff line change 1+ const Command = require ( 'ronin' ) . Command
2+ const utils = require ( '../../utils' )
3+ const bs58 = require ( 'bs58' )
4+ const debug = require ( 'debug' )
5+ const log = debug ( 'cli:object' )
6+ log . error = debug ( 'cli:object:error' )
7+
8+ module . exports = Command . extend ( {
9+ desc : '' ,
10+
11+ options : { } ,
12+
13+ run : ( ) => {
14+ utils . getIPFS ( ( err , ipfs ) => {
15+ if ( err ) {
16+ throw err
17+ }
18+ // TODO
19+ } )
20+ }
21+ } )
Original file line number Diff line number Diff line change 1+ const Command = require ( 'ronin' ) . Command
2+ const utils = require ( '../../utils' )
3+ const bs58 = require ( 'bs58' )
4+ const debug = require ( 'debug' )
5+ const log = debug ( 'cli:object' )
6+ log . error = debug ( 'cli:object:error' )
7+
8+ module . exports = Command . extend ( {
9+ desc : '' ,
10+
11+ options : { } ,
12+
13+ run : ( ) => {
14+ utils . getIPFS ( ( err , ipfs ) => {
15+ if ( err ) {
16+ throw err
17+ }
18+ // TODO
19+ } )
20+ }
21+ } )
Original file line number Diff line number Diff line change 1+ const Command = require ( 'ronin' ) . Command
2+ const utils = require ( '../../utils' )
3+ const bs58 = require ( 'bs58' )
4+ const debug = require ( 'debug' )
5+ const log = debug ( 'cli:object' )
6+ log . error = debug ( 'cli:object:error' )
7+
8+ module . exports = Command . extend ( {
9+ desc : '' ,
10+
11+ options : { } ,
12+
13+ run : ( ) => {
14+ utils . getIPFS ( ( err , ipfs ) => {
15+ if ( err ) {
16+ throw err
17+ }
18+ // TODO
19+ } )
20+ }
21+ } )
Original file line number Diff line number Diff line change @@ -323,11 +323,15 @@ function IPFS (repo) {
323323 libp2pNode . swarm . close ( callback )
324324 } ,
325325 swarm : {
326- peers : ( ) => { } ,
326+ peers : ( callback ) => {
327+ callback ( null , [ ] )
328+ } ,
329+ // all the addrs we know
327330 addrs : notImpl ,
331+ localAddrs : notImpl ,
328332 connect : notImpl ,
329333 disconnect : notImpl ,
330- filters : notImpl
334+ filters : notImpl // TODO
331335 } ,
332336 routing : { } ,
333337 records : { } ,
Original file line number Diff line number Diff line change 1+ const resources = require ( './../resources' )
2+
3+ module . exports = ( server ) => {
4+ const api = server . select ( 'API' )
5+
6+ api . route ( {
7+ method : 'GET' ,
8+ path : '/api/v0/swarm/addrs' ,
9+ config : {
10+ handler : resources . swarm . addrs . handler
11+ }
12+ } )
13+
14+ api . route ( {
15+ method : 'GET' ,
16+ path : '/api/v0/swarm/addrs/local' ,
17+ config : {
18+ handler : resources . swarm . localAddrs . handler
19+ }
20+ } )
21+
22+ api . route ( {
23+ method : 'GET' ,
24+ path : '/api/v0/swarm/connect' ,
25+ config : {
26+ handler : resources . swarm . connect
27+ }
28+ } )
29+
30+ api . route ( {
31+ method : 'GET' ,
32+ path : '/api/v0/swarm/disconnect' ,
33+ config : {
34+ handler : resources . swarm . disconnect
35+ }
36+ } )
37+
38+ // TODO
39+ // api.route({
40+ // method: 'GET',
41+ // path: '/api/v0/swarm/filters',
42+ // config: {
43+ // handler: resources.swarm.disconnect
44+ // }
45+ // })
46+ }
Original file line number Diff line number Diff line change 22
33const expect = require ( 'chai' ) . expect
44
5- process . env . IPFS_PATH = process . cwd ( ) + '/tests/repo-example'
65const IPFS = require ( '../../src/core' )
76
87describe ( 'bootstrap' , ( ) => {
Original file line number Diff line number Diff line change 22
33const expect = require ( 'chai' ) . expect
44
5- process . env . IPFS_PATH = process . cwd ( ) + '/tests/repo-example'
65const IPFS = require ( '../../src/core' )
76
87describe ( 'id' , ( ) => {
Original file line number Diff line number Diff line change 22
33const expect = require ( 'chai' ) . expect
44
5- process . env . IPFS_PATH = process . cwd ( ) + '/tests/repo-example'
65const IPFS = require ( '../../src/core' )
76
87describe ( 'swarm' , ( ) => {
You can’t perform that action at this time.
0 commit comments