Skip to content

Commit

Permalink
Merge pull request #216 from PhyrexTsai/master
Browse files Browse the repository at this point in the history
v0.1.26
  • Loading branch information
PhyrexTsai committed Jan 22, 2020
2 parents 47ddbd9 + dd06ed1 commit 2fbbc4a
Show file tree
Hide file tree
Showing 13 changed files with 165 additions and 6 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ The KAIZEN Platform is currently in experimental alpha.
- [Ren](https://renproject.io/) - Inter-blockchain liquidity for all decentralized applications
- [Nervos](https://www.nervos.org/) - Multi-asset, store of value blockchain
- [Kava](https://www.kava.io/) - Cross-chain CDP platform for leverage assets
- [Zabo](https://zabo.com/) - Multiple crypto wallet provider

## <a name="instances"></a>⚙️ Instances
- [NYM](http://nymtech.net/) - Decentralized privacy
Expand All @@ -119,17 +120,22 @@ The KAIZEN Platform is currently in experimental alpha.
- [Nucypher](https://github.com/PortalNetwork/kaizen-contracts/tree/master/Nucypher)

## <a name="faucet"></a>🚰 Faucet
[Join Faucet](https://faucer.portal.network)
Claim test net tokens
- ETH
- ETC
- WAN
- ICON
- [TOMO](https://faucet.testnet.tomochain.com/)

## <a name="demo"></a>🔌 Demo
#### Nifty Game
- [Nifty Game](https://github.com/PortalNetwork/nifty-game/) - Nifty is a non-fungible token game build by KAIZEN.
![Nifty Game](https://github.com/PortalNetwork/nifty-game/blob/develop/cardbattle.gif?raw=true)

#### Dchat
- [Dchat](http://dchat.web3infra.io/)

## <a name="community"></a>💡 Community
- [Gitter](https://gitter.im/PortalNetwork/kaizen-cli)
- [Twitter](https://twitter.com/itisportal)
Expand Down
7 changes: 6 additions & 1 deletion README_KR.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ The KAIZEN Platform is currently in experimental alpha.
- [Ren](https://renproject.io/) - Inter-blockchain liquidity for all decentralized applications
- [Nervos](https://www.nervos.org/) - Multi-asset, store of value blockchain
- [Kava](https://www.kava.io/) - Cross-chain CDP platform for leverage assets
- [Zabo](https://zabo.com/) - Multiple crypto wallet provider

## <a name="smart-contracts"></a>📑 Smart Contracts
- [ERC20](https://github.com/PortalNetwork/kaizen-contracts/tree/master/ERC20)
Expand All @@ -119,17 +120,21 @@ The KAIZEN Platform is currently in experimental alpha.
- [Golem](https://golem.network/) - Decentralized cloud computing

## <a name="faucet"></a>🚰 수도꼭지
KAIZEN Faucet
[Join Faucet](https://faucer.portal.network)
- ETH
- ETC
- WAN
- ICON
- [TOMO](https://faucet.testnet.tomochain.com/)

## <a name="demo"></a>🔌 Demo
#### Nifty Game
- [Nifty Game](https://github.com/PortalNetwork/nifty-game/) - Nifty is a non-fungible token game build by KAIZEN.
![Nifty Game](https://github.com/PortalNetwork/nifty-game/blob/develop/cardbattle.gif?raw=true)

#### Dchat
- [Dchat](http://dchat.web3infra.io/)

## <a name="community"></a>💡 커뮤니티
- [Gitter](https://gitter.im/PortalNetwork/kaizen-cli)
- [Twitter](https://twitter.com/itisportal)
Expand Down
7 changes: 6 additions & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ KAIZEN Platform 目前正在 Alpha 階段
- [Ren](https://renproject.io/) - Inter-blockchain liquidity for all decentralized applications
- [Nervos](https://www.nervos.org/) - Multi-asset, store of value blockchain
- [Kava](https://www.kava.io/) - Cross-chain CDP platform for leverage assets
- [Zabo](https://zabo.com/) - Multiple crypto wallet provider

## <a name="smart-contracts"></a>📑 智能合約
- [ERC20](https://github.com/PortalNetwork/kaizen-contracts/tree/master/ERC20)
Expand All @@ -119,17 +120,21 @@ KAIZEN Platform 目前正在 Alpha 階段
- [Golem](https://golem.network/) - Decentralized cloud computing

## <a name="faucet"></a>🚰 水龍頭
KAIZEN Faucet 支援下列區塊鏈測試網路的代幣
[Join Faucet](https://faucer.portal.network)
- ETH
- ETC
- WAN
- ICON
- [TOMO](https://faucet.testnet.tomochain.com/)

## <a name="demo"></a>🔌 範例
#### Nifty Game
- [Nifty Game](https://github.com/PortalNetwork/nifty-game/) - Nifty is a non-fungible token game build by KAIZEN.
![Nifty Game](https://github.com/PortalNetwork/nifty-game/blob/develop/cardbattle.gif?raw=true)

#### Dchat
- [Dchat](http://dchat.web3infra.io/)

## <a name="community"></a>💡 社群連結
- [Gitter](https://gitter.im/PortalNetwork/kaizen-cli)
- [Twitter](https://twitter.com/itisportal)
Expand Down
47 changes: 47 additions & 0 deletions build/components/Plugins/Install/zabo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
"use strict";

function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }

function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }

var path = require('path');

var fsx = require('fs-extra');

var ExecuteCommand = require('../../../lib/ExecuteCommand');

module.exports =
/*#__PURE__*/
_asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee() {
var configPath, userConfig;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return ExecuteCommand('npm install zabo-sdk-js');

case 2:
// update user's kaizen config
configPath = path.resolve('./', 'kaizen.json');
userConfig = fsx.existsSync(configPath) ? fsx.readJsonSync(configPath) : {};

if (!userConfig.plugins) {
userConfig.plugins = [];
}

if (userConfig.plugins.includes('zabo') === false) {
userConfig.plugins.push('zabo');
}

fsx.outputJsonSync(path.resolve('./', 'kaizen.json'), userConfig);

case 7:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
3 changes: 2 additions & 1 deletion build/components/Plugins/List/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ function _handler() {
Log.NormalLog('ren'.underline.yellow + ' - Ren information');
Log.NormalLog('nervos'.underline.yellow + ' - Nervos information');
Log.NormalLog('kava'.underline.yellow + ' - Kava information');
Log.NormalLog('zabo'.underline.yellow + ' - Zabo information');
Log.NormalLog("\nTo install a plugin run " + "'kaizen plugins install <plugin-name-here>'".yellow);
Log.NormalLog("\nIt will be automatically downloaded and added to your " + "'package.json'".yellow + " and " + "'kaizen.json'".yellow + " file\n");

case 18:
case 19:
case "end":
return _context.stop();
}
Expand Down
49 changes: 49 additions & 0 deletions build/components/Plugins/Uninstall/zabo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"use strict";

function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }

function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }

var path = require("path");

var fsx = require("fs-extra");

var ExecuteCommand = require('../../../lib/ExecuteCommand');

module.exports =
/*#__PURE__*/
_asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee() {
var configPath, userConfig;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return ExecuteCommand('npm uninstall zabo-sdk-js');

case 2:
// update user's kaizen config
configPath = path.resolve('./', 'kaizen.json');
userConfig = fsx.existsSync(configPath) ? fsx.readJsonSync(configPath) : {};

if (!userConfig.plugins) {
userConfig.plugins = [];
}

if (userConfig.plugins.includes('zabo') === false) {
userConfig.plugins = userConfig.plugins.filter(function (element) {
return element != 'zabo';
});
}

fsx.outputJsonSync(path.resolve('./', 'kaizen.json'), userConfig);

case 7:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
2 changes: 1 addition & 1 deletion build/components/Plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function builder(yargs) {

require('./List')(yargs);

return yargs.example('kaizen plugins install').example('kaizen plugins uninstall').example('kaizen plugins list').demandCommand(1, '').epilogue('Available plugins:\n\n'.underline.yellow + 'bluzelle'.underline.yellow + ' - Decentralized database\n' + 'nkn'.underline.yellow + ' - Data transmisstion\n' + 'noia'.underline.yellow + ' - Decentralized CDN\n' + 'icon'.underline.yellow + ' - Blockchain\n' + 'orbit'.underline.yellow + ' - Decentralized database\n' + 'arweave'.underline.yellow + ' - Decentralized file storage\n' + 'band'.underline.yellow + ' - Data Oracle\n' + 'fluence'.underline.yellow + ' - Decentralized database\n' + 'sia'.underline.yellow + ' - Decentralized file storage\n' + 'near'.underline.yellow + ' - Scalable decentralized application\n' + 'tellor'.underline.yellow + ' - Decentralized oracle service\n' + 'skale'.underline.yellow + ' - Elastic blockchain network\n' + 'ren'.underline.yellow + ' - Inter-blockchain liquidity for all decentralized applications\n' + 'nervos'.underline.yellow + ' - Multi-asset, store of value blockchain\n' + 'kava'.underline.yellow + ' - Cross-chain CDP platform for leverage assets\n' + '\nRun ' + '\'kaizen plugins <command>\''.yellow + ' to interact with plugins.\n');
return yargs.example('kaizen plugins install').example('kaizen plugins uninstall').example('kaizen plugins list').demandCommand(1, '').epilogue('Available plugins:\n\n'.underline.yellow + 'bluzelle'.underline.yellow + ' - Decentralized database\n' + 'nkn'.underline.yellow + ' - Data transmisstion\n' + 'noia'.underline.yellow + ' - Decentralized CDN\n' + 'icon'.underline.yellow + ' - Blockchain\n' + 'orbit'.underline.yellow + ' - Decentralized database\n' + 'arweave'.underline.yellow + ' - Decentralized file storage\n' + 'band'.underline.yellow + ' - Data Oracle\n' + 'fluence'.underline.yellow + ' - Decentralized database\n' + 'sia'.underline.yellow + ' - Decentralized file storage\n' + 'near'.underline.yellow + ' - Scalable decentralized application\n' + 'tellor'.underline.yellow + ' - Decentralized oracle service\n' + 'skale'.underline.yellow + ' - Elastic blockchain network\n' + 'ren'.underline.yellow + ' - Inter-blockchain liquidity for all decentralized applications\n' + 'nervos'.underline.yellow + ' - Multi-asset, store of value blockchain\n' + 'kava'.underline.yellow + ' - Cross-chain CDP platform for leverage assets\n' + 'zabo'.underline.yellow + ' - Zabo SDK provides convenient access to the Zabo API\n' + '\nRun ' + '\'kaizen plugins <command>\''.yellow + ' to interact with plugins.\n');
}

function handler(_x) {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kaizen-cli",
"version": "0.1.21",
"version": "0.1.26",
"bin": {
"kaizen": "kaizen"
},
Expand Down
21 changes: 21 additions & 0 deletions src/components/Plugins/Install/zabo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const path = require('path');
const fsx = require('fs-extra');
const ExecuteCommand = require('../../../lib/ExecuteCommand');

module.exports = async function() {
await ExecuteCommand('npm install zabo-sdk-js');

// update user's kaizen config
const configPath = path.resolve('./', 'kaizen.json');
const userConfig = fsx.existsSync(configPath) ? fsx.readJsonSync(configPath) : {};

if(!userConfig.plugins) {
userConfig.plugins = [];
}

if(userConfig.plugins.includes('zabo') === false) {
userConfig.plugins.push('zabo');
}

fsx.outputJsonSync(path.resolve('./', 'kaizen.json'), userConfig);
}
1 change: 1 addition & 0 deletions src/components/Plugins/List/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ async function handler(argv) {
Log.NormalLog('ren'.underline.yellow + ' - Ren information');
Log.NormalLog('nervos'.underline.yellow + ' - Nervos information');
Log.NormalLog('kava'.underline.yellow + ' - Kava information');
Log.NormalLog('zabo'.underline.yellow + ' - Zabo information');

Log.NormalLog("\nTo install a plugin run " + "'kaizen plugins install <plugin-name-here>'".yellow)

Expand Down
23 changes: 23 additions & 0 deletions src/components/Plugins/Uninstall/zabo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const path = require("path");
const fsx = require("fs-extra");
const ExecuteCommand = require('../../../lib/ExecuteCommand');

module.exports = async function() {
await ExecuteCommand('npm uninstall zabo-sdk-js');

// update user's kaizen config
const configPath = path.resolve('./', 'kaizen.json');
const userConfig = fsx.existsSync(configPath) ? fsx.readJsonSync(configPath) : {};

if(!userConfig.plugins) {
userConfig.plugins = [];
}

if(userConfig.plugins.includes('zabo') === false) {
userConfig.plugins = userConfig.plugins.filter(function(element) {
return element != 'zabo';
});
}

fsx.outputJsonSync(path.resolve('./', 'kaizen.json'), userConfig);
}
1 change: 1 addition & 0 deletions src/components/Plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function builder(yargs) {
'ren'.underline.yellow + ' - Inter-blockchain liquidity for all decentralized applications\n' +
'nervos'.underline.yellow + ' - Multi-asset, store of value blockchain\n' +
'kava'.underline.yellow + ' - Cross-chain CDP platform for leverage assets\n' +
'zabo'.underline.yellow + ' - Zabo SDK provides convenient access to the Zabo API\n' +
'\nRun ' + '\'kaizen plugins <command>\''.yellow +
' to interact with plugins.\n'
);
Expand Down

0 comments on commit 2fbbc4a

Please sign in to comment.