File tree Expand file tree Collapse file tree 11 files changed +126
-38
lines changed Expand file tree Collapse file tree 11 files changed +126
-38
lines changed Original file line number Diff line number Diff line change 1
- node_modules
1
+ ** /node_modules /
2
+ ** /* .log
3
+ test /repo-tests *
4
+
5
+ # Logs
6
+ logs
2
7
* .log
8
+
9
+ coverage
10
+
11
+ # Runtime data
12
+ pids
13
+ * .pid
14
+ * .seed
15
+
16
+ # Directory for instrumented libs generated by jscoverage/JSCover
17
+ lib-cov
18
+
19
+ # Coverage directory used by tools like istanbul
20
+ coverage
21
+
22
+ # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
23
+ .grunt
24
+
25
+ # node-waf configuration
26
+ .lock-wscript
27
+
28
+ build
29
+
30
+ # Dependency directory
31
+ # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
32
+ node_modules
33
+
34
+ lib
35
+ dist
Original file line number Diff line number Diff line change
1
+ ** /node_modules /
2
+ ** /* .log
3
+ test /repo-tests *
4
+
5
+ # Logs
6
+ logs
7
+ * .log
8
+
9
+ coverage
10
+
11
+ # Runtime data
12
+ pids
13
+ * .pid
14
+ * .seed
15
+
16
+ # Directory for instrumented libs generated by jscoverage/JSCover
17
+ lib-cov
18
+
19
+ # Coverage directory used by tools like istanbul
20
+ coverage
21
+
22
+ # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
23
+ .grunt
24
+
25
+ # node-waf configuration
26
+ .lock-wscript
27
+
28
+ build
29
+
30
+ # Dependency directory
31
+ # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
32
+ node_modules
Original file line number Diff line number Diff line change
1
+ sudo : false
1
2
language : node_js
2
3
node_js :
3
- - " 4"
4
- - " 5"
4
+ - 4
5
+ - 5
6
+ - stable
7
+
8
+ # Make sure we have new NPM.
9
+ before_install :
10
+ - npm install -g npm
11
+
12
+ script :
13
+ - npm run lint
14
+ - npm test
15
+ - npm run coverage
16
+
17
+ before_script :
18
+ - export DISPLAY=:99.0
19
+ - sh -e /etc/init.d/xvfb start
20
+
21
+ after_success :
22
+ - npm run coverage-publish
23
+
24
+ addons :
25
+ firefox : ' latest'
Original file line number Diff line number Diff line change 1
1
ipfsd-ctl
2
2
=========
3
3
4
- [ ![ ] ( https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square )] ( http://ipn.io ) [ ![ ] ( https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square )] ( http://ipfs.io/ ) [ ![ ] ( https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square )] ( http://webchat.freenode.net/?channels=%23ipfs )
5
- [ ![ Dependency Status] ( https://david-dm.org/ipfs/js-ipfsd-ctl.svg?style=flat-square )] ( https://david-dm.org/ipfs/js-ipfsd-ctl )
4
+ [ ![ ] ( https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square )] ( http://ipn.io )
5
+ [ ![ ] ( https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square )] ( http://ipfs.io/ )
6
+ [ ![ ] ( https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square )] ( http://webchat.freenode.net/?channels=%23ipfs )
7
+ [ ![ Coverage Status] ( https://coveralls.io/repos/github/ipfs/js-ipfsd-ctl/badge.svg?branch=master )] ( https://coveralls.io/github/ipfs/js-ipfsd-ctl?branch=master )
6
8
[ ![ Travis CI] ( https://travis-ci.org/ipfs/js-ipfsd-ctl.svg?branch=master )] ( https://travis-ci.org/ipfs/js-ipfsd-ctl )
7
9
[ ![ Circle CI] ( https://circleci.com/gh/ipfs/js-ipfsd-ctl.svg?style=svg )] ( https://circleci.com/gh/ipfs/js-ipfsd-ctl )
8
-
10
+ [ ![ Dependency Status ] ( https://david-dm.org/ipfs/js-ipfsd-ctl.svg?style=flat-square )] ( https://david-dm.org/ipfs/js-ipfsd-ctl ) [ ![ js-standard-style ] ( https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square )] ( https://github.com/feross/standard )
9
11
10
12
> Control an ipfs node daemon using Node.js
11
13
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
1
3
var ipfsd = require ( '../index.js' )
2
4
3
5
ipfsd . disposableApi ( function ( err , ipfs ) {
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
1
3
var ipfsd = require ( '../index.js' )
2
4
3
5
// opens an api connection to local running ipfs node
Original file line number Diff line number Diff line change 2
2
"name" : " ipfsd-ctl" ,
3
3
"version" : " 0.13.0" ,
4
4
"description" : " simple controls for an ipfs node" ,
5
- "main" : " index.js" ,
5
+ "main" : " lib/index.js" ,
6
+ "jsxnext:main" : " src/index.js" ,
6
7
"scripts" : {
7
- "test" : " node_modules/.bin/mocha test" ,
8
- "lint" : " standard"
8
+ "lint" : " aegir-lint" ,
9
+ "coverage" : " aegir-coverage" ,
10
+ "test" : " aegir-test --env node" ,
11
+ "build" : " aegir-build --env node" ,
12
+ "release" : " aegir-release --env node" ,
13
+ "release:minor" : " aegir-release --type minor --env node" ,
14
+ "release:major" : " aegir-release --type major --env node" ,
15
+ "coverage-publish" : " aegir-coverage publish"
9
16
},
10
17
"engines" : {
11
18
"node" : " >=4.2.2"
35
42
"async" : " ^1.5.0"
36
43
},
37
44
"devDependencies" : {
38
- "estraverse " : " ^4.1.1 " ,
45
+ "aegir " : " ^3.0.4 " ,
39
46
"mkdirp" : " ^0.5.1" ,
40
- "mocha" : " ^2.3.4" ,
41
- "pre-commit" : " ^1.1.2" ,
42
- "standard" : " ^6.0.8"
47
+ "pre-commit" : " ^1.1.2"
43
48
},
44
49
"repository" : {
45
50
"type" : " git" ,
Original file line number Diff line number Diff line change 3
3
const os = require ( 'os' )
4
4
const join = require ( 'path' ) . join
5
5
6
- const Node = require ( './lib/ node' )
6
+ const Node = require ( './node' )
7
7
8
8
function tempDir ( ) {
9
- return join ( os . tmpdir ( ) , `ipfs_${ ( Math . random ( ) + '' ) . substr ( 2 ) } ` )
9
+ return join ( os . tmpdir ( ) , `ipfs_${ String ( Math . random ( ) ) . substr ( 2 ) } ` )
10
10
}
11
11
12
12
module . exports = {
Original file line number Diff line number Diff line change @@ -126,17 +126,17 @@ module.exports = class Node {
126
126
127
127
this . subprocess = run ( this . exec , [ 'daemon' ] , { env : this . env } )
128
128
. on ( 'error' , ( err ) => {
129
- if ( ( err + '' ) . match ( 'daemon is running' ) ) {
129
+ if ( String ( err ) . match ( 'daemon is running' ) ) {
130
130
// we're good
131
131
done ( null , ipfs ( conf . Addresses . API ) )
132
- } else if ( ( err + '' ) . match ( 'non-zero exit code' ) ) {
132
+ } else if ( String ( err ) . match ( 'non-zero exit code' ) ) {
133
133
// ignore when kill -9'd
134
134
} else {
135
135
done ( err )
136
136
}
137
137
} )
138
138
. on ( 'data' , ( data ) => {
139
- const match = ( data + '' ) . trim ( ) . match ( / A P I s e r v e r l i s t e n i n g o n ( .* ) / )
139
+ const match = String ( data ) . trim ( ) . match ( / A P I s e r v e r l i s t e n i n g o n ( .* ) / )
140
140
if ( match ) {
141
141
this . apiAddr = match [ 1 ]
142
142
const addr = multiaddr ( this . apiAddr ) . nodeAddress ( )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments