diff --git a/package-lock.json b/package-lock.json index 55b425e..e065870 100644 --- a/package-lock.json +++ b/package-lock.json @@ -507,6 +507,11 @@ "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "dev": true }, + "asmcrypto.js": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/asmcrypto.js/-/asmcrypto.js-2.3.2.tgz", + "integrity": "sha512-3FgFARf7RupsZETQ1nHnhLUUvpcttcCq1iZCaVAbJZbCZ5VNRrNyvpDyHTOb0KC3llFcsyOT/a99NZcCbeiEsA==" + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -1675,14 +1680,14 @@ } }, "bignumber.js": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-8.0.2.tgz", - "integrity": "sha512-EiuvFrnbv0jFixEQ9f58jo7X0qI2lNGIr/MxntmVzQc5JUweDSh8y8hbTCAomFtqwUPIOWcLXP0VEOSZTG7FFw==" + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-8.1.1.tgz", + "integrity": "sha512-QD46ppGintwPGuL1KqmwhR0O+N2cZUg8JG/VzwI2e28sM9TqHjQB10lI4QAaMHVbLzwVLLAwEglpKPViWX+5NQ==" }, "bindings": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.4.0.tgz", - "integrity": "sha512-7znEVX22Djn+nYjxCWKDne0RRloa9XfYa84yk3s+HkE3LpDYZmhArYr9O9huBoHY3/oXispx5LorIX7Sl2CgSQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", "requires": { "file-uri-to-path": "1.0.0" } @@ -1696,12 +1701,23 @@ } }, "bl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.0.tgz", - "integrity": "sha512-wbgvOpqopSr7uq6fJrLH8EsvYMJf9gzfo2jCsL2eTy75qXPukA4pCgHamOQkZtY5vmfVtjB+P3LNlMHW5CEZXA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-3.0.0.tgz", + "integrity": "sha512-EUAyP5UHU5hxF8BPT0LKW8gjYLhq1DQIcneOX/pL/m2Alo+OYDQAJlHq+yseMP50Os2nHXOSic6Ss3vSQeyf4A==", "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" + "readable-stream": "^3.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", + "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } } }, "blakejs": { @@ -1768,7 +1784,7 @@ }, "browserify-aes": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "requires": { "buffer-xor": "^1.0.3", @@ -1806,29 +1822,11 @@ "node-int64": "^0.4.0" } }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" - }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true }, "buffer-xor": { "version": "1.0.3", @@ -1945,13 +1943,13 @@ "dev": true }, "cids": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/cids/-/cids-0.5.7.tgz", - "integrity": "sha512-SlAz4p8XMEW3mhwiYbzfjn+5+Y//+kIuHqzRUytK0a3uGBnsjJb76xHliehv0HcVMCjRKv2vZnPTwd4QX+IcMA==", + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.5.8.tgz", + "integrity": "sha512-Ye8TZP3YQfy0j+i5k+LPHdTY3JOvTwN1pxds44p6BRUv8PTMOAF/Vt4Bc+oiIQ0Sktn0iftkUHgqKNHIMwhshA==", "requires": { "class-is": "^1.1.0", "multibase": "~0.6.0", - "multicodec": "~0.2.7", + "multicodec": "~0.5.0", "multihashes": "~0.4.14" } }, @@ -2110,9 +2108,9 @@ } }, "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==" + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==" }, "component-emitter": { "version": "1.2.1", @@ -2126,20 +2124,17 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", - "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "version": "github:hugomrdias/concat-stream#057bc7b5d6d8df26c8cf00a3f151b6721a0a8034", + "from": "github:hugomrdias/concat-stream#feat/smaller", "requires": { - "buffer-from": "^1.0.0", "inherits": "^2.0.3", - "readable-stream": "^3.0.2", - "typedarray": "^0.0.6" + "readable-stream": "^3.0.2" }, "dependencies": { "readable-stream": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.1.tgz", - "integrity": "sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", + "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -2182,7 +2177,7 @@ }, "create-hash": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "requires": { "cipher-base": "^1.0.1", @@ -2194,7 +2189,7 @@ }, "create-hmac": { "version": "1.1.7", - "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "requires": { "cipher-base": "^1.0.3", @@ -3446,12 +3441,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3466,17 +3463,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -3593,7 +3593,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -3605,6 +3606,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3619,6 +3621,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -3626,12 +3629,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -3650,6 +3655,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -3730,7 +3736,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -3742,6 +3749,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3863,6 +3871,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4267,9 +4276,9 @@ } }, "ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==" + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" }, "ignore": { "version": "4.0.6", @@ -4375,20 +4384,6 @@ "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" }, - "ip-address": { - "version": "5.8.9", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-5.8.9.tgz", - "integrity": "sha512-7ay355oMN34iXhET1BmCJVsHjOTSItEEIIpOs38qUC23AIhOy+xIPnkrTuEFjeLMrTJ7m8KMXWgWfy/2Vn9sDw==", - "requires": { - "jsbn": "1.1.0", - "lodash.find": "^4.6.0", - "lodash.max": "^4.0.1", - "lodash.merge": "^4.6.0", - "lodash.padstart": "^4.6.1", - "lodash.repeat": "^4.1.0", - "sprintf-js": "1.1.0" - } - }, "ip-regex": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", @@ -4404,16 +4399,16 @@ } }, "ipfs-http-client": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-29.1.0.tgz", - "integrity": "sha512-oSdPGYyEqc7p7tj9xiFaFYVSPlzTaL1yupKoZa+iZkG99/G4ejEOdeJnkr4wlGlSKry+BZFYvELImdkEuDh7RQ==", + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-30.1.2.tgz", + "integrity": "sha512-WhK9kzUw8+mYgZoidplxUAy5C3XJNfrfDsWREg11PT+XFeyROsMByRlcKkW/xDwOZsu0+wBuFGRkIKBoETTdLg==", "requires": { "async": "^2.6.1", "bignumber.js": "^8.0.2", - "bl": "^2.1.2", + "bl": "^3.0.0", "bs58": "^4.0.1", "cids": "~0.5.5", - "concat-stream": "^2.0.0", + "concat-stream": "github:hugomrdias/concat-stream#057bc7b5d6d8df26c8cf00a3f151b6721a0a8034", "debug": "^4.1.0", "detect-node": "^2.0.4", "end-of-stream": "^1.4.1", @@ -4421,34 +4416,34 @@ "flatmap": "0.0.3", "glob": "^7.1.3", "ipfs-block": "~0.8.0", - "ipfs-unixfs": "~0.1.16", - "ipld-dag-cbor": "~0.13.0", - "ipld-dag-pb": "~0.15.0", - "is-ipfs": "~0.4.7", + "ipld-dag-cbor": "~0.13.1", + "ipld-dag-pb": "~0.15.3", + "is-ipfs": "~0.6.0", "is-pull-stream": "0.0.0", "is-stream": "^1.1.0", - "libp2p-crypto": "~0.16.0", - "lodash": "^4.17.11", + "iso-stream-http": "~0.1.2", + "iso-url": "~0.4.6", + "just-kebab-case": "^1.1.0", + "just-map-keys": "^1.1.0", "lru-cache": "^5.1.1", - "multiaddr": "^6.0.0", + "multiaddr": "^6.0.6", "multibase": "~0.6.0", + "multicodec": "~0.5.0", "multihashes": "~0.4.14", - "ndjson": "^1.5.0", + "ndjson": "github:hugomrdias/ndjson#4db16da6b42e5b39bf300c3a7cde62abb3fa3a11", "once": "^1.4.0", - "peer-id": "~0.12.1", - "peer-info": "~0.15.0", + "peer-id": "~0.12.2", + "peer-info": "~0.15.1", "promisify-es6": "^1.0.3", "pull-defer": "~0.2.3", - "pull-pushable": "^2.2.0", - "pull-stream-to-stream": "^1.3.4", + "pull-stream": "^3.6.9", + "pull-to-stream": "~0.1.0", "pump": "^3.0.0", "qs": "^6.5.2", - "readable-stream": "^3.0.6", - "stream-http": "^3.0.0", + "readable-stream": "^3.1.1", "stream-to-pull-stream": "^1.7.2", - "streamifier": "~0.1.1", - "tar-stream": "^1.6.2", - "through2": "^3.0.0" + "tar-stream": "^2.0.1", + "through2": "^3.0.1" }, "dependencies": { "debug": { @@ -4468,24 +4463,15 @@ } }, "readable-stream": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.1.tgz", - "integrity": "sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", + "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, - "through2": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.0.tgz", - "integrity": "sha512-8B+sevlqP4OiCjonI1Zw03Sf8PuV1eRsYQgLad5eonILOdyeRsY27A/2Ze8IlvlMvq31OH+3fz/styI7Ya62yQ==", - "requires": { - "readable-stream": "2 || 3", - "xtend": "~4.0.1" - } - }, "yallist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", @@ -4493,14 +4479,6 @@ } } }, - "ipfs-unixfs": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-0.1.16.tgz", - "integrity": "sha512-TX9Dyu77MxpLzGh/LcQne95TofOyvOeW0oOi72aBMMcV1ItP3684e6NTG9KY1qzdrC+ZUR8kT7y18J058n8KXg==", - "requires": { - "protons": "^1.0.1" - } - }, "ipld-dag-cbor": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/ipld-dag-cbor/-/ipld-dag-cbor-0.13.1.tgz", @@ -4516,15 +4494,15 @@ } }, "ipld-dag-pb": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.15.2.tgz", - "integrity": "sha512-9mzeYW4FneGROH+/PXMbXsfy3cUsMYHaI6vUu8nNpSTyQdGF+fa1ViA+jvqWzM8zXYwG4OOSCAAADssJeELAvw==", + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.15.3.tgz", + "integrity": "sha512-J1RJzSVCaOpxPmSzXbwVNsAZPHctjY4OjqG1dMIG86Z37CKvuy1QwCFkDhNccUTcQpF3sXfj5e0ZUyMM035vzg==", "requires": { "async": "^2.6.1", "bs58": "^4.0.1", "cids": "~0.5.4", "class-is": "^1.1.0", - "is-ipfs": "~0.4.2", + "is-ipfs": "~0.6.0", "multihashing-async": "~0.5.1", "protons": "^1.0.1", "pull-stream": "^3.6.9", @@ -4685,12 +4663,14 @@ } }, "is-ipfs": { - "version": "0.4.8", - "resolved": "https://registry.npmjs.org/is-ipfs/-/is-ipfs-0.4.8.tgz", - "integrity": "sha512-xIKUeA24IFMfkmeAPEOZL448X7a08c/KzAGQp1e/QxC9bx/NNEdT/ohob3SW6eJO2UwJNjsbfMeNZ2B+Dk2Fdg==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/is-ipfs/-/is-ipfs-0.6.0.tgz", + "integrity": "sha512-q/CO69rN+vbw9eGXGQOAa15zXq+pSyhdKvE7mqvuplDu67LyT3H9t3RyYQvKpueN7dL4f6fbyjEMPp9J3rJ4qA==", "requires": { - "bs58": "4.0.1", + "bs58": "^4.0.1", "cids": "~0.5.6", + "mafmt": "^v6.0.7", + "multiaddr": "^6.0.4", "multibase": "~0.6.0", "multihashes": "~0.4.13" } @@ -4827,6 +4807,28 @@ "resolved": "https://registry.npmjs.org/iso-random-stream/-/iso-random-stream-1.1.0.tgz", "integrity": "sha512-ywSWt0KrWcsaK0jVoVJIR30rLyjg9Rw3k2Sm/qp+3tdtSV0SNH7L7KilKnENcENOSoJxDFvpt2idvuMMQohdCQ==" }, + "iso-stream-http": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/iso-stream-http/-/iso-stream-http-0.1.2.tgz", + "integrity": "sha512-oHEDNOysIMTNypbg2f1SlydqRBvjl4ZbSE9+0awVxnkx3K2stGTFwB/kpVqnB6UEfF8QD36kAjDwZvqyXBLMnQ==", + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", + "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "iso-url": { "version": "0.4.6", "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-0.4.6.tgz", @@ -5685,11 +5687,6 @@ "esprima": "^4.0.0" } }, - "jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha1-sBMHyym2GKHtJux56RH4A8TaAEA=" - }, "jsdom": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", @@ -5805,6 +5802,16 @@ "array-includes": "^3.0.3" } }, + "just-kebab-case": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/just-kebab-case/-/just-kebab-case-1.1.0.tgz", + "integrity": "sha512-QkuwuBMQ9BQHMUEkAtIA4INLrkmnnveqlFB1oFi09gbU0wBdZo6tTnyxNWMR84zHxBuwK7GLAwqN8nrvVxOLTA==" + }, + "just-map-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/just-map-keys/-/just-map-keys-1.1.0.tgz", + "integrity": "sha512-oNKi+4y7fr8lXnhKYpBbCkiwHRVkAnx0VDkCeTDtKKMzGr1Lz1Yym+RSieKUTKim68emC5Yxrb4YmiF9STDO+g==" + }, "keypair": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/keypair/-/keypair-1.0.1.tgz", @@ -5848,17 +5855,19 @@ } }, "libp2p-crypto": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.16.0.tgz", - "integrity": "sha512-Msu7PIumcVRO8LajSGs6uVZpC7bOiJVWu0a8iFMZ6mdbasI+A6accAmP/NjJ5WBcEdxzwjzQGNP23bQQzPoqqg==", + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.16.1.tgz", + "integrity": "sha512-+fxqy+cDjwOKK4KTj44WQmjPE5ep2eR5uAIQWHl/+RKvRSor3+RAY53VWkAecgAEvjX2AswxBsoCIJK1Qk5aIQ==", "requires": { + "asmcrypto.js": "^2.3.2", "asn1.js": "^5.0.1", "async": "^2.6.1", + "bn.js": "^4.11.8", "browserify-aes": "^1.2.0", "bs58": "^4.0.1", "iso-random-stream": "^1.1.0", "keypair": "^1.0.1", - "libp2p-crypto-secp256k1": "~0.2.3", + "libp2p-crypto-secp256k1": "~0.3.0", "multihashing-async": "~0.5.1", "node-forge": "~0.7.6", "pem-jwk": "^2.0.0", @@ -5869,11 +5878,12 @@ } }, "libp2p-crypto-secp256k1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/libp2p-crypto-secp256k1/-/libp2p-crypto-secp256k1-0.2.3.tgz", - "integrity": "sha512-DFrK89VdboacqM3vqWV8yt8FH9Ni181JJAOU2tRkJfUN9tNEV7VfZEg390NJxEQQbLsyH4HZ7on3QTpPHMHQZQ==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/libp2p-crypto-secp256k1/-/libp2p-crypto-secp256k1-0.3.0.tgz", + "integrity": "sha512-+rF3S5p2pzS4JLDwVE6gLWZeaKkpl4NkYwG+0knV6ot29UcRSb73OyCWl07r1h5+g9E3KZC3wpsu+RIK5w8zQA==", "requires": { "async": "^2.6.1", + "bs58": "^4.0.1", "multihashing-async": "~0.5.1", "nodeify": "^1.0.1", "safe-buffer": "^5.1.2", @@ -5897,41 +5907,6 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, - "lodash.filter": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", - "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=" - }, - "lodash.find": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.find/-/lodash.find-4.6.0.tgz", - "integrity": "sha1-ywcE1Hq3F4n/oN6Ll92Sb7iLE7E=" - }, - "lodash.map": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", - "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" - }, - "lodash.max": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.max/-/lodash.max-4.0.1.tgz", - "integrity": "sha1-hzVWbGGLNan3YFILSHrnllivE2o=" - }, - "lodash.merge": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz", - "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==" - }, - "lodash.padstart": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz", - "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=" - }, - "lodash.repeat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/lodash.repeat/-/lodash.repeat-4.1.0.tgz", - "integrity": "sha1-/H3oEx2MisB+S0n3T/6CnR8r7EQ=" - }, "lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -5963,25 +5938,11 @@ } }, "mafmt": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/mafmt/-/mafmt-6.0.5.tgz", - "integrity": "sha512-EWVxw6KdSezUhKMN2vL7zEuBL7jtidy8N3oDIeAjCdpUo44+2a2j2vhNi94wEkbu0wa2pNQMWjFlSZYL9mOMfQ==", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/mafmt/-/mafmt-6.0.7.tgz", + "integrity": "sha512-2OG/EGAJZmpZBl7YRT1hD83sZa2gKsUEdegRuURreIOe7B4VeHU1rYYmhgk7BkLzknGL3xGYsDx3bbSgEEzE7g==", "requires": { - "multiaddr": "^6.0.3" - }, - "dependencies": { - "multiaddr": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-6.0.4.tgz", - "integrity": "sha512-oi7ImOEwPTRjHSOeOe0DgoxHLChHniME2on8G00fUwD88k4R2J2yrpd5643M9c8EqVuyvjy/e/zAZofpKIISyw==", - "requires": { - "bs58": "^4.0.1", - "class-is": "^1.1.0", - "ip": "^1.1.5", - "is-ip": "^2.0.0", - "varint": "^5.0.0" - } - } + "multiaddr": "^6.0.4" } }, "makeerror": { @@ -6148,18 +6109,15 @@ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, "multiaddr": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-6.0.0.tgz", - "integrity": "sha512-2jZgvRFd2C7cNV6l0O5232/ZEnKN6PO+7xDw0haJ/Uh92Zgna6K98JvLykBodMXwXcbTY8j9kxu8Zi6NYGpuMQ==", + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-6.0.6.tgz", + "integrity": "sha512-nR4s91mi7IKed1jrqUj/4OhZ1VKdAjUG79IuVB5PS6b+qxOZLKPW8nsskHhrfGn4o1Rn1NJWl7znidF/NVQpEA==", "requires": { "bs58": "^4.0.1", "class-is": "^1.1.0", "ip": "^1.1.5", - "ip-address": "^5.8.9", - "lodash.filter": "^4.6.0", - "lodash.map": "^4.6.0", - "varint": "^5.0.0", - "xtend": "^4.0.1" + "is-ip": "^2.0.0", + "varint": "^5.0.0" } }, "multibase": { @@ -6171,9 +6129,9 @@ } }, "multicodec": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.2.7.tgz", - "integrity": "sha512-96xc9zs7bsclMW0Po9ERnRFqcsWHY8OZ8JW/I8DeHG58YYJZy3cBGI00Ze7hz9Ix56DNHMTSxEj9cgoZByruMg==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.0.tgz", + "integrity": "sha512-lKsJeT4cKeSq0rVEWhO3oSBgDN4sMY1sNZKlvl68g/ZAahjPS1KIVyF4IqhuYmCdtOyKs4Q4hQ6M0C3iqRnuqQ==", "requires": { "varint": "^5.0.0" } @@ -6261,14 +6219,13 @@ "dev": true }, "ndjson": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/ndjson/-/ndjson-1.5.0.tgz", - "integrity": "sha1-rmA7NrE0vOw0e0UkIrC/mNWDLsg=", + "version": "github:hugomrdias/ndjson#4db16da6b42e5b39bf300c3a7cde62abb3fa3a11", + "from": "github:hugomrdias/ndjson#feat/readable-stream3", "requires": { "json-stringify-safe": "^5.0.1", "minimist": "^1.2.0", - "split2": "^2.1.0", - "through2": "^2.0.3" + "split2": "^3.1.0", + "through2": "^3.0.0" } }, "nice-try": { @@ -6357,6 +6314,11 @@ "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, + "object-assign": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", + "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=" + }, "object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", @@ -6581,20 +6543,6 @@ "multiaddr": "^6.0.3", "peer-id": "~0.12.2", "unique-by": "^1.0.0" - }, - "dependencies": { - "multiaddr": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-6.0.4.tgz", - "integrity": "sha512-oi7ImOEwPTRjHSOeOe0DgoxHLChHniME2on8G00fUwD88k4R2J2yrpd5643M9c8EqVuyvjy/e/zAZofpKIISyw==", - "requires": { - "bs58": "^4.0.1", - "class-is": "^1.1.0", - "ip": "^1.1.5", - "is-ip": "^2.0.0", - "varint": "^5.0.0" - } - } } }, "pem-jwk": { @@ -6819,7 +6767,7 @@ }, "promise": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/promise/-/promise-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/promise/-/promise-1.3.0.tgz", "integrity": "sha1-5cyaTIJ45GZP/twBx9qEhCsEAXU=", "requires": { "is-promise": "~1" @@ -6891,20 +6839,30 @@ "resolved": "https://registry.npmjs.org/pull-defer/-/pull-defer-0.2.3.tgz", "integrity": "sha512-/An3KE7mVjZCqNhZsr22k1Tx8MACnUnHZZNPSJ0S62td8JtYr/AiRG42Vz7Syu31SoTLUzVIe61jtT/pNdjVYA==" }, - "pull-pushable": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/pull-pushable/-/pull-pushable-2.2.0.tgz", - "integrity": "sha1-Xy867UethpGfAbEqLpnW8b13ZYE=" - }, "pull-stream": { "version": "3.6.9", "resolved": "https://registry.npmjs.org/pull-stream/-/pull-stream-3.6.9.tgz", "integrity": "sha512-hJn4POeBrkttshdNl0AoSCVjMVSuBwuHocMerUdoZ2+oIUzrWHFTwJMlbHND7OiKLVgvz6TFj8ZUVywUMXccbw==" }, - "pull-stream-to-stream": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/pull-stream-to-stream/-/pull-stream-to-stream-1.3.4.tgz", - "integrity": "sha1-P4HYIWvRjSv9GhmBkEcRgOJzg5k=" + "pull-to-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/pull-to-stream/-/pull-to-stream-0.1.0.tgz", + "integrity": "sha512-LMvdE0JwT7XQZMFjc7JDl/G9gmoZ8Zo8e86SG4ZZUcjuwvod803KxpAK8WrmdxzHsMRK9DETlIzuA0tbEVv6jg==", + "requires": { + "readable-stream": "^3.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", + "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } }, "pull-traverse": { "version": "1.0.3", @@ -7237,13 +7195,6 @@ "requires": { "object-assign": "^2.0.0", "rsa-unpack": "0.0.6" - }, - "dependencies": { - "object-assign": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", - "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=" - } } }, "rsa-unpack": { @@ -7678,7 +7629,7 @@ }, "sha.js": { "version": "2.4.11", - "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "requires": { "inherits": "^2.0.1", @@ -7948,18 +7899,25 @@ } }, "split2": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", - "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.1.1.tgz", + "integrity": "sha512-emNzr1s7ruq4N+1993yht631/JH+jaj0NYBosuKmLcq+JkGQ9MmTw1RB1fGaTCzUuseRIClrlSLHRNYGwWQ58Q==", "requires": { - "through2": "^2.0.2" + "readable-stream": "^3.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", + "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } } }, - "sprintf-js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.0.tgz", - "integrity": "sha1-z/yvcC2vZeo5u04PorKZzsGhvkY=" - }, "sshpk": { "version": "1.14.2", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", @@ -8060,43 +8018,15 @@ "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", "dev": true }, - "stream-http": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.0.0.tgz", - "integrity": "sha512-JELJfd+btL9GHtxU3+XXhg9NLYrKFnhybfvRuDghtyVkOFydz3PKNT1df07AMr88qW03WHF+FSV0PySpXignCA==", - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^3.0.6", - "xtend": "^4.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.1.tgz", - "integrity": "sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, "stream-to-pull-stream": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/stream-to-pull-stream/-/stream-to-pull-stream-1.7.2.tgz", - "integrity": "sha1-dXYJrhzr0zx0MtSvvjH/eGULnd4=", + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/stream-to-pull-stream/-/stream-to-pull-stream-1.7.3.tgz", + "integrity": "sha512-6sNyqJpr5dIOQdgNy/xcDWwDuzAsAwVzhzrWlAPAQ7Lkjx/rv0wgvxEyKwTq6FmNd5rjTrELt/CLmaSw7crMGg==", "requires": { "looper": "^3.0.0", "pull-stream": "^3.2.3" } }, - "streamifier": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/streamifier/-/streamifier-0.1.1.tgz", - "integrity": "sha1-l+mNj6TRBdYqJpHR3AfoINuN/E8=" - }, "string-length": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz", @@ -8263,26 +8193,25 @@ } }, "tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.0.1.tgz", + "integrity": "sha512-I6OJF7wE62BC6zNPdHDtseK0D0187PBjbKSLYY4ffvVkBM6tyBn2O9plDvVM2229/mozfEL/X3++qSvYYQE2xw==", "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", + "bl": "^3.0.0", + "end-of-stream": "^1.4.1", "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" }, "dependencies": { - "bl": { - "version": "1.2.2", - "resolved": "http://registry.npmjs.org/bl/-/bl-1.2.2.tgz", - "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "readable-stream": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", + "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } } } @@ -8415,12 +8344,11 @@ "dev": true }, "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" + "readable-stream": "2 || 3" } }, "tmp": { @@ -8438,11 +8366,6 @@ "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", "dev": true }, - "to-buffer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", - "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" - }, "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", @@ -8552,11 +8475,6 @@ "prelude-ls": "~1.1.2" } }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, "uglify-js": { "version": "3.4.9", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", @@ -8732,9 +8650,9 @@ }, "dependencies": { "nan": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", - "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==" + "version": "2.13.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", + "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==" } } }, @@ -8920,7 +8838,8 @@ "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true }, "yallist": { "version": "2.1.2", diff --git a/package.json b/package.json index c5f6308..cfb3d46 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,8 @@ }, "homepage": "https://github.com/ipfs-shipyard/ipfs-redux-bundle#readme", "dependencies": { - "ipfs-http-client": "^29.1.0", - "multiaddr": "^6.0.0", + "ipfs-http-client": "^30.1.2", + "multiaddr": "^6.0.6", "uri-to-multiaddr": "^3.0.1", "window-or-global": "^1.0.1" }, diff --git a/src/js-ipfs-api/index.test.js b/src/js-ipfs-api/index.test.js index f4d2ea9..c5e21f8 100644 --- a/src/js-ipfs-api/index.test.js +++ b/src/js-ipfs-api/index.test.js @@ -3,7 +3,7 @@ const tryApi = require('./index.js') const { URL } = require('url') const IpfsApi = require('ipfs-http-client') -it('Should use the apiAddress', async (done) => { +it('Should use the apiAddress (implicit http)', async (done) => { const opts = { apiAddress: '/ip4/1.1.1.1/tcp/1111', defaultApiAddress: '/ip4/127.0.0.1/tcp/5001', @@ -15,14 +15,33 @@ it('Should use the apiAddress', async (done) => { expect(res.apiAddress).toEqual(opts.apiAddress) expect(res.provider).toEqual('js-ipfs-api') expect(opts.ipfsConnectionTest.mock.calls.length).toBe(1) - const config = res.ipfs.util.getEndpointConfig() + const config = res.ipfs.getEndpointConfig() expect(config.host).toEqual('1.1.1.1') expect(config.port).toEqual('1111') expect(config.protocol).toEqual('http') done() }) -it('Should use the location where hostname not localhost', async (done) => { +it('Should use the apiAddress (explicit https)', async (done) => { + const opts = { + apiAddress: '/ip4/1.1.1.1/tcp/1111/https', + defaultApiAddress: '/ip4/127.0.0.1/tcp/5001', + location: new URL('http://localhost:5001'), + IpfsApi: IpfsApi, + ipfsConnectionTest: jest.fn().mockResolvedValueOnce(true) + } + const res = await tryApi(opts) + expect(res.apiAddress).toEqual(opts.apiAddress) + expect(res.provider).toEqual('js-ipfs-api') + expect(opts.ipfsConnectionTest.mock.calls.length).toBe(1) + const config = res.ipfs.getEndpointConfig() + expect(config.host).toEqual('1.1.1.1') + expect(config.port).toEqual('1111') + expect(config.protocol).toEqual('https') + done() +}) + +it('Should use the http location where hostname not localhost', async (done) => { const opts = { defaultApiAddress: '/ip4/127.0.0.1/tcp/5001', location: new URL('http://dev.local:5001'), @@ -33,14 +52,32 @@ it('Should use the location where hostname not localhost', async (done) => { expect(res.apiAddress).toEqual('/dns4/dev.local/tcp/5001/http') expect(res.provider).toEqual('js-ipfs-api') expect(opts.ipfsConnectionTest.mock.calls.length).toBe(1) - const config = res.ipfs.util.getEndpointConfig() + const config = res.ipfs.getEndpointConfig() expect(config.host).toEqual('dev.local') expect(config.port).toEqual('5001') expect(config.protocol).toEqual('http') done() }) -it('Should use the location where port not 5001', async (done) => { +it('Should use the https location where hostname not localhost', async (done) => { + const opts = { + defaultApiAddress: '/ip4/127.0.0.1/tcp/5001', + location: new URL('https://dev.local:5001'), + IpfsApi: IpfsApi, + ipfsConnectionTest: jest.fn().mockResolvedValueOnce(true) + } + const res = await tryApi(opts) + expect(res.apiAddress).toEqual('/dns4/dev.local/tcp/5001/https') + expect(res.provider).toEqual('js-ipfs-api') + expect(opts.ipfsConnectionTest.mock.calls.length).toBe(1) + const config = res.ipfs.getEndpointConfig() + expect(config.host).toEqual('dev.local') + expect(config.port).toEqual('5001') + expect(config.protocol).toEqual('https') + done() +}) + +it('Should use the implicit/default location port', async (done) => { const opts = { defaultApiAddress: '/ip4/127.0.0.1/tcp/5001', location: new URL('https://webui.ipfs.io'), @@ -51,7 +88,7 @@ it('Should use the location where port not 5001', async (done) => { expect(res.apiAddress).toEqual('/dns4/webui.ipfs.io/tcp/443/https') expect(res.provider).toEqual('js-ipfs-api') expect(opts.ipfsConnectionTest.mock.calls.length).toBe(1) - const config = res.ipfs.util.getEndpointConfig() + const config = res.ipfs.getEndpointConfig() expect(config.host).toEqual('webui.ipfs.io') expect(config.port).toEqual('443') expect(config.protocol).toEqual('https') @@ -72,7 +109,7 @@ it('Should use the defaultApiAddress if location fails', async (done) => { expect(res.apiAddress).toEqual(opts.defaultApiAddress) expect(res.provider).toEqual('js-ipfs-api') expect(opts.ipfsConnectionTest.mock.calls.length).toBe(2) - const config = res.ipfs.util.getEndpointConfig() + const config = res.ipfs.getEndpointConfig() expect(config.host).toEqual('127.0.0.1') expect(config.port).toEqual('5001') expect(config.protocol).toEqual('http')