Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ipfs-inactive/js-ipfs-http-client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v30.1.3
Choose a base ref
...
head repository: ipfs-inactive/js-ipfs-http-client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 29,997 additions and 8,082 deletions.
  1. +29 −5 .aegir.js
  2. +0 −1 .eslintignore
  3. +0 −5 .npmignore
  4. +35 −8 .travis.yml
  5. +562 −0 CHANGELOG.md
  6. +26 −0 CONTRIBUTING.md
  7. +5 −0 COPYRIGHT
  8. +5 −0 LICENSE-APACHE
  9. 0 LICENSE → LICENSE-MIT
  10. +217 −141 README.md
  11. +1 −0 examples/browser-pubsub/.gitignore
  12. +94 −0 examples/browser-pubsub/README.md
  13. +42 −0 examples/browser-pubsub/index.html
  14. +135 −0 examples/browser-pubsub/index.js
  15. +21 −0 examples/browser-pubsub/package.json
  16. +31 −0 examples/browser-pubsub/util.js
  17. +0 −1 examples/bundle-browserify/.gitignore
  18. +0 −35 examples/bundle-browserify/README.md
  19. BIN examples/bundle-browserify/img/1.png
  20. BIN examples/bundle-browserify/img/2.png
  21. +0 −26 examples/bundle-browserify/index.html
  22. +0 −36 examples/bundle-browserify/index.js
  23. +0 −18 examples/bundle-browserify/package.json
  24. +1 −1 examples/bundle-webpack/README.md
  25. +6 −9 examples/bundle-webpack/package.json
  26. +20 −17 examples/bundle-webpack/src/App.js
  27. +17 −10 examples/files-api/files-api.js
  28. +1 −2 examples/name-api/index.html
  29. +28 −29 examples/name-api/index.js
  30. +24,371 −989 examples/name-api/package-lock.json
  31. +9 −4 examples/name-api/package.json
  32. +2 −2 examples/sub-module/package.json
  33. +0 −11 examples/upload-file-via-browser/.eslintrc
  34. +1 −0 examples/upload-file-via-browser/.gitignore
  35. +0 −3 examples/upload-file-via-browser/README.md
  36. +1 −1 examples/upload-file-via-browser/index.html
  37. +9 −9 examples/upload-file-via-browser/package.json
  38. +0 −13 examples/upload-file-via-browser/server.js
  39. +32 −33 examples/upload-file-via-browser/src/App.js
  40. +1 −0 examples/upload-file-via-browser/src/index.js
  41. +0 −44 examples/upload-file-via-browser/webpack.config.js
  42. +9 −0 greenkeeper.json
  43. +11 −0 maintainer.json
  44. +71 −69 package.json
  45. +50 −0 src/add/form-data.browser.js
  46. +68 −0 src/add/form-data.js
  47. +75 −0 src/add/index.js
  48. +5 −11 src/bitswap/index.js
  49. +22 −14 src/bitswap/stat.js
  50. +20 −18 src/bitswap/unwant.js
  51. +20 −21 src/bitswap/wantlist.js
  52. +17 −54 src/block/get.js
  53. +6 −11 src/block/index.js
  54. +52 −58 src/block/put.js
  55. +48 −0 src/block/rm.js
  56. +18 −26 src/block/stat.js
  57. +21 −25 src/bootstrap/add.js
  58. +5 −11 src/bootstrap/index.js
  59. +15 −13 src/bootstrap/list.js
  60. +21 −25 src/bootstrap/rm.js
  61. +34 −0 src/cat.js
  62. +17 −12 src/commands.js
  63. +21 −33 src/config/get.js
  64. +6 −11 src/config/index.js
  65. +24 −0 src/config/profiles/apply.js
  66. +6 −0 src/config/profiles/index.js
  67. +19 −0 src/config/profiles/list.js
  68. +16 −20 src/config/replace.js
  69. +25 −26 src/config/set.js
  70. +26 −44 src/dag/get.js
  71. +5 −10 src/dag/index.js
  72. +35 −50 src/dag/put.js
  73. +31 −0 src/dag/resolve.js
  74. +49 −0 src/dht/find-peer.js
  75. +45 −0 src/dht/find-provs.js
  76. +0 −62 src/dht/findpeer.js
  77. +0 −71 src/dht/findprovs.js
  78. +31 −37 src/dht/get.js
  79. +9 −15 src/dht/index.js
  80. +40 −29 src/dht/provide.js
  81. +43 −20 src/dht/put.js
  82. +31 −37 src/dht/query.js
  83. +15 −13 src/diag/cmds.js
  84. +5 −11 src/diag/index.js
  85. +12 −13 src/diag/net.js
  86. +12 −13 src/diag/sys.js
  87. +16 −19 src/dns.js
  88. +0 −20 src/files-mfs/cp.js
  89. +0 −17 src/files-mfs/flush.js
  90. +0 −23 src/files-mfs/index.js
  91. +0 −12 src/files-mfs/ls-pull-stream.js
  92. +0 −62 src/files-mfs/ls-readable-stream.js
  93. +0 −37 src/files-mfs/ls.js
  94. +0 −18 src/files-mfs/mkdir.js
  95. +0 −20 src/files-mfs/mv.js
  96. +0 −26 src/files-mfs/read-pull-stream.js
  97. +0 −26 src/files-mfs/read-readable-stream.js
  98. +0 −19 src/files-mfs/read.js
  99. +0 −27 src/files-mfs/rm.js
  100. +0 −35 src/files-mfs/stat.js
  101. +0 −44 src/files-mfs/write.js
  102. +0 −40 src/files-regular/add-from-fs.js
  103. +0 −70 src/files-regular/add-from-url.js
  104. +0 −13 src/files-regular/add-pull-stream.js
  105. +0 −12 src/files-regular/add-readable-stream.js
  106. +0 −69 src/files-regular/add.js
  107. +0 −35 src/files-regular/cat-pull-stream.js
  108. +0 −35 src/files-regular/cat-readable-stream.js
  109. +0 −38 src/files-regular/cat.js
  110. +0 −44 src/files-regular/get-pull-stream.js
  111. +0 −34 src/files-regular/get-readable-stream.js
  112. +0 −52 src/files-regular/get.js
  113. +0 −25 src/files-regular/index.js
  114. +0 −74 src/files-regular/ls-pull-stream.js
  115. +0 −72 src/files-regular/ls-readable-stream.js
  116. +0 −73 src/files-regular/ls.js
  117. +24 −0 src/files/chmod.js
  118. +25 −0 src/files/cp.js
  119. +27 −0 src/files/flush.js
  120. +15 −0 src/files/index.js
  121. +50 −0 src/files/ls.js
  122. +35 −0 src/files/mkdir.js
  123. +25 −0 src/files/mv.js
  124. +27 −0 src/files/read.js
  125. +22 −0 src/files/rm.js
  126. +39 −0 src/files/stat.js
  127. +28 −0 src/files/touch.js
  128. +6 −8 src/{utils/find-sources.js → files/utils.js}
  129. +47 −0 src/files/write.js
  130. +9 −6 src/get-endpoint-config.js
  131. +54 −0 src/get.js
  132. +21 −26 src/id.js
  133. +36 −61 src/index.js
  134. +22 −13 src/key/export.js
  135. +19 −20 src/key/gen.js
  136. +25 −19 src/key/import.js
  137. +8 −14 src/key/index.js
  138. +14 −21 src/key/list.js
  139. +20 −17 src/key/rename.js
  140. +18 −15 src/key/rm.js
  141. +8 −0 src/lib/buffer-to-form-data.browser.js
  142. +33 −0 src/lib/buffer-to-form-data.js
  143. +96 −0 src/lib/configure.js
  144. +25 −0 src/lib/encode-buffer-uri-component.js
  145. +49 −0 src/lib/error-handler.js
  146. +13 −0 src/lib/mode-to-string.js
  147. +56 −0 src/lib/mtime-to-object.js
  148. +24 −0 src/lib/object-to-camel-with-metadata.js
  149. +21 −0 src/lib/object-to-camel.js
  150. +5 −11 src/log/index.js
  151. +18 −22 src/log/level.js
  152. +14 −13 src/log/ls.js
  153. +16 −16 src/log/tail.js
  154. +85 −0 src/ls.js
  155. +18 −25 src/mount.js
  156. +5 −11 src/name/index.js
  157. +23 −20 src/name/publish.js
  158. +17 −19 src/name/pubsub/cancel.js
  159. +4 −4 src/name/pubsub/index.js
  160. +14 −18 src/name/pubsub/state.js
  161. +13 −16 src/name/pubsub/subs.js
  162. +25 −17 src/name/resolve.js
  163. +0 −36 src/object/addLink.js
  164. +0 −35 src/object/appendData.js
  165. +16 −46 src/object/data.js
  166. +25 −64 src/object/get.js
  167. +9 −20 src/object/index.js
  168. +21 −49 src/object/links.js
  169. +21 −17 src/object/new.js
  170. +25 −0 src/object/patch/add-link.js
  171. +25 −0 src/object/patch/append-data.js
  172. +8 −0 src/object/patch/index.js
  173. +24 −0 src/object/patch/rm-link.js
  174. +25 −0 src/object/patch/set-data.js
  175. +29 −39 src/object/put.js
  176. +0 −35 src/object/rmLink.js
  177. +0 −34 src/object/setData.js
  178. +22 −18 src/object/stat.js
  179. +21 −19 src/pin/add.js
  180. +5 −11 src/pin/index.js
  181. +36 −28 src/pin/ls.js
  182. +20 −19 src/pin/rm.js
  183. +0 −34 src/ping-pull-stream.js
  184. +0 −30 src/ping-readable-stream.js
  185. +24 −57 src/ping.js
  186. +0 −212 src/pubsub.js
  187. +9 −0 src/pubsub/index.js
  188. +18 −0 src/pubsub/ls.js
  189. +26 −0 src/pubsub/peers.js
  190. +23 −0 src/pubsub/publish.js
  191. +86 −0 src/pubsub/subscribe.js
  192. +52 −0 src/pubsub/subscription-tracker.js
  193. +10 −0 src/pubsub/unsubscribe.js
  194. +0 −40 src/refs.js
  195. +61 −0 src/refs/index.js
  196. +22 −0 src/refs/local.js
  197. +25 −12 src/repo/gc.js
  198. +5 −11 src/repo/index.js
  199. +22 −22 src/repo/stat.js
  200. +16 −16 src/repo/version.js
  201. +23 −52 src/resolve.js
  202. +0 −32 src/stats/bitswap.js
  203. +0 −31 src/stats/bw-pull-stream.js
  204. +0 −31 src/stats/bw-readable-stream.js
  205. +0 −12 src/stats/bw-util.js
  206. +28 −23 src/stats/bw.js
  207. +5 −13 src/stats/index.js
  208. +0 −28 src/stats/repo.js
  209. +12 −8 src/stop.js
  210. +16 −27 src/swarm/addrs.js
  211. +19 −14 src/swarm/connect.js
  212. +19 −14 src/swarm/disconnect.js
  213. +7 −13 src/swarm/index.js
  214. +18 −20 src/swarm/localAddrs.js
  215. +39 −66 src/swarm/peers.js
  216. +11 −36 src/update.js
  217. +0 −17 src/utils/clean-cid.js
  218. +0 −21 src/utils/clean-multihash.js
  219. +0 −13 src/utils/default-config.js
  220. +0 −44 src/utils/file-result-stream-converter.js
  221. +0 −77 src/utils/load-commands.js
  222. +0 −22 src/utils/module-config.js
  223. +0 −128 src/utils/multipart.js
  224. +0 −23 src/utils/ping-message-converter.js
  225. +0 −27 src/utils/ping-message-stream.js
  226. +0 −106 src/utils/prepare-file.js
  227. +0 −49 src/utils/progress-stream.js
  228. +0 −34 src/utils/pubsub-message-stream.js
  229. +0 −39 src/utils/pubsub-message-utils.js
  230. +0 −156 src/utils/send-files-stream.js
  231. +0 −18 src/utils/send-one-file-multiple-results.js
  232. +0 −15 src/utils/send-one-file.js
  233. +0 −222 src/utils/send-request.js
  234. +0 −34 src/utils/stream-to-json-value.js
  235. +0 −18 src/utils/stream-to-value-with-transformer.js
  236. +0 −20 src/utils/stream-to-value.js
  237. +0 −9 src/utils/stringlist-to-array.js
  238. +0 −48 src/utils/tar-stream-to-objects.js
  239. +14 −25 src/version.js
  240. +8 −34 test/commands.spec.js
  241. +18 −43 test/constructor.spec.js
  242. +13 −26 test/custom-headers.spec.js
  243. +34 −64 test/dag.spec.js
  244. +17 −59 test/diag.spec.js
  245. +5 −33 test/endpoint-config.spec.js
  246. +1 −10 test/exports.spec.js
  247. +204 −308 test/files-mfs.spec.js
  248. +40 −73 test/get.spec.js
  249. +249 −155 test/interface.spec.js
  250. +18 −66 test/key.spec.js
  251. +80 −0 test/lib.configure.spec.js
  252. +52 −0 test/lib.error-handler.spec.js
  253. +28 −50 test/log.spec.js
  254. +0 −101 test/name.spec.js
  255. +30 −63 test/node/swarm.js
  256. +28 −165 test/ping.spec.js
  257. +0 −162 test/pubsub-in-browser.spec.js
  258. +0 −100 test/refs.spec.js
  259. +20 −40 test/repo.spec.js
  260. +80 −19 test/request-api.spec.js
  261. +36 −55 test/stats.spec.js
  262. +36 −61 test/sub-modules.spec.js
  263. +0 −16 test/utils/expect-timeout.js
  264. +21 −2 test/utils/factory.js
  265. +0 −49 test/utils/interface-common-factory.js
  266. +10 −0 test/utils/throws-async.js
34 changes: 29 additions & 5 deletions .aegir.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
'use strict'

const createServer = require('ipfsd-ctl').createServer

const server = createServer()
const EchoServer = require('interface-ipfs-core/src/utils/echo-http-server')
const server = createServer({
host: '127.0.0.1',
port: 43134
}, {
type: 'go',
ipfsHttpModule: require('./'),
ipfsBin: require('go-ipfs-dep').path()
})
const echoServer = EchoServer.createServer()

module.exports = {
bundlesize: { maxSize: '231kB' },
bundlesize: { maxSize: '90kB' },
webpack: {
resolve: {
mainFields: ['browser', 'main']
@@ -22,7 +30,23 @@ module.exports = {
singleRun: true
},
hooks: {
pre: server.start.bind(server),
post: server.stop.bind(server)
node: {
pre: () => echoServer.start(),
post: () => echoServer.stop()
},
browser: {
pre: () => {
return Promise.all([
server.start(),
echoServer.start()
])
},
post: () => {
return Promise.all([
server.stop(),
echoServer.stop()
])
}
}
}
}
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

5 changes: 0 additions & 5 deletions .npmignore

This file was deleted.

43 changes: 35 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,71 @@
language: node_js
cache: npm

branches:
only:
- master
- /^release\/.*$/

stages:
- check
- test
- cov

node_js:
- '12'
- '10'

os:
- linux
- osx
- windows

script: npx nyc -s npm run test:node -- --bail
after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov

jobs:
include:
- os: windows
filter_secrets: false
cache: false

- stage: check
script:
- npx aegir build --bundlesize
- npx aegir commitlint --travis
- npx aegir dep-check
- npx aegir dependency-check
- npm run lint

- stage: test
name: chrome
addons:
chrome: stable
script: npx aegir test -t browser -t webworker
script: npx aegir test -t browser

- stage: test
name: chrome webworker
addons:
chrome: stable
script: npx aegir test -t webworker

- stage: test
name: firefox
addons:
firefox: latest
script: npx aegir test -t browser -t webworker -- --browsers FirefoxHeadless
script: npx aegir test -t browser -- --browsers FirefoxHeadless

- stage: test
name: firefox webworker
addons:
firefox: latest
script: npx aegir test -t webworker -- --browsers FirefoxHeadless

- stage: test
name: electron-main
os: osx
script:
- npx aegir test -t electron-main --bail

- stage: test
name: electron-renderer
os: osx
script:
- npx aegir test -t electron-renderer --bail

notifications:
email: false
Loading