Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.1.18 #212

Merged
merged 4 commits into from
Dec 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ The KAIZEN Platform is currently in experimental alpha.
- [NOIA](http://noia.network/) - Decentralized CDN
- [Near](https://nearprotocol.com/) - Scalable decentralized application
- [Tellor](https://tellor.io/) - Decentralized oracle service
- [Skale](https://skale.network/) - Elastic blockchain network
- [Ren](https://renproject.io/) - Inter-blockchain liquidity for all decentralized applications

## <a name="instances"></a>⚙️ Instances
- [NYM](http://nymtech.net/) - Decentralized privacy
Expand Down
2 changes: 2 additions & 0 deletions README_KR.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ The KAIZEN Platform is currently in experimental alpha.
- [NOIA](http://noia.network/) - Decentralized CDN
- [Near](https://nearprotocol.com/) - Scalable decentralized application
- [Tellor](https://tellor.io/) - Decentralized oracle service
- [Skale](https://skale.network/) - Elastic blockchain network
- [Ren](https://renproject.io/) - Inter-blockchain liquidity for all decentralized applications

## <a name="smart-contracts"></a>📑 Smart Contracts
- [ERC20](https://github.com/PortalNetwork/kaizen-contracts/tree/master/ERC20)
Expand Down
2 changes: 2 additions & 0 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ KAIZEN Platform 目前正在 Alpha 階段
- [NOIA](http://noia.network/) - Decentralized CDN
- [Near](https://nearprotocol.com/) - Scalable decentralized application
- [Tellor](https://tellor.io/) - Decentralized oracle service
- [Skale](https://skale.network/) - Elastic blockchain network
- [Ren](https://renproject.io/) - Inter-blockchain liquidity for all decentralized applications

## <a name="smart-contracts"></a>📑 智能合約
- [ERC20](https://github.com/PortalNetwork/kaizen-contracts/tree/master/ERC20)
Expand Down
62 changes: 44 additions & 18 deletions build/components/Plugins/Install/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ var nearHandler = require('./near.js');

var tellorHandler = require('./tellor.js');

var skaleHandler = require('./skale.js');

var renHandler = require('./ren.js');

function builder(yargs) {
return yargs.positional('plugin', {
alias: 'p',
Expand Down Expand Up @@ -78,7 +82,7 @@ function _handler() {

case 8:
_context.t0 = plugin;
_context.next = _context.t0 === 'bluzelle' ? 11 : _context.t0 === 'nkn' ? 18 : _context.t0 === 'noia' ? 25 : _context.t0 === 'icon' ? 32 : _context.t0 === 'orbit' ? 39 : _context.t0 === 'arweave' ? 46 : _context.t0 === 'band' ? 53 : _context.t0 === 'fluence' ? 60 : _context.t0 === 'sia' ? 67 : _context.t0 === 'near' ? 74 : _context.t0 === 'tellor' ? 81 : 88;
_context.next = _context.t0 === 'bluzelle' ? 11 : _context.t0 === 'nkn' ? 18 : _context.t0 === 'noia' ? 25 : _context.t0 === 'icon' ? 32 : _context.t0 === 'orbit' ? 39 : _context.t0 === 'arweave' ? 46 : _context.t0 === 'band' ? 53 : _context.t0 === 'fluence' ? 60 : _context.t0 === 'sia' ? 67 : _context.t0 === 'near' ? 74 : _context.t0 === 'tellor' ? 81 : _context.t0 === 'skale' ? 88 : _context.t0 === 'ren' ? 95 : 102;
break;

case 11:
Expand All @@ -90,7 +94,7 @@ function _handler() {
case 15:
Spinner.stop();
Log.SuccessLog("Install plugin ".concat(plugin, " Successfully"));
return _context.abrupt("break", 89);
return _context.abrupt("break", 103);

case 18:
Log.NormalLog('Installing plugin, please wait a second...');
Expand All @@ -101,7 +105,7 @@ function _handler() {
case 22:
Spinner.stop();
Log.SuccessLog("Install plugin ".concat(plugin, " Successfully"));
return _context.abrupt("break", 89);
return _context.abrupt("break", 103);

case 25:
Log.NormalLog('Installing plugin, please wait a second...');
Expand All @@ -112,7 +116,7 @@ function _handler() {
case 29:
Spinner.stop();
Log.SuccessLog("Install plugin ".concat(plugin, " Successfully"));
return _context.abrupt("break", 89);
return _context.abrupt("break", 103);

case 32:
Log.NormalLog('Installing plugin, please wait a second...');
Expand All @@ -123,7 +127,7 @@ function _handler() {
case 36:
Spinner.stop();
Log.SuccessLog("Install plugin ".concat(plugin, " Successfully"));
return _context.abrupt("break", 89);
return _context.abrupt("break", 103);

case 39:
Log.NormalLog('Installing plugin, please wait a second...');
Expand All @@ -134,7 +138,7 @@ function _handler() {
case 43:
Spinner.stop();
Log.SuccessLog("Install plugin ".concat(plugin, " Successfully"));
return _context.abrupt("break", 89);
return _context.abrupt("break", 103);

case 46:
Log.NormalLog('Installing plugin, please wait a second...');
Expand All @@ -145,7 +149,7 @@ function _handler() {
case 50:
Spinner.stop();
Log.SuccessLog("Install plugin ".concat(plugin, " Successfully"));
return _context.abrupt("break", 89);
return _context.abrupt("break", 103);

case 53:
Log.NormalLog('Installing plugin, please wait a second...');
Expand All @@ -156,7 +160,7 @@ function _handler() {
case 57:
Spinner.stop();
Log.SuccessLog("Install plugin ".concat(plugin, " Successfully"));
return _context.abrupt("break", 89);
return _context.abrupt("break", 103);

case 60:
Log.NormalLog('Installing plugin, please wait a second...');
Expand All @@ -167,7 +171,7 @@ function _handler() {
case 64:
Spinner.stop();
Log.SuccessLog("Install plugin ".concat(plugin, " Successfully"));
return _context.abrupt("break", 89);
return _context.abrupt("break", 103);

case 67:
Log.NormalLog('Installing plugin, please wait a second...');
Expand All @@ -178,7 +182,7 @@ function _handler() {
case 71:
Spinner.stop();
Log.SuccessLog("Install plugin ".concat(plugin, " Successfully"));
return _context.abrupt("break", 89);
return _context.abrupt("break", 103);

case 74:
Log.NormalLog('Installing plugin, please wait a second...');
Expand All @@ -189,7 +193,7 @@ function _handler() {
case 78:
Spinner.stop();
Log.SuccessLog("Install plugin ".concat(plugin, " Successfully"));
return _context.abrupt("break", 89);
return _context.abrupt("break", 103);

case 81:
Log.NormalLog('Installing plugin, please wait a second...');
Expand All @@ -200,28 +204,50 @@ function _handler() {
case 85:
Spinner.stop();
Log.SuccessLog("Install plugin ".concat(plugin, " Successfully"));
return _context.abrupt("break", 89);
return _context.abrupt("break", 103);

case 88:
Log.NormalLog('Installing plugin, please wait a second...');
Spinner.start();
_context.next = 92;
return skaleHandler();

case 92:
Spinner.stop();
Log.SuccessLog("Install plugin ".concat(plugin, " Successfully"));
return _context.abrupt("break", 103);

case 95:
Log.NormalLog('Installing plugin, please wait a second...');
Spinner.start();
_context.next = 99;
return renHandler();

case 99:
Spinner.stop();
Log.SuccessLog("Install plugin ".concat(plugin, " Successfully"));
return _context.abrupt("break", 103);

case 102:
Log.NormalLog('Plugin not support yet');

case 89:
_context.next = 96;
case 103:
_context.next = 110;
break;

case 91:
_context.prev = 91;
case 105:
_context.prev = 105;
_context.t1 = _context["catch"](0);
Spinner.stop();
Log.ErrorLog('something went wrong!');
console.error(_context.t1);

case 96:
case 110:
case "end":
return _context.stop();
}
}
}, _callee, this, [[0, 91]]);
}, _callee, this, [[0, 105]]);
}));
return _handler.apply(this, arguments);
}
Expand Down
47 changes: 47 additions & 0 deletions build/components/Plugins/Install/ren.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 @renproject/ren');

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('ren') === false) {
userConfig.plugins.push('ren');
}

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

case 7:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
47 changes: 47 additions & 0 deletions build/components/Plugins/Install/skale.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 @skalenetwork/skale.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('skale') === false) {
userConfig.plugins.push('skale');
}

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

case 7:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
4 changes: 3 additions & 1 deletion build/components/Plugins/List/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ function _handler() {
Log.NormalLog('sia'.underline.yellow + ' - Sia information');
Log.NormalLog('near'.underline.yellow + ' - Near information');
Log.NormalLog('tellor'.underline.yellow + ' - Tellor information');
Log.NormalLog('skale'.underline.yellow + ' - Skale information');
Log.NormalLog('ren'.underline.yellow + ' - Ren 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 14:
case 16:
case "end":
return _context.stop();
}
Expand Down
Loading