mirror of https://github.com/embarklabs/embark.git
remove optional plugins from coming as default
This commit is contained in:
parent
448eab724b
commit
75f0639d35
|
@ -13,13 +13,7 @@
|
|||
"solc": "0.6.1"
|
||||
},
|
||||
"plugins": {
|
||||
"embark-ipfs": {},
|
||||
"embark-swarm": {},
|
||||
"embark-whisper-geth": {},
|
||||
"embark-geth": {},
|
||||
"embark-parity": {},
|
||||
"embark-profiler": {},
|
||||
"embark-graph": {}
|
||||
"embark-geth": {}
|
||||
},
|
||||
"options": {
|
||||
"solc": {
|
||||
|
|
|
@ -31,18 +31,8 @@
|
|||
"embark": "^5.1.0",
|
||||
"embark-reset": "^5.1.0",
|
||||
"embarkjs": "^5.1.0",
|
||||
"embarkjs-ens": "^5.1.0",
|
||||
"embarkjs-ipfs": "^5.1.0",
|
||||
"embarkjs-swarm": "^5.1.0",
|
||||
"embarkjs-web3": "^5.1.0",
|
||||
"embarkjs-whisper": "^5.1.0",
|
||||
"embark-ipfs": "^5.1.0",
|
||||
"embark-swarm": "^5.1.0",
|
||||
"embark-whisper-geth": "^5.1.0",
|
||||
"embark-geth": "^5.1.0",
|
||||
"embark-parity": "^5.1.0",
|
||||
"embark-profiler": "^5.1.0",
|
||||
"embark-graph": "^5.1.0",
|
||||
"rimraf": "3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@ import chalk from "chalk";
|
|||
import { Embark, EmbarkEvents } from "embark-core";
|
||||
import constants from "embark-core/constants.json";
|
||||
import { __ } from "embark-i18n";
|
||||
import { dappPath, escapeHtml, exit, jsonFunctionReplacer } from "embark-utils";
|
||||
import { dappPath, escapeHtml, exit, jsonFunctionReplacer, warnIfPackageNotDefinedLocally } from "embark-utils";
|
||||
import stringify from "json-stringify-safe";
|
||||
import { dirname } from "path";
|
||||
import util from "util";
|
||||
|
@ -169,6 +169,9 @@ export default class Console {
|
|||
return this.ipc.request("console:executeCmd", cmd, callback);
|
||||
}
|
||||
|
||||
if (cmd.indexOf("profile") === 0 && warnIfPackageNotDefinedLocally("embark-profiler", this.embark.logger.warn) !== true) {
|
||||
return callback(null, "please install embark-profiler plugin");
|
||||
}
|
||||
if (!(cmd.split(" ")[0] === "history" || cmd === __("history"))) {
|
||||
this.saveHistory(cmd);
|
||||
}
|
||||
|
|
|
@ -65,17 +65,13 @@
|
|||
"embark-ens": "^5.1.0",
|
||||
"embark-ethereum-blockchain-client": "^5.1.0",
|
||||
"embark-ganache": "^5.1.0",
|
||||
"embark-geth": "^5.1.0",
|
||||
"embark-ipfs": "^5.1.0",
|
||||
"embark-library-manager": "^5.1.0",
|
||||
"embark-logger": "^5.1.0",
|
||||
"embark-mocha-tests": "^5.1.0",
|
||||
"embark-namesystem": "^5.1.0",
|
||||
"embark-parity": "^5.1.0",
|
||||
"embark-pipeline": "^5.1.0",
|
||||
"embark-plugin-cmd": "^5.1.0",
|
||||
"embark-process-logs-api-manager": "^5.1.0",
|
||||
"embark-profiler": "^5.1.0",
|
||||
"embark-proxy": "^5.1.0",
|
||||
"embark-rpc-manager": "^5.1.0",
|
||||
"embark-scaffolding": "^5.1.0",
|
||||
|
@ -83,7 +79,6 @@
|
|||
"embark-solidity-tests": "^5.1.0",
|
||||
"embark-specialconfigs": "^5.1.0",
|
||||
"embark-storage": "^5.1.0",
|
||||
"embark-swarm": "^5.1.0",
|
||||
"embark-test-runner": "^5.1.0",
|
||||
"embark-transaction-logger": "^5.1.0",
|
||||
"embark-transaction-tracker": "^5.1.0",
|
||||
|
@ -91,9 +86,7 @@
|
|||
"embark-vyper": "^5.1.0",
|
||||
"embark-watcher": "^5.1.0",
|
||||
"embark-web3": "^5.1.0",
|
||||
"embark-webserver": "^5.1.0",
|
||||
"embark-whisper-geth": "^5.1.0",
|
||||
"embark-whisper-parity": "^5.1.0"
|
||||
"embark-webserver": "^5.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"embark-solo": "^5.1.0",
|
||||
|
|
|
@ -154,7 +154,6 @@ export class Engine {
|
|||
const options = _options || {};
|
||||
|
||||
const groups = {
|
||||
blockchain: this.blockchainComponents,
|
||||
coreComponents: this.coreComponents,
|
||||
stackComponents: this.stackComponents,
|
||||
consoleComponents: this.consoleComponents,
|
||||
|
@ -163,8 +162,6 @@ export class Engine {
|
|||
contracts: this.contractsComponents,
|
||||
pipeline: this.pipelineService,
|
||||
webserver: this.webserverService,
|
||||
storage: this.storageComponent,
|
||||
communication: this.communicationComponents,
|
||||
namesystem: this.namesystemComponents,
|
||||
filewatcher: this.filewatcherService,
|
||||
tests: this.testComponents,
|
||||
|
@ -265,12 +262,6 @@ export class Engine {
|
|||
this.registerModulePackage('embark-embarkjs', { plugins: this.plugins });
|
||||
}
|
||||
|
||||
blockchainComponents() {
|
||||
// plugins
|
||||
this.registerModulePackage('embark-geth');
|
||||
this.registerModulePackage('embark-parity');
|
||||
}
|
||||
|
||||
testComponents(options) {
|
||||
this.registerModulePackage('embark-test-runner', { plugins: this.plugins, ipc: this.ipc });
|
||||
this.registerModulePackage('embark-coverage', { plugins: this.plugins, coverage: options.coverage });
|
||||
|
@ -293,17 +284,6 @@ export class Engine {
|
|||
this.registerModulePackage('embark-specialconfigs', { plugins: this.plugins });
|
||||
this.registerModulePackage('embark-transaction-logger');
|
||||
this.registerModulePackage('embark-transaction-tracker');
|
||||
this.registerModulePackage('embark-profiler');
|
||||
}
|
||||
|
||||
storageComponent() {
|
||||
this.registerModulePackage('embark-ipfs');
|
||||
this.registerModulePackage('embark-swarm');
|
||||
}
|
||||
|
||||
communicationComponents() {
|
||||
this.registerModulePackage('embark-whisper-geth');
|
||||
this.registerModulePackage('embark-whisper-parity');
|
||||
}
|
||||
|
||||
namesystemComponents() {
|
||||
|
|
|
@ -31,24 +31,12 @@
|
|||
{
|
||||
"path": "../../plugins/ganache"
|
||||
},
|
||||
{
|
||||
"path": "../../plugins/geth"
|
||||
},
|
||||
{
|
||||
"path": "../../plugins/ipfs"
|
||||
},
|
||||
{
|
||||
"path": "../../plugins/mocha-tests"
|
||||
},
|
||||
{
|
||||
"path": "../../plugins/parity"
|
||||
},
|
||||
{
|
||||
"path": "../../plugins/plugin-cmd"
|
||||
},
|
||||
{
|
||||
"path": "../../plugins/profiler"
|
||||
},
|
||||
{
|
||||
"path": "../../plugins/rpc-manager"
|
||||
},
|
||||
|
@ -64,9 +52,6 @@
|
|||
{
|
||||
"path": "../../plugins/specialconfigs"
|
||||
},
|
||||
{
|
||||
"path": "../../plugins/swarm"
|
||||
},
|
||||
{
|
||||
"path": "../../plugins/transaction-logger"
|
||||
},
|
||||
|
@ -79,12 +64,6 @@
|
|||
{
|
||||
"path": "../../plugins/web3"
|
||||
},
|
||||
{
|
||||
"path": "../../plugins/whisper-geth"
|
||||
},
|
||||
{
|
||||
"path": "../../plugins/whisper-parity"
|
||||
},
|
||||
{
|
||||
"path": "../../stack/api"
|
||||
},
|
||||
|
|
|
@ -80,7 +80,6 @@
|
|||
"embark-core": "^5.1.0",
|
||||
"embark-deploy-tracker": "^5.1.0",
|
||||
"embark-engine": "^5.1.0",
|
||||
"embark-graph": "^5.1.0",
|
||||
"embark-i18n": "^5.1.0",
|
||||
"embark-logger": "^5.1.0",
|
||||
"embark-reset": "^5.1.0",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Config, Events, fs, TemplateGenerator } from 'embark-core';
|
||||
import { Engine } from 'embark-engine';
|
||||
import { __ } from 'embark-i18n';
|
||||
import { dappPath, joinPath, setUpEnv } from 'embark-utils';
|
||||
import { dappPath, joinPath, setUpEnv, warnIfPackageNotDefinedLocally } from 'embark-utils';
|
||||
import { Logger, LogLevels } from 'embark-logger';
|
||||
let async = require('async');
|
||||
const constants = require('embark-core/constants');
|
||||
|
@ -62,7 +62,6 @@ class EmbarkController {
|
|||
|
||||
engine.registerModuleGroup("coreComponents");
|
||||
engine.registerModuleGroup("blockchainStackComponents");
|
||||
engine.registerModuleGroup("blockchain");
|
||||
|
||||
// load custom plugins
|
||||
engine.loadDappPlugins();
|
||||
|
@ -165,14 +164,11 @@ class EmbarkController {
|
|||
|
||||
// TODO: replace with individual plugins
|
||||
engine.registerModuleGroup("namesystem");
|
||||
engine.registerModuleGroup("communication");
|
||||
engine.registerModuleGroup("blockchain");
|
||||
engine.registerModuleGroup("compiler");
|
||||
engine.registerModuleGroup("contracts");
|
||||
engine.registerModuleGroup("pipeline");
|
||||
engine.registerModuleGroup("webserver");
|
||||
engine.registerModuleGroup("filewatcher");
|
||||
engine.registerModuleGroup("storage");
|
||||
engine.registerModuleGroup("cockpit");
|
||||
engine.registerModulePackage('embark-deploy-tracker', { plugins: engine.plugins });
|
||||
engine.registerModulePackage("embark-debugger");
|
||||
|
@ -290,16 +286,9 @@ class EmbarkController {
|
|||
engine.registerModuleGroup("compiler");
|
||||
engine.registerModuleGroup("contracts");
|
||||
engine.registerModuleGroup("pipeline");
|
||||
engine.registerModuleGroup("communication");
|
||||
engine.registerModuleGroup("namesystem");
|
||||
engine.registerModulePackage('embark-deploy-tracker', { plugins: engine.plugins });
|
||||
|
||||
engine.registerModuleGroup("blockchain");
|
||||
|
||||
if (!options.onlyCompile) {
|
||||
engine.registerModuleGroup("storage");
|
||||
}
|
||||
|
||||
// load custom plugins
|
||||
engine.loadDappPlugins();
|
||||
let pluginList = engine.plugins.listPlugins();
|
||||
|
@ -379,14 +368,11 @@ class EmbarkController {
|
|||
|
||||
// TODO: replace with individual plugins
|
||||
engine.registerModuleGroup("namesystem");
|
||||
engine.registerModuleGroup("communication");
|
||||
engine.registerModuleGroup("blockchain");
|
||||
engine.registerModuleGroup("compiler");
|
||||
engine.registerModuleGroup("contracts");
|
||||
engine.registerModuleGroup("pipeline");
|
||||
engine.registerModuleGroup("webserver");
|
||||
engine.registerModuleGroup("filewatcher");
|
||||
engine.registerModuleGroup("storage");
|
||||
if (!isSecondaryProcess(engine)) {
|
||||
engine.registerModuleGroup("cockpit");
|
||||
}
|
||||
|
@ -484,7 +470,6 @@ class EmbarkController {
|
|||
|
||||
engine.registerModuleGroup("compiler");
|
||||
engine.registerModuleGroup("contracts");
|
||||
engine.registerModulePackage("embark-graph");
|
||||
|
||||
// load custom plugins
|
||||
engine.loadDappPlugins();
|
||||
|
@ -493,6 +478,10 @@ class EmbarkController {
|
|||
engine.logger.info(__("loaded plugins") + ": " + pluginList.join(", "));
|
||||
}
|
||||
|
||||
if (warnIfPackageNotDefinedLocally("embark-graph", engine.logger.error) !== true) {
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
engine.startEngine(async () => {
|
||||
let contractsFiles = await engine.events.request2("config:contractsFiles");
|
||||
let compiledContracts = await engine.events.request2("compiler:contracts:compile", contractsFiles);
|
||||
|
@ -700,14 +689,11 @@ class EmbarkController {
|
|||
engine.registerModuleGroup("stackComponents");
|
||||
|
||||
engine.registerModuleGroup("namesystem");
|
||||
engine.registerModuleGroup("communication");
|
||||
engine.registerModuleGroup("blockchain");
|
||||
engine.registerModuleGroup("compiler");
|
||||
engine.registerModuleGroup("contracts");
|
||||
engine.registerModuleGroup("pipeline");
|
||||
engine.registerModuleGroup("webserver");
|
||||
engine.registerModuleGroup("filewatcher");
|
||||
engine.registerModuleGroup("storage");
|
||||
engine.registerModulePackage('embark-deploy-tracker', { plugins: engine.plugins });
|
||||
|
||||
// load custom plugins
|
||||
|
@ -784,7 +770,6 @@ class EmbarkController {
|
|||
engine.registerModuleGroup("coreComponents");
|
||||
engine.registerModuleGroup("stackComponents");
|
||||
|
||||
engine.registerModuleGroup("blockchain");
|
||||
engine.registerModuleGroup("compiler");
|
||||
engine.registerModulePackage('embark-ganache');
|
||||
engine.registerModulePackage('embark-ethereum-blockchain-client');
|
||||
|
@ -796,8 +781,6 @@ class EmbarkController {
|
|||
engine.registerModuleGroup("tests", options);
|
||||
engine.registerModulePackage('embark-deploy-tracker', { plugins: engine.plugins, trackContracts: false });
|
||||
engine.registerModuleGroup("namesystem");
|
||||
engine.registerModuleGroup("storage");
|
||||
engine.registerModuleGroup("communication");
|
||||
next();
|
||||
},
|
||||
function loadDappPlugins(next) {
|
||||
|
|
|
@ -36,9 +36,6 @@
|
|||
{
|
||||
"path": "../plugins/deploy-tracker"
|
||||
},
|
||||
{
|
||||
"path": "../plugins/graph"
|
||||
},
|
||||
{
|
||||
"path": "../plugins/solidity"
|
||||
},
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import { warnIfPackageNotDefinedLocally } from 'embark-utils';
|
||||
|
||||
const asciiTable = require('ascii-table');
|
||||
const GasEstimator = require('./gasEstimator.js');
|
||||
|
||||
|
@ -12,7 +10,6 @@ class Profiler {
|
|||
|
||||
this.registerConsoleCommand();
|
||||
this.registerApi();
|
||||
warnIfPackageNotDefinedLocally("embark-profiler", this.embark.logger.warn.bind(this.embark.logger));
|
||||
}
|
||||
|
||||
profileJSON(contractName, returnCb) {
|
||||
|
|
Loading…
Reference in New Issue