diff --git a/.gitignore b/.gitignore index 94093be8..6412cdaf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules vue-mike react-mike docs/_build -.DS_Store \ No newline at end of file +.DS_Store +build \ No newline at end of file diff --git a/README.md b/README.md index 72a270a4..c05bbb62 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,9 @@

KAIZEN CLI

+ - + > One stop solution for dapp developers diff --git a/README_KR.md b/README_KR.md index 0888173a..094d9ff2 100644 --- a/README_KR.md +++ b/README_KR.md @@ -7,8 +7,9 @@

KAIZEN CLI

+ - + > dapp 개발자들을 위한 원 스톱 솔루션 diff --git a/README_ZH.md b/README_ZH.md index e1f70512..0e613adc 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -7,8 +7,9 @@

KAIZEN CLI

+ - + > Kaizen是為dapp和dweb開發人員的一站式解決方案。 diff --git a/config/kaizen.json b/config/kaizen.json new file mode 100644 index 00000000..6bf7c96d --- /dev/null +++ b/config/kaizen.json @@ -0,0 +1,8 @@ +{ + "issued": "PortalNetwork", + "provider": { + "host": "ipfs.infura.io", + "port": 5001, + "protocol": "https" + } +} \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index bdd9f86c..aa30dee0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,6 +12,7 @@ Welcome to KAIZEN's documentation! introduction quickstart + tutorial diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 2fb2f793..3ccaeebb 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -1,35 +1,79 @@ -********** -KAIZEN -********** +====== +KAIZEN CLI +====== -**$ kaizen new** +---------------- +``kaizen new`` +---------------- -**To create the epic web3 integration project which is made by Portal Network** + To create the epic web3 integration project which is made by Portal Network** **Parameters:** -n [project-name]: this parameter is required. __ - - -b [vue|react]: choose the front-end library you want, default is vue. - + -b [vue|react]: choose the front-end boilerplate you want, default is vue. **Output:** .. image:: https://user-images.githubusercontent.com/11625554/45541442-b42c7e80-b841-11e8-9c8a-218aff41ed45.png +-------------------------- +``kaizen plugin add noia`` +-------------------------- -**$ kaizen plugin** - -**To install plugin via kaizen** + To install NOIA SDK plugin via kaizen in project, this project should be used `kaizen new` to created **Parameters:** - add noia: kaizen will install NOIA SDK for you in your project. the project should be used `kaizen new` to created - + no parameter required + **Output:** .. image:: https://user-images.githubusercontent.com/11625554/45541315-5dbf4000-b841-11e8-9f0c-35b1674aed99.png - - +------------------------------ +``kaizen plugin add bluzelle`` +------------------------------ + + To install Bluzelle SDK via kaizen in project, this project should be used `kaizen new` to created + +**Parameters** + + -b [vue|react]: choose the front-end boilerplate you want, default is vue. + +**Usage** + - react + + In react, bluzelle's sdk will wrapped and pass down through component property. + + .. image:: https://user-images.githubusercontent.com/11625554/45680786-6fb91f80-bb6e-11e8-82f9-6dd4de9352fc.png + + - vue + + In vue, bluzelle's sdk were wrapped into an object. Once you initialize bluzelle, it will be returned. + Yout can use object spread syntax to replace them into your components, or just use them like a normal object. + + .. image:: https://user-images.githubusercontent.com/11625554/45738864-17445980-bc24-11e8-912b-eedf4a97b3c6.png + +---------------- +``kaizen build`` +---------------- + + To build the kaizen's dapp, and the built code will be output into the build folder + +--------------- +``kaizen init`` +--------------- + + To setup the configuration you need, like IPFS provider. + +---------------- +``kaizen publish`` +---------------- + + To upload your dapp to the IPFS. You shall execute `kaizen build` before publish + + + + diff --git a/kaizen b/kaizen index 3b2681b9..67057f45 100755 --- a/kaizen +++ b/kaizen @@ -3,11 +3,11 @@ const clear = require('clear'); const chalk = require('chalk'); const figlet = require('figlet'); -const newDapp = require("./lib/NewDapp"); -const { - add: pluginAdd, - build: build, -} = require('./lib/plugin'); +const plugin = require('./lib/plugin'); +const initialization = require('./lib/initialization'); +const build = require('./lib/build'); +const ipfs = require('./lib/ipfs'); +const kaizenNew = require('./lib/new'); // to clear terminal screen clear(); @@ -25,47 +25,11 @@ console.log( const argv = require('yargs') .usage('Kaizen - a dapp framework for Blockchain\n\nUsage: $0 [options]') - .command('new', 'create a dapp with boilerplate', (yargs) => { - return yargs - .option('n', { - alias: 'name', - describe: 'clone a file' - }) - .option('b', { - alias: 'boilerplate', - describe: 'dapp boilerplate of vue or react', - choices: ['vue', 'react'], - default: 'vue' - }) - .demandOption(['name'], 'Please enter your project name') - .example( - 'kaizen new -n -b ' - ) - }, (argv) => { - const { name, boilerplate } = argv; - newDapp({ name, boilerplate }); - }) - .command('config', 'environment variables of dapps') - // .command('build', 'scripts used to pack dapp') - .command('plugin', 'list all the plugin to dapp') - .command('plugin add [plugin-name]', pluginAdd.description, (yargs) => pluginAdd.yargs(yargs), (argv) => pluginAdd.argv(argv)) - .command('plugin:remove', 'remove an plugin to dapp', (yargs) => { - return yargs - .demandOption(['name'], 'Please enter a plugin name') - .example( - 'kaizen plugin:remove ' - ) - }) - .command('publish', 'scripts used to publish dapp', (yargs) => { - return yargs - .demandCommand(['storage'], 'Please enter a file storage') - .example( - 'kaizen publish ' - ) - }) - .command('build', 'build dapp package', (yargs) => { - build.build(yargs); - }) + .command('init', initialization.init.description, initialization.init.yargs, initialization.init.argv) + .command('new', kaizenNew.create.description, kaizenNew.create.yargs, kaizenNew.create.argv) + .command('plugin add [plugin-name]', plugin.add.description, plugin.add.yargs, plugin.add.argv) + .command('publish', ipfs.publish.description, ipfs.publish.yargs) + .command('build', build.description, build.yargs, build.argv) .demandCommand(1, 'You need at least one command before moving on') .options({ 'v': { @@ -78,4 +42,13 @@ const argv = require('yargs') } }) .epilog('copyright Portal Network 2018') - .argv; \ No newline at end of file + .argv; + + + + /** + * TODO: kaizen new with choose blockchain e.g. ethereum, wanchain + */ + + + diff --git a/lib/plugin/Log.js b/lib/Log.js similarity index 100% rename from lib/plugin/Log.js rename to lib/Log.js diff --git a/lib/initialization/index.js b/lib/initialization/index.js new file mode 100644 index 00000000..5ae26be5 --- /dev/null +++ b/lib/initialization/index.js @@ -0,0 +1 @@ +exports.init = require('./init.js'); \ No newline at end of file diff --git a/lib/initialization/init.js b/lib/initialization/init.js new file mode 100644 index 00000000..f8d05c13 --- /dev/null +++ b/lib/initialization/init.js @@ -0,0 +1,26 @@ +const fs = require('fs'); +const path = require('path'); +const Log = require('../Log'); +const KAIZEN_CONFIG_FILE = "kaizen.json"; + +exports.description = 'initialize kaizen environment'; + +exports.yargs = function(yargs) { + yargs.example('kaizen init'); +} + +exports.argv = function (argv) { + const targetPath = path.resolve('./', KAIZEN_CONFIG_FILE); + + if(fs.existsSync(targetPath) === false) { + console.error('[ERROR]: please use kaizen new to create new project first.'); + return; + } + + const sourcePath = path.resolve(__dirname, '../../config/', KAIZEN_CONFIG_FILE); + const sourceConfig = JSON.parse(fs.readFileSync(sourcePath)); + const targetConfig = JSON.parse(fs.readFileSync(targetPath)); + const newConfig = Object.assign({}, targetConfig, sourceConfig); + fs.writeFileSync(targetPath, JSON.stringify(newConfig)); + Log.SuccessLog("complete initialization"); +} \ No newline at end of file diff --git a/lib/ipfs/index.js b/lib/ipfs/index.js new file mode 100644 index 00000000..5f52a146 --- /dev/null +++ b/lib/ipfs/index.js @@ -0,0 +1 @@ +exports.publish = require('./publish.js'); \ No newline at end of file diff --git a/lib/ipfs/publish.js b/lib/ipfs/publish.js new file mode 100644 index 00000000..68f9a4ac --- /dev/null +++ b/lib/ipfs/publish.js @@ -0,0 +1,69 @@ +const fs = require('fs'); +const path = require('path'); +const Log = require('../Log'); +const ipfsAPI = require('ipfs-api'); +const JSONFile = require('jsonfile'); +const openBrowser = require('opn'); +const BuildPath = 'build'; +const kaizenfile = "kaizen.json"; + +function fsExistsSync() { + try { + fs.accessSync(BuildPath, fs.constants.R_OK | fs.constants.W_OK); + return true; + } catch (err) { + return false; + } +} + +function loopFilesInFolder(path, files) { + const readdirSyncs = fs.readdirSync(path); + readdirSyncs.forEach(item => { + if (item.includes('.DS_Store')) return; + switch (fs.statSync(`${path}/${item}`).isDirectory()) { + case true: + files = loopFilesInFolder(`${path}/${item}`, files); + break; + case false: + files.push(`${path}/${item}`); + break + } + }); + + return files; +} + +function getIPFSContentObject(filePath, targetPath) { + return ({ + path: `public${filePath.replace(targetPath, '')}`, + content: fs.readFileSync(filePath) + }); +} + +exports.description = 'publish you app to the IPFS'; + +exports.yargs = function (yargs) { + if (!fsExistsSync()) { + Log.ErrorLog("Build This folder does not exist"); + } + + const targetPath = `${path.resolve('./', BuildPath)}`; + + try { + (async function(yargs, targetPath) { + const kaizenConfig = await JSONFile.readFile(kaizenfile) + const ipfs = ipfsAPI(kaizenConfig.provider); + console.log('=== uploading to the IPFS ===') + const files = loopFilesInFolder(targetPath, []).map(item => getIPFSContentObject(item, targetPath)); + const hashes = await ipfs.files.add(files, { recursive: false }); + const { hash, } = hashes[hashes.length - 1]; + const iphsUrl = `https://ipfs.infura.io/ipfs/${hash}`; + openBrowser(iphsUrl); + Log.SuccessLog(`ipfs url => ${iphsUrl}`) + process.exit(); + })(yargs, targetPath); + } catch (err) { + Log.ErrorLog(err) + } +} + diff --git a/lib/NewDapp.js b/lib/new/create.js similarity index 65% rename from lib/NewDapp.js rename to lib/new/create.js index 4f1212bb..a9bd39bd 100644 --- a/lib/NewDapp.js +++ b/lib/new/create.js @@ -1,9 +1,29 @@ const cmd = require('node-cmd'); const fs = require("fs"); const del = require('del'); -const Log = require('./plugin/Log'); +const Log = require('../Log'); -module.exports = (argv) => { +exports.description = 'create a dapp with boilerplate'; + +exports.yargs = function (yargs) { + yargs + .option('n', { + alias: 'name', + describe: 'clone a file' + }) + .option('b', { + alias: 'boilerplate', + describe: 'dapp boilerplate of vue or react', + choices: ['vue', 'react'], + default: 'vue' + }) + .demandOption(['name'], 'Please enter your project name') + .example( + 'kaizen new -n -b ' + ) +} + +exports.argv = function (argv) { let f2eFramework = ''; let rename = ''; switch (argv.boilerplate) { @@ -11,7 +31,6 @@ module.exports = (argv) => { f2eFramework = 'https://github.com/PortalNetwork/vue-truffle.git'; rename = 'vue-truffle'; break; - case 'react': f2eFramework = 'https://github.com/PortalNetwork/react-truffle-metamask.git'; rename = 'react-truffle-metamask'; diff --git a/lib/new/index.js b/lib/new/index.js new file mode 100644 index 00000000..150ee9bf --- /dev/null +++ b/lib/new/index.js @@ -0,0 +1 @@ +exports.create = require('./create.js'); \ No newline at end of file diff --git a/lib/plugin/add.js b/lib/plugin/add.js index 4b468bb8..1a9e16fd 100644 --- a/lib/plugin/add.js +++ b/lib/plugin/add.js @@ -1,50 +1,172 @@ const fs = require('fs'); +const path = require('path'); const cmd = require('node-cmd'); const ncp = require('ncp').ncp; -exports.description = 'attach an plugin to dapp'; +exports.description = 'attach a plugin to dapp'; exports.yargs = function (yargs) { - return yargs + yargs + .option('b', { + alias: 'boilerplate', + describe: 'dapp boilerplate of vue or react', + choices: ['vue', 'react'], + default: 'react' + }) .demandOption(['plugin-name'], 'Please enter a plugin name') .example('kaizen plugin add '); } exports.argv = function (argv) { - const { pluginName, } = argv; - switch(pluginName) { + const { pluginName, boilerplate, } = argv; + + const configPath = path.resolve('./', 'kaizen.json'); + if(fs.existsSync(configPath) === false) { + console.log('[ERROR]: please use kaizen new to create new project first.') + return; + } + + const kaizenConfig = JSON.parse(fs.readFileSync(configPath)); + switch (pluginName) { case 'noia': - handleNOIA(); + handleNOIA(kaizenConfig); break; + case 'bluzelle': + handleBluzelle(kaizenConfig, boilerplate); + break; + } +} + +function packageChecker(package) { + const kaizenProjectType = [ + 'React', + 'vue', + ]; + + return ({ + package, + isValid: kaizenProjectType.includes(package.type), + }); +} + +function handleError(error) { + if (!error.message) { + console.error('[ERROR]: there is something error occur'); + return; + } + + if (error.message.includes("no such file or directory, open './kaizen.json'")) { + console.error('[ERROR]: please use kaizen new to create new project first'); + return; + } + console.error(`[ERROR]: ${error.message}`); +} + +function reactMixBluzelle(kaizenConfig) { + const sourceFolder = path.resolve(__dirname, '../../templates'); + const targetFolder = path.resolve('./', 'node_modules/pn-react-bluzelle'); + + if (!fs.existsSync(targetFolder)) { + fs.mkdirSync(targetFolder); } + + const readStream = fs.createReadStream(path.resolve(sourceFolder, 'pn-react-bluzelle.js')); + const writeStream = fs.createWriteStream(path.resolve(targetFolder, 'index.js')); + readStream.pipe(writeStream); + updateConfig(kaizenConfig, 'pn-react-bluzelle'); +} + +function vueMixBluzelle(kaizenConfig) { + const sourceFolder = path.resolve(__dirname, '../../templates'); + const targetFolder = path.resolve('./', 'node_modules/pn-vue-bluzelle'); + + if (!fs.existsSync(targetFolder)) { + fs.mkdirSync(targetFolder); + } + + const readStream = fs.createReadStream(path.resolve(sourceFolder, 'pn-vue-bluzelle.js')); + const writeStream = fs.createWriteStream(path.resolve(targetFolder, 'index.js')); + readStream.pipe(writeStream); + updateConfig(kaizenConfig, 'pn-vue-bluzelle'); } -function handleNOIA () { - console.log('kaizen: downloading noia sdk...'); +function updateConfig(kaizenConfig, plugin) { + if(!kaizenConfig.plugins) { + kaizenConfig.plugins = []; + } + + if(kaizenConfig.plugins.includes(plugin)) { + console.log('sfsfd') + return; + } + + kaizenConfig.plugins.push(plugin); + fs.writeFileSync(path.resolve('./', 'kaizen.json'), JSON.stringify(kaizenConfig)); +} + +function handleNOIA(kaizenConfig) { try { - const package = JSON.parse(fs.readFileSync('./package.json', 'utf8')); - if(package.name !== 'react-truffle-metamask') { + const checkResult = packageChecker(kaizenConfig); + if (checkResult.isValid === false) { console.error('[ERROR]: please use kaizen new to create new project first'); return; } + console.log('kaizen: installing noia sdk...'); + // clone noia sdk repo and copy out packages - cmd.get('git clone https://github.com/noia-network/sdk.git temp-noia-sdk', function(err_one) { - ncp('./temp-noia-sdk/packages', './', function(error) { + cmd.get('git clone https://github.com/noia-network/sdk.git temp-noia-sdk', function (error) { + if (error) { + handleError(error); + return; + } + + ncp('./temp-noia-sdk/packages', './', function (error) { + if (error) { + handleError(error); + return; + } cmd.run('rm -rf ./temp-noia-sdk'); + updateConfig(kaizenConfig, 'NOIA'); }); }); - } catch(error) { - if(!error.message) { - console.error('[ERROR]: there is something error occur'); - return; - } - - if(error.message.includes("no such file or directory, open './package.json'")) { - console.error('[ERROR]: please use kaizen new to create new project first'); + } catch (error) { + handleError(error); + } +} + +function handleBluzelle(kaizenConfig, boilerplate) { + try { + const checkResult = packageChecker(kaizenConfig); + if (checkResult.isValid === false) { + console.error('[ERROR]: please use kaizen new to create new project first.'); return; } - console.error(`[ERROR]: ${error.message}`); + + console.log('kaizen: installing bluzelle sdk...'); + + cmd.get('npm install bluzelle', function (error) { + if (error) { + handleError(error); + return; + } + + switch (boilerplate) { + case 'react': + reactMixBluzelle(kaizenConfig); + break; + case 'vue': + vueMixBluzelle(kaizenConfig); + break; + default: + handleError(new Error('please specify boilerplate')); + break; + } + }); + } catch (error) { + console.log('error', error); + handleError(error); } -} \ No newline at end of file +} + diff --git a/lib/plugin/build.js b/lib/plugin/build.js deleted file mode 100644 index aa543b46..00000000 --- a/lib/plugin/build.js +++ /dev/null @@ -1,43 +0,0 @@ -const cmd = require('node-cmd'); -const fs = require('fs'); -const Log = require('./Log'); -const ProgressBar = require('progress'); -exports.build = function (yargs) { - let kaizenfile = "kaizen.json" - if(!fs.existsSync(kaizenfile)) return Log.ErrorLog("Kaizen.json this file does not exist"); - let fsFile = fs.readFileSync(kaizenfile, 'utf-8'); - let settingtype = JSON.parse(fsFile); - if(settingtype.issued !== 'PortalNetwork') return Log.ErrorLog("Kaizen.json profile error"); - Log.SuccessLog('==== Please wait in the build ===='); - - - const green = '\u001b[42m \u001b[0m'; - const red = '\u001b[41m \u001b[0m'; - const total = 40; - let isLoad = false; - const bar = new ProgressBar(' [:bar]', { - complete: green, - incomplete: red, - total: total, - }); - - let barLoad = setInterval(()=>{ - bar.tick(); - bar.curr += 1; - if(bar.curr >= total){ - bar.curr = 0 - } - if(isLoad){ - clearInterval(barLoad); - Log.SuccessLog(`==== build carry out ====`); - } - }, 100); - - cmd.get(`npm run build`, err =>{ - bar.curr = total; - isLoad = true; - if (err) return Log.ErrorLog(`[ERROR] build: ${err}`); - }); - -} - diff --git a/lib/plugin/index.js b/lib/plugin/index.js index ac212104..cc5bce75 100644 --- a/lib/plugin/index.js +++ b/lib/plugin/index.js @@ -1,2 +1 @@ -exports.add = require('./add.js'); -exports.build = require('./build.js'); \ No newline at end of file +exports.add = require('./add.js'); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index f4744989..da522b2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,11 +35,90 @@ "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" }, + "asn1.js": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.0.1.tgz", + "integrity": "sha512-aO8EaEgbgqq77IEw+1jfx5c9zTbzvkfuRBuZsSsPnTHMkmd5AI4J6OtITLZFa381jReeaQL67J0GBTUu0+ZTVw==", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "requires": { + "lodash": "^4.17.10" + } + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, + "base-x": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.4.tgz", + "integrity": "sha512-UYOadoSIkEI/VrRGSG6qp93rp2WdokiAiNYDfGW5qURAY8GiAQkvMbwNNSDYiVJopqv4gCna7xqf4rrNGp+5AA==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "big.js": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.1.2.tgz", + "integrity": "sha512-qG6ZOc1lY84Bn8p/z9xvJisj9F4PRyo0pOGqGNYc7gS3p1WciS/3XcLuNI3Z/yYZpMNFhHeX3YNENwgrQq0NTA==" + }, + "bignumber.js": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-6.0.0.tgz", + "integrity": "sha512-x247jIuy60/+FtMRvscqfxtVHQf8AGx2hm9c6btkgC0x/hp9yt+teISNhvF8WlwRkCc5yF2fDECH8SIMe8j+GA==" + }, + "bindings": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz", + "integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw==" + }, + "bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "blakejs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", + "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + }, + "borc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/borc/-/borc-2.0.3.tgz", + "integrity": "sha512-2mfipKUXn7yLgwn8D5jZkJqd2ZyzqmYZQX/9d4On33oGNDLwxj5qQMst+nkKyEdaujQRFfrZCId+k8wehQVANg==", + "requires": { + "bignumber.js": "^6.0.0", + "commander": "^2.15.0", + "ieee754": "^1.1.8", + "json-text-sequence": "^0.1" + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -49,6 +128,71 @@ "concat-map": "0.0.1" } }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "requires": { + "base-x": "^3.0.2" + } + }, + "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==" + }, + "buffer-loader": { + "version": "0.0.1", + "resolved": "http://registry.npmjs.org/buffer-loader/-/buffer-loader-0.0.1.tgz", + "integrity": "sha1-TWd8qS3YiTEIeLAqL7z6txICTPI=" + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" + }, "camelcase": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", @@ -69,6 +213,30 @@ "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.5.0.tgz", "integrity": "sha512-9ZTaoBaePSCFvNlNGrsyI8ZVACP2svUtq0DkM7t4K2ClAa96sqOIRjAzDTc8zXzFt1cZR46rRzLTiHFSJ+Qw0g==" }, + "cids": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.5.3.tgz", + "integrity": "sha512-ujWbNP8SeLKg5KmGrxYZM4c+ttd+wwvegrdtgmbi2KNFUbQN4pqsGZaGQE3rhjayXTbKFq36bYDbKhsnD0eMsg==", + "requires": { + "multibase": "~0.4.0", + "multicodec": "~0.2.6", + "multihashes": "~0.4.13" + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-is": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", + "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" + }, "clear": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/clear/-/clear-0.1.0.tgz", @@ -134,11 +302,27 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, + "commander": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.18.0.tgz", + "integrity": "sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ==" + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, "configstore": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", @@ -152,6 +336,36 @@ "xdg-basedir": "^3.0.0" } }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "create-hash": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -175,6 +389,14 @@ "es5-ext": "~0.10.2" } }, + "debug": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", + "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", + "requires": { + "ms": "^2.1.1" + } + }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -193,6 +415,16 @@ "rimraf": "^2.2.8" } }, + "delimit-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz", + "integrity": "sha1-m4MZR3wOX4rrPONXrjBfwl6hzSs=" + }, + "detect-node": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", + "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==" + }, "dot-prop": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", @@ -201,6 +433,38 @@ "is-obj": "^1.0.0" } }, + "drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", + "requires": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + } + }, + "elliptic": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", + "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "requires": { + "once": "^1.4.0" + } + }, "es5-ext": { "version": "0.10.45", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", @@ -306,6 +570,15 @@ } } }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, "execa": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", @@ -351,6 +624,16 @@ "locate-path": "^2.0.0" } }, + "flatmap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/flatmap/-/flatmap-0.0.3.tgz", + "integrity": "sha1-Hxik2TgVLUlZZfnJWNkjqy3WabQ=" + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -398,6 +681,11 @@ } } }, + "google-protobuf": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.6.1.tgz", + "integrity": "sha512-SJYemeX5GjDLPnadcmCNQePQHCS4Hl5fOcI/JawqDIYFhCmrtYAjcx/oTQx/Wi8UuCuZQhfvftbmPePPAYHFtA==" + }, "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", @@ -408,6 +696,34 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", + "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", @@ -416,6 +732,11 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "ieee754": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==" + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -465,11 +786,150 @@ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" }, + "ip": { + "version": "1.1.5", + "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" + } + }, + "ipfs-api": { + "version": "24.0.1", + "resolved": "https://registry.npmjs.org/ipfs-api/-/ipfs-api-24.0.1.tgz", + "integrity": "sha512-isMWo3gFqedJQCGdg2lFc0AWidWkrQpyNt9OJDanbognes9sqIBqhzLNlonwMxbV59Vdd0oRB18tvWNe+gzBnA==", + "requires": { + "async": "^2.6.1", + "big.js": "^5.1.2", + "bs58": "^4.0.1", + "cids": "~0.5.3", + "concat-stream": "^1.6.2", + "debug": "^3.1.0", + "detect-node": "^2.0.3", + "flatmap": "0.0.3", + "glob": "^7.1.2", + "ipfs-block": "~0.7.1", + "ipfs-unixfs": "~0.1.15", + "ipld-dag-cbor": "~0.12.1", + "ipld-dag-pb": "~0.14.6", + "is-ipfs": "~0.4.2", + "is-pull-stream": "0.0.0", + "is-stream": "^1.1.0", + "libp2p-crypto": "~0.13.0", + "lru-cache": "^4.1.3", + "multiaddr": "^5.0.0", + "multibase": "~0.4.0", + "multihashes": "~0.4.13", + "ndjson": "^1.5.0", + "once": "^1.4.0", + "peer-id": "~0.11.0", + "peer-info": "~0.14.1", + "promisify-es6": "^1.0.3", + "pull-defer": "~0.2.2", + "pull-pushable": "^2.2.0", + "pull-stream-to-stream": "^1.3.4", + "pump": "^3.0.0", + "qs": "^6.5.2", + "readable-stream": "^2.3.6", + "stream-http": "^2.8.3", + "stream-to-pull-stream": "^1.7.2", + "streamifier": "~0.1.1", + "tar-stream": "^1.6.1" + } + }, + "ipfs-block": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ipfs-block/-/ipfs-block-0.7.1.tgz", + "integrity": "sha512-ABZS9J/+OaDwc10zu6pIVdxWnOD/rkPEravk7FRVuRep7/zKSjffNhO/WuHN7Ex+MOBMz7mty0e+i6xjGnRsRQ==", + "requires": { + "cids": "^0.5.3", + "class-is": "^1.1.0" + } + }, + "ipfs-unixfs": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-0.1.15.tgz", + "integrity": "sha512-fjtwBDsIlNags4btHIdAJtE02K4KqEMOhV9GEFVv1M2JO2STS23v2LAtX5qb1EOU5VrjtKlm/JIBH3XDRdAyGQ==", + "requires": { + "protons": "^1.0.0" + } + }, + "ipld-dag-cbor": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/ipld-dag-cbor/-/ipld-dag-cbor-0.12.1.tgz", + "integrity": "sha512-m0BR/zR9sKIuY/PydppkpwO0S9w7+ob0as7RN3jQmMIpW9m8HW7hLznvtp1xpYZknH7efUhIaMHgaQP43E5IWQ==", + "requires": { + "async": "^2.6.0", + "borc": "^2.0.2", + "bs58": "^4.0.1", + "cids": "~0.5.2", + "is-circular": "^1.0.1", + "multihashes": "~0.4.12", + "multihashing-async": "~0.5.1", + "traverse": "~0.6.6" + } + }, + "ipld-dag-pb": { + "version": "0.14.8", + "resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.14.8.tgz", + "integrity": "sha512-gctCXJmRwUNOSiBgrq+kTL6lGnpJ3PKm8YCfYh7q0/kDCeRxoz72syXnnbQAlU/qUcwVYCHyJYLOLUtGq0Y8tQ==", + "requires": { + "async": "^2.6.1", + "bs58": "^4.0.1", + "buffer-loader": "~0.0.1", + "cids": "~0.5.3", + "class-is": "^1.1.0", + "is-ipfs": "~0.4.2", + "multihashing-async": "~0.5.1", + "protons": "^1.0.1", + "pull-stream": "^3.6.8", + "pull-traverse": "^1.0.3", + "stable": "~0.1.8" + } + }, + "is-circular": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-circular/-/is-circular-1.0.2.tgz", + "integrity": "sha512-YttjnrswnUYRVJvxCvu8z+PGMUSzC2JttP0OEXezlAEdp3EXzhf7IZ3j0gRAybJBQupedIZFhY61Tga6E0qASA==" + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, + "is-ipfs": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/is-ipfs/-/is-ipfs-0.4.2.tgz", + "integrity": "sha512-v/73Qf9kjDq8gjMyK8gn+KrLmJh8B4uS7fVGP7UYBUxXkFquW+puPV0P8TeXNd+C6EEvaOO3If6vxQ7UkznNAg==", + "requires": { + "bs58": "4.0.1", + "cids": "0.5.3", + "multibase": "0.4.0", + "multihashes": "0.4.13" + }, + "dependencies": { + "multihashes": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.13.tgz", + "integrity": "sha512-HwJGEKPCpLlNlgGQA56CYh/Wsqa+c4JAq8+mheIgw7OK5T4QvNJqgp6TH8gZ4q4l1aiWeNat/H/MrFXmTuoFfQ==", + "requires": { + "bs58": "^4.0.1", + "varint": "^5.0.0" + } + } + } + }, "is-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", @@ -501,16 +961,68 @@ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" }, + "is-pull-stream": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/is-pull-stream/-/is-pull-stream-0.0.0.tgz", + "integrity": "sha1-o7w9HG0wVRUcRr3m85nv7SFEDKk=" + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, + "js-sha3": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.7.0.tgz", + "integrity": "sha512-Wpks3yBDm0UcL5qlVhwW9Jr9n9i4FfeWBFOOXP5puDS/SiudJGhw7DPyBqn3487qD4F0lsC0q3zxink37f7zeA==" + }, + "jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha1-sBMHyym2GKHtJux56RH4A8TaAEA=" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "json-text-sequence": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.1.1.tgz", + "integrity": "sha1-py8hfcSvxGKf/1/rME3BvVGi89I=", + "requires": { + "delimit-stream": "0.1.0" + } + }, + "jsonfile": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-5.0.0.tgz", + "integrity": "sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^0.1.2" + } + }, + "keypair": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/keypair/-/keypair-1.0.1.tgz", + "integrity": "sha1-dgNxknCvtlZO04oiCHoG/Jqk6hs=" + }, "lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", @@ -519,6 +1031,68 @@ "invert-kv": "^1.0.0" } }, + "libp2p-crypto": { + "version": "0.13.0", + "resolved": "http://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.13.0.tgz", + "integrity": "sha512-i3r1TBec/xYmC5bcpPiIs3OyUAU3iy53OdRdxqawKoWTQPjYB+TyQ4w+otT66Y0sMcw70O0wH3GFAfPmQgFn+g==", + "requires": { + "asn1.js": "^5.0.0", + "async": "^2.6.0", + "browserify-aes": "^1.2.0", + "bs58": "^4.0.1", + "keypair": "^1.0.1", + "libp2p-crypto-secp256k1": "~0.2.2", + "multihashing-async": "~0.4.8", + "node-forge": "^0.7.5", + "pem-jwk": "^1.5.1", + "protons": "^1.0.1", + "rsa-pem-to-jwk": "^1.1.3", + "tweetnacl": "^1.0.0", + "webcrypto-shim": "github:dignifiedquire/webcrypto-shim#190bc9ec341375df6025b17ae12ddb2428ea49c8" + }, + "dependencies": { + "multihashing-async": { + "version": "0.4.8", + "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.4.8.tgz", + "integrity": "sha512-LCc4lfxmTJOHKIjZjFNgvmfB6nXS/ErLInT9uwU8udFrRm2PH+aTPk3mfCREKmCiSHOlCWiv2O8rlnBx+OjlMw==", + "requires": { + "async": "^2.6.0", + "blakejs": "^1.1.0", + "js-sha3": "^0.7.0", + "multihashes": "~0.4.13", + "murmurhash3js": "^3.0.1", + "nodeify": "^1.0.1" + } + } + } + }, + "libp2p-crypto-secp256k1": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/libp2p-crypto-secp256k1/-/libp2p-crypto-secp256k1-0.2.2.tgz", + "integrity": "sha1-DdUh8Yq8TjahUuJOmzYwewrpzwU=", + "requires": { + "async": "^2.5.0", + "multihashing-async": "~0.4.6", + "nodeify": "^1.0.1", + "safe-buffer": "^5.1.1", + "secp256k1": "^3.3.0" + }, + "dependencies": { + "multihashing-async": { + "version": "0.4.8", + "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.4.8.tgz", + "integrity": "sha512-LCc4lfxmTJOHKIjZjFNgvmfB6nXS/ErLInT9uwU8udFrRm2PH+aTPk3mfCREKmCiSHOlCWiv2O8rlnBx+OjlMw==", + "requires": { + "async": "^2.6.0", + "blakejs": "^1.1.0", + "js-sha3": "^0.7.0", + "multihashes": "~0.4.13", + "murmurhash3js": "^3.0.1", + "nodeify": "^1.0.1" + } + } + } + }, "locate-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", @@ -533,6 +1107,51 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" }, + "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.uniqby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz", + "integrity": "sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI=" + }, + "looper": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/looper/-/looper-3.0.0.tgz", + "integrity": "sha1-LvpUw7HLq6m5Su4uWRSwvlf7t0k=" + }, "lru-cache": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", @@ -550,6 +1169,14 @@ "es5-ext": "~0.10.2" } }, + "mafmt": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/mafmt/-/mafmt-6.0.2.tgz", + "integrity": "sha512-+ydrVDp/bo2GPTNN0378AFX66IJBlbrIBY0RaILWC9AICr9kviX5fonHeKsZiesEuuYetQeRhnZPL/J2k8vHAA==", + "requires": { + "multiaddr": "^5.0.0" + } + }, "make-dir": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", @@ -558,6 +1185,15 @@ "pify": "^3.0.0" } }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, "mem": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", @@ -592,6 +1228,16 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -605,16 +1251,95 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "multiaddr": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-5.0.0.tgz", + "integrity": "sha512-IMEo+iCv53MT8c/6SQWbJpJUEENTYr6qp7o635BKJLQG2nkxOIO9LSEFhF5e56Az+DkmI6HGAAjp69AT7Sjulw==", + "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" + } + }, + "multibase": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.4.0.tgz", + "integrity": "sha512-fnYvZJWDn3eSJ7EeWvS8zbOpRwuyPHpDggSnqGXkQMvYED5NdO9nyqnZboGvAT+r/60J8KZ09tW8YJHkS22sFw==", + "requires": { + "base-x": "3.0.4" + } + }, + "multicodec": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.2.7.tgz", + "integrity": "sha512-96xc9zs7bsclMW0Po9ERnRFqcsWHY8OZ8JW/I8DeHG58YYJZy3cBGI00Ze7hz9Ix56DNHMTSxEj9cgoZByruMg==", + "requires": { + "varint": "^5.0.0" + } + }, + "multihashes": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.14.tgz", + "integrity": "sha512-V/g/EIN6nALXfS/xHUAgtfPP3mn3sPIF/i9beuGKf25QXS2QZYCpeVJbDPEannkz32B2fihzCe2D/KMrbcmefg==", + "requires": { + "bs58": "^4.0.1", + "varint": "^5.0.0" + } + }, + "multihashing-async": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.5.1.tgz", + "integrity": "sha512-Ft5lQNcJCfsns1QN1TDXqPZrrNwBYqIokprYJR2h2Jj01x0GFcYmJYAqHvme6vJoyI3XptEcmZpdr9g5Oy7q3Q==", + "requires": { + "async": "^2.6.1", + "blakejs": "^1.1.0", + "js-sha3": "^0.7.0", + "multihashes": "~0.4.13", + "murmurhash3js": "^3.0.1", + "nodeify": "^1.0.1" + } + }, + "murmurhash3js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/murmurhash3js/-/murmurhash3js-3.0.1.tgz", + "integrity": "sha1-Ppg+W0fCoG9DpxMXTn5DXKBEuZg=" + }, "mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" }, + "nan": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.0.tgz", + "integrity": "sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw==" + }, "ncp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=" }, + "ndjson": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/ndjson/-/ndjson-1.5.0.tgz", + "integrity": "sha1-rmA7NrE0vOw0e0UkIrC/mNWDLsg=", + "requires": { + "json-stringify-safe": "^5.0.1", + "minimist": "^1.2.0", + "split2": "^2.1.0", + "through2": "^2.0.3" + } + }, "next-tick": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", @@ -625,6 +1350,27 @@ "resolved": "https://registry.npmjs.org/node-cmd/-/node-cmd-3.0.0.tgz", "integrity": "sha1-OP/3CkqqT2WdID61eGJzcBjiT28=" }, + "node-forge": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.6.tgz", + "integrity": "sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw==" + }, + "nodeify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nodeify/-/nodeify-1.0.1.tgz", + "integrity": "sha1-ZKtpp7268DzhB7TwM1yHwLnpGx0=", + "requires": { + "is-promise": "~1.0.0", + "promise": "~1.3.0" + }, + "dependencies": { + "is-promise": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-1.0.1.tgz", + "integrity": "sha1-MVc3YcBX4zwukaq56W2gjO++duU=" + } + } + }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", @@ -659,6 +1405,22 @@ "mimic-fn": "^1.0.0" } }, + "opn": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", + "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", + "requires": { + "is-wsl": "^1.1.0" + } + }, + "optimist": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", + "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=", + "requires": { + "wordwrap": "~0.0.2" + } + }, "os-locale": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", @@ -730,6 +1492,115 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" }, + "peer-id": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.11.0.tgz", + "integrity": "sha512-C/lRJk4CWIgOdKvfO572NvHbPcUwe49I6G0toIhDB5tCohqv/qzy0uBcAK9Ww8TvYI6U4J3C8ACShV9fWjNU4w==", + "requires": { + "async": "^2.6.1", + "libp2p-crypto": "~0.13.0", + "lodash": "^4.17.10", + "multihashes": "~0.4.13" + } + }, + "peer-info": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/peer-info/-/peer-info-0.14.1.tgz", + "integrity": "sha512-I9K+q7sisU0gg5ej6ekbhgolwlcm1tc2wDtLmumptoLYx0DkIT8WVHtgoTnupYwRRqcYADtwddFdiXfb8QFqzg==", + "requires": { + "lodash.uniqby": "^4.7.0", + "mafmt": "^6.0.0", + "multiaddr": "^4.0.0", + "peer-id": "~0.10.7" + }, + "dependencies": { + "libp2p-crypto": { + "version": "0.12.1", + "resolved": "http://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.12.1.tgz", + "integrity": "sha512-1/z8rxZ0DcQNreZhEsl7PnLr7DWOioSvYbKBLGkRwNRiNh1JJLgh0PdTySBb44wkrOGT+TxcGRd7iq3/X6Wxwg==", + "requires": { + "asn1.js": "^5.0.0", + "async": "^2.6.0", + "browserify-aes": "^1.1.1", + "bs58": "^4.0.1", + "keypair": "^1.0.1", + "libp2p-crypto-secp256k1": "~0.2.2", + "multihashing-async": "~0.4.7", + "node-forge": "^0.7.1", + "pem-jwk": "^1.5.1", + "protons": "^1.0.1", + "rsa-pem-to-jwk": "^1.1.3", + "tweetnacl": "^1.0.0", + "webcrypto-shim": "github:dignifiedquire/webcrypto-shim#190bc9ec341375df6025b17ae12ddb2428ea49c8" + } + }, + "multiaddr": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-4.0.0.tgz", + "integrity": "sha512-zUatrOCfBd/tJNOSoJ10d2EI2FDXB9PyPZhqUMdXE9mOyR3C+HLuOjga2Ga/eChwvEHIpTYRMoIKF2Nv7af2qQ==", + "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" + } + }, + "multihashing-async": { + "version": "0.4.8", + "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.4.8.tgz", + "integrity": "sha512-LCc4lfxmTJOHKIjZjFNgvmfB6nXS/ErLInT9uwU8udFrRm2PH+aTPk3mfCREKmCiSHOlCWiv2O8rlnBx+OjlMw==", + "requires": { + "async": "^2.6.0", + "blakejs": "^1.1.0", + "js-sha3": "^0.7.0", + "multihashes": "~0.4.13", + "murmurhash3js": "^3.0.1", + "nodeify": "^1.0.1" + } + }, + "peer-id": { + "version": "0.10.7", + "resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.10.7.tgz", + "integrity": "sha512-VEpMFcL9q0NQijmR0jsj38OGbY4yzaWMEareVkDahopmlNT+Cpsot8btPgsgBBApP9NiZj2Enwvh8rZN30ocQw==", + "requires": { + "async": "^2.6.0", + "libp2p-crypto": "~0.12.1", + "lodash": "^4.17.5", + "multihashes": "~0.4.13" + } + } + } + }, + "pem-jwk": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pem-jwk/-/pem-jwk-1.5.1.tgz", + "integrity": "sha1-eoY3/S9nqCflfAxC4cI8P9Us+wE=", + "requires": { + "asn1.js": "1.0.3" + }, + "dependencies": { + "asn1.js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-1.0.3.tgz", + "integrity": "sha1-KBuj7B8kSP52X5Kk7s+IP+E2S1Q=", + "requires": { + "bn.js": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "bn.js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-1.3.0.tgz", + "integrity": "sha1-DbTL+W+PI7dC9by50ap6mZSgXoM=", + "optional": true + } + } + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -748,16 +1619,110 @@ "pinkie": "^2.0.0" } }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, "progress": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=" }, + "promise": { + "version": "1.3.0", + "resolved": "http://registry.npmjs.org/promise/-/promise-1.3.0.tgz", + "integrity": "sha1-5cyaTIJ45GZP/twBx9qEhCsEAXU=", + "requires": { + "is-promise": "~1" + }, + "dependencies": { + "is-promise": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-1.0.1.tgz", + "integrity": "sha1-MVc3YcBX4zwukaq56W2gjO++duU=" + } + } + }, + "promisify-es6": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/promisify-es6/-/promisify-es6-1.0.3.tgz", + "integrity": "sha512-N9iVG+CGJsI4b4ZGazjwLnxErD2d9Pe4DPvvXSxYA9tFNu8ymXME4Qs5HIQ0LMJpNM7zj+m0NlNnNeqFpKzqnA==" + }, + "protocol-buffers-schema": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.3.2.tgz", + "integrity": "sha512-Xdayp8sB/mU+sUV4G7ws8xtYMGdQnxbeIfLjyO9TZZRJdztBGhlmbI5x1qcY4TG5hBkIKGnc28i7nXxaugu88w==" + }, + "protons": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/protons/-/protons-1.0.1.tgz", + "integrity": "sha512-+0ZKnfVs+4c43tbAQ5j0Mck8wPcLnlxUYzKQoB4iDW4ocdXGnN4P+0dDbgX1FTpoY9+7P2Tn2scJyHHqj+S/lQ==", + "requires": { + "protocol-buffers-schema": "^3.3.1", + "safe-buffer": "^5.1.1", + "signed-varint": "^2.0.1", + "varint": "^5.0.0" + } + }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, + "pull-defer": { + "version": "0.2.3", + "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-traverse": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pull-traverse/-/pull-traverse-1.0.3.tgz", + "integrity": "sha1-dPtde+f6a9enjpeTPhmbeUWGaTg=" + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -801,6 +1766,39 @@ "glob": "^7.0.5" } }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "rsa-pem-to-jwk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/rsa-pem-to-jwk/-/rsa-pem-to-jwk-1.1.3.tgz", + "integrity": "sha1-JF52vbfnI0z+58oDLTG1TDj6uY4=", + "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": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/rsa-unpack/-/rsa-unpack-0.0.6.tgz", + "integrity": "sha1-9Q69VqYoN45jHylxYQJs6atO3bo=", + "requires": { + "optimist": "~0.3.5" + } + }, "run-async": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", @@ -817,16 +1815,45 @@ "tslib": "^1.9.0" } }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "secp256k1": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.5.2.tgz", + "integrity": "sha512-iin3kojdybY6NArd+UFsoTuapOF7bnJNf2UbcWXaY3z+E1sJDipl60vtzB5hbO/uquBu7z0fd4VC4Irp+xoFVQ==", + "requires": { + "bindings": "^1.2.1", + "bip66": "^1.1.3", + "bn.js": "^4.11.3", + "create-hash": "^1.1.2", + "drbg.js": "^1.0.1", + "elliptic": "^6.2.3", + "nan": "^2.2.1", + "safe-buffer": "^5.1.0" + } + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, + "sha.js": { + "version": "2.4.11", + "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -855,6 +1882,58 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, + "signed-varint": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/signed-varint/-/signed-varint-2.0.1.tgz", + "integrity": "sha1-UKmYnafJjCxh2tEZvJdHDvhSgSk=", + "requires": { + "varint": "~5.0.0" + } + }, + "split2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", + "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", + "requires": { + "through2": "^2.0.2" + } + }, + "sprintf-js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.0.tgz", + "integrity": "sha1-z/yvcC2vZeo5u04PorKZzsGhvkY=" + }, + "stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==" + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "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=", + "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-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -864,6 +1943,14 @@ "strip-ansi": "^4.0.0" } }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -885,11 +1972,34 @@ "has-flag": "^3.0.0" } }, + "tar-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz", + "integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==", + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.1.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.0", + "xtend": "^4.0.0" + } + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, "timers-ext": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.5.tgz", @@ -907,11 +2017,36 @@ "os-tmpdir": "~1.0.2" } }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" + }, + "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==" + }, + "traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" }, + "tweetnacl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.0.tgz", + "integrity": "sha1-cT2LgY2kIGh0C/aDhtBHnmb8ins=" + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, "unique-string": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", @@ -920,6 +2055,25 @@ "crypto-random-string": "^1.0.0" } }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "varint": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.0.tgz", + "integrity": "sha1-2Ca4n3SQcy+rwMDtaT7Uddyynr8=" + }, + "webcrypto-shim": { + "version": "github:dignifiedquire/webcrypto-shim#190bc9ec341375df6025b17ae12ddb2428ea49c8", + "from": "github:dignifiedquire/webcrypto-shim#master" + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -933,6 +2087,11 @@ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", @@ -990,16 +2149,34 @@ "signal-exit": "^3.0.2" } }, + "ws": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", + "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "requires": { + "async-limiter": "1.0.0" + } + }, "xdg-basedir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=" }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, + "yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" + }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", diff --git a/package.json b/package.json index c5a28900..9653ff58 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "description": "kaizen-cli", "main": "index.js", "dependencies": { + "bluzelle": "^0.2.105", "chalk": "^2.4.1", "clear": "^0.1.0", "clui": "^0.3.6", @@ -14,9 +15,12 @@ "del": "^3.0.0", "figlet": "^1.2.0", "inquirer": "^6.0.0", + "ipfs-api": "^24.0.1", + "jsonfile": "^5.0.0", "minimist": "^1.2.0", "ncp": "^2.0.0", "node-cmd": "^3.0.0", + "opn": "^5.3.0", "progress": "^2.0.0", "shelljs": "^0.8.2", "yargs": "^12.0.0" diff --git a/templates/pn-react-bluzelle.js b/templates/pn-react-bluzelle.js new file mode 100644 index 00000000..d5ce3947 --- /dev/null +++ b/templates/pn-react-bluzelle.js @@ -0,0 +1,56 @@ +'use strict'; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var React = require('react'); + +module.exports = function (ws, uuid, WrappedComponent) { + var PNBluzelle = require('bluzelle'); + PNBluzelle.connect(ws, uuid); + + return function (_React$Component) { + _inherits(_class2, _React$Component); + + function _class2() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, _class2); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = _class2.__proto__ || Object.getPrototypeOf(_class2)).call.apply(_ref, [this].concat(args))), _this), _this.handleCreate = function (key, value) { + return PNBluzelle.create(key, value); + }, _this.handleRead = function (key) { + return PNBluzelle.read(key); + }, _this.handleUpdate = function (key, value) { + return PNBluzelle.update(key, value); + }, _this.handleDelete = function (key) { + return PNBluzelle.remove(key); + }, _temp), _possibleConstructorReturn(_this, _ret); + } + + _createClass(_class2, [{ + key: 'render', + value: function render() { + return React.createElement(WrappedComponent, { + read: this.handleRead, + create: this.handleCreate, + update: this.handleUpdate, + 'delete': this.handleDelete + }); + } + }]); + + return _class2; + }(React.Component); +}; \ No newline at end of file diff --git a/templates/pn-vue-bluzelle.js b/templates/pn-vue-bluzelle.js new file mode 100644 index 00000000..3ec82e0c --- /dev/null +++ b/templates/pn-vue-bluzelle.js @@ -0,0 +1,19 @@ +module.exports = function(ws, uuid) { + var PNBluzelle = require('bluzelle'); + PNBluzelle.connect(ws, uuid); + + return ({ + create: function(key, value) { + PNBluzelle.create(key, value); + }, + read: function(key, cb) { + PNBluzelle.read(key).then(cb); + }, + update: function(key, value) { + PNBluzelle.update(key, value); + }, + delete: function(key) { + PNBluzelle.remove(key); + }, + }); +} \ No newline at end of file