mirror of https://github.com/embarklabs/embark.git
chore: make basic-pipeline an optional plugin
chore: make basic-pipeline an optional plugin chore: make basic-pipeline an optional plugin chore: make basic-pipeline an optional plugin chore: make basic-pipeline an optional plugin chore: make basic-pipeline an optional plugin chore: make basic-pipeline an optional plugin chore: make basic-pipeline an optional plugin fixes address code review fix linter issue fix missing param fix binding remove pipeline warning remove unused var
This commit is contained in:
parent
db8282c52c
commit
948956ab1f
|
@ -18,7 +18,8 @@
|
||||||
"embark-geth": {},
|
"embark-geth": {},
|
||||||
"embark-parity": {},
|
"embark-parity": {},
|
||||||
"embark-profiler": {},
|
"embark-profiler": {},
|
||||||
"embark-graph": {}
|
"embark-graph": {},
|
||||||
|
"embark-basic-pipeline": {}
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"solc": {
|
"solc": {
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"embark": "^5.3.0-nightly.9",
|
"embark": "^5.3.0-nightly.9",
|
||||||
|
"embark-basic-pipeline": "^5.3.0-nightly.7",
|
||||||
"embark-geth": "^5.3.0-nightly.9",
|
"embark-geth": "^5.3.0-nightly.9",
|
||||||
"embark-graph": "^5.3.0-nightly.7",
|
"embark-graph": "^5.3.0-nightly.7",
|
||||||
"embark-ipfs": "^5.3.0-nightly.9",
|
"embark-ipfs": "^5.3.0-nightly.9",
|
||||||
|
|
|
@ -18,7 +18,8 @@
|
||||||
"embark-geth": {},
|
"embark-geth": {},
|
||||||
"embark-parity": {},
|
"embark-parity": {},
|
||||||
"embark-profiler": {},
|
"embark-profiler": {},
|
||||||
"embark-graph": {}
|
"embark-graph": {},
|
||||||
|
"embark-basic-pipeline": {}
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"solc": {
|
"solc": {
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
"bootstrap": "4.3.1",
|
"bootstrap": "4.3.1",
|
||||||
"classnames": "2.2.6",
|
"classnames": "2.2.6",
|
||||||
"embark": "^5.3.0-nightly.9",
|
"embark": "^5.3.0-nightly.9",
|
||||||
|
"embark-basic-pipeline": "^5.3.0-nightly.7",
|
||||||
"embark-geth": "^5.3.0-nightly.9",
|
"embark-geth": "^5.3.0-nightly.9",
|
||||||
"embark-graph": "^5.3.0-nightly.7",
|
"embark-graph": "^5.3.0-nightly.7",
|
||||||
"embark-ipfs": "^5.3.0-nightly.9",
|
"embark-ipfs": "^5.3.0-nightly.9",
|
||||||
|
|
|
@ -25,7 +25,8 @@
|
||||||
"embark-parity": {},
|
"embark-parity": {},
|
||||||
"embark-profiler": {},
|
"embark-profiler": {},
|
||||||
"embark-graph": {},
|
"embark-graph": {},
|
||||||
"embark-dapp-test-service": {}
|
"embark-dapp-test-service": {},
|
||||||
|
"embark-basic-pipeline": {}
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"solc": {
|
"solc": {
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"bootstrap": "3.4.1",
|
"bootstrap": "3.4.1",
|
||||||
"embark": "^5.3.0-nightly.9",
|
"embark": "^5.3.0-nightly.9",
|
||||||
|
"embark-basic-pipeline": "^5.3.0-nightly.7",
|
||||||
"embark-dapp-test-service": "^5.2.3",
|
"embark-dapp-test-service": "^5.2.3",
|
||||||
"embark-geth": "^5.3.0-nightly.9",
|
"embark-geth": "^5.3.0-nightly.9",
|
||||||
"embark-graph": "^5.3.0-nightly.7",
|
"embark-graph": "^5.3.0-nightly.7",
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
"embark-geth": {},
|
"embark-geth": {},
|
||||||
"embark-parity": {},
|
"embark-parity": {},
|
||||||
"embark-profiler": {},
|
"embark-profiler": {},
|
||||||
"embark-graph": {}
|
"embark-graph": {},
|
||||||
|
"embark-basic-pipeline": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"description": "Test DApp for integration testing purposes",
|
"description": "Test DApp for integration testing purposes",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"embark": "^5.3.0-nightly.9",
|
"embark": "^5.3.0-nightly.9",
|
||||||
|
"embark-basic-pipeline": "^5.3.0-nightly.7",
|
||||||
"embark-geth": "^5.3.0-nightly.9",
|
"embark-geth": "^5.3.0-nightly.9",
|
||||||
"embark-graph": "^5.3.0-nightly.7",
|
"embark-graph": "^5.3.0-nightly.7",
|
||||||
"embark-ipfs": "^5.3.0-nightly.9",
|
"embark-ipfs": "^5.3.0-nightly.9",
|
||||||
|
|
|
@ -89,6 +89,8 @@ export class Plugin {
|
||||||
|
|
||||||
plugins: any;
|
plugins: any;
|
||||||
|
|
||||||
|
pluginsAPI: any;
|
||||||
|
|
||||||
env: any;
|
env: any;
|
||||||
|
|
||||||
loaded = false;
|
loaded = false;
|
||||||
|
@ -121,6 +123,7 @@ export class Plugin {
|
||||||
this.acceptedContext = options.pluginConfig.context || [constants.contexts.any];
|
this.acceptedContext = options.pluginConfig.context || [constants.contexts.any];
|
||||||
this.version = options.version;
|
this.version = options.version;
|
||||||
this.constants = constants;
|
this.constants = constants;
|
||||||
|
this.pluginsAPI = options.pluginsAPI;
|
||||||
|
|
||||||
if (!Array.isArray(this.currentContext)) {
|
if (!Array.isArray(this.currentContext)) {
|
||||||
this.currentContext = [this.currentContext];
|
this.currentContext = [this.currentContext];
|
||||||
|
|
|
@ -87,6 +87,7 @@ export class Plugins {
|
||||||
events: this.events,
|
events: this.events,
|
||||||
config: this.config,
|
config: this.config,
|
||||||
plugins: this.plugins,
|
plugins: this.plugins,
|
||||||
|
pluginsAPI: this,
|
||||||
fs: this.fs,
|
fs: this.fs,
|
||||||
isInternal: true,
|
isInternal: true,
|
||||||
context: this.context,
|
context: this.context,
|
||||||
|
@ -121,6 +122,7 @@ export class Plugins {
|
||||||
events: this.events,
|
events: this.events,
|
||||||
config: this.config,
|
config: this.config,
|
||||||
plugins: this.plugins,
|
plugins: this.plugins,
|
||||||
|
pluginsAPI: this,
|
||||||
fs: this.fs,
|
fs: this.fs,
|
||||||
isInternal: true,
|
isInternal: true,
|
||||||
context: this.context,
|
context: this.context,
|
||||||
|
@ -152,6 +154,7 @@ export class Plugins {
|
||||||
events: this.events,
|
events: this.events,
|
||||||
config: this.config,
|
config: this.config,
|
||||||
plugins: this.plugins,
|
plugins: this.plugins,
|
||||||
|
pluginsAPI: this,
|
||||||
fs: this.fs,
|
fs: this.fs,
|
||||||
isInternal: false,
|
isInternal: false,
|
||||||
context: this.context,
|
context: this.context,
|
||||||
|
|
|
@ -50,7 +50,6 @@
|
||||||
"embark-accounts-manager": "^5.3.0-nightly.9",
|
"embark-accounts-manager": "^5.3.0-nightly.9",
|
||||||
"embark-api": "^5.3.0-nightly.9",
|
"embark-api": "^5.3.0-nightly.9",
|
||||||
"embark-authenticator": "^5.3.0-nightly.7",
|
"embark-authenticator": "^5.3.0-nightly.7",
|
||||||
"embark-basic-pipeline": "^5.3.0-nightly.9",
|
|
||||||
"embark-blockchain": "^5.3.0-nightly.9",
|
"embark-blockchain": "^5.3.0-nightly.9",
|
||||||
"embark-code-runner": "^5.3.0-nightly.9",
|
"embark-code-runner": "^5.3.0-nightly.9",
|
||||||
"embark-communication": "^5.3.0-nightly.7",
|
"embark-communication": "^5.3.0-nightly.7",
|
||||||
|
|
|
@ -39,8 +39,6 @@ export class Engine {
|
||||||
|
|
||||||
webServerConfig: any;
|
webServerConfig: any;
|
||||||
|
|
||||||
webpackConfigName: string;
|
|
||||||
|
|
||||||
singleUseAuthToken: boolean;
|
singleUseAuthToken: boolean;
|
||||||
|
|
||||||
ipcRole = 'client';
|
ipcRole = 'client';
|
||||||
|
@ -73,7 +71,6 @@ export class Engine {
|
||||||
this.context = options.context;
|
this.context = options.context;
|
||||||
this.useDashboard = options.useDashboard;
|
this.useDashboard = options.useDashboard;
|
||||||
this.webServerConfig = options.webServerConfig;
|
this.webServerConfig = options.webServerConfig;
|
||||||
this.webpackConfigName = options.webpackConfigName;
|
|
||||||
this.singleUseAuthToken = options.singleUseAuthToken;
|
this.singleUseAuthToken = options.singleUseAuthToken;
|
||||||
this.package = options.package;
|
this.package = options.package;
|
||||||
this.ipcRole = options.ipcRole || 'client';
|
this.ipcRole = options.ipcRole || 'client';
|
||||||
|
@ -170,7 +167,6 @@ export class Engine {
|
||||||
blockchainStackComponents: this.blockchainStackComponents,
|
blockchainStackComponents: this.blockchainStackComponents,
|
||||||
compiler: this.compilerComponents,
|
compiler: this.compilerComponents,
|
||||||
contracts: this.contractsComponents,
|
contracts: this.contractsComponents,
|
||||||
pipeline: this.pipelineService,
|
|
||||||
webserver: this.webserverService,
|
webserver: this.webserverService,
|
||||||
namesystem: this.namesystemComponents,
|
namesystem: this.namesystemComponents,
|
||||||
filewatcher: this.filewatcherService,
|
filewatcher: this.filewatcherService,
|
||||||
|
@ -197,14 +193,6 @@ export class Engine {
|
||||||
this.registerModulePackage('embark-watcher');
|
this.registerModulePackage('embark-watcher');
|
||||||
}
|
}
|
||||||
|
|
||||||
pipelineService(_options) {
|
|
||||||
this.registerModulePackage('embark-basic-pipeline', {
|
|
||||||
plugins: this.plugins,
|
|
||||||
webpackConfigName: this.webpackConfigName,
|
|
||||||
useDashboard: this.useDashboard
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
serviceMonitor() {
|
serviceMonitor() {
|
||||||
this.servicesMonitor = new ServicesMonitor({ events: this.events, logger: this.logger, plugins: this.plugins });
|
this.servicesMonitor = new ServicesMonitor({ events: this.events, logger: this.logger, plugins: this.plugins });
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,6 @@
|
||||||
{
|
{
|
||||||
"path": "../../plugins/accounts-manager"
|
"path": "../../plugins/accounts-manager"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "../../plugins/basic-pipeline"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "../../plugins/coverage"
|
"path": "../../plugins/coverage"
|
||||||
},
|
},
|
||||||
|
|
|
@ -183,7 +183,6 @@ class EmbarkController {
|
||||||
engine.registerModuleGroup("namesystem");
|
engine.registerModuleGroup("namesystem");
|
||||||
engine.registerModuleGroup("compiler");
|
engine.registerModuleGroup("compiler");
|
||||||
engine.registerModuleGroup("contracts");
|
engine.registerModuleGroup("contracts");
|
||||||
engine.registerModuleGroup("pipeline");
|
|
||||||
engine.registerModuleGroup("webserver");
|
engine.registerModuleGroup("webserver");
|
||||||
engine.registerModuleGroup("filewatcher");
|
engine.registerModuleGroup("filewatcher");
|
||||||
engine.registerModuleGroup("cockpit");
|
engine.registerModuleGroup("cockpit");
|
||||||
|
@ -435,7 +434,6 @@ class EmbarkController {
|
||||||
engine.registerModuleGroup("namesystem");
|
engine.registerModuleGroup("namesystem");
|
||||||
engine.registerModuleGroup("compiler");
|
engine.registerModuleGroup("compiler");
|
||||||
engine.registerModuleGroup("contracts");
|
engine.registerModuleGroup("contracts");
|
||||||
engine.registerModuleGroup("pipeline");
|
|
||||||
engine.registerModuleGroup("webserver");
|
engine.registerModuleGroup("webserver");
|
||||||
engine.registerModuleGroup("filewatcher");
|
engine.registerModuleGroup("filewatcher");
|
||||||
if (!isSecondaryProcess(engine)) {
|
if (!isSecondaryProcess(engine)) {
|
||||||
|
@ -756,10 +754,10 @@ class EmbarkController {
|
||||||
engine.registerModuleGroup("stackComponents");
|
engine.registerModuleGroup("stackComponents");
|
||||||
|
|
||||||
engine.registerModulePackage('embark-ganache');
|
engine.registerModulePackage('embark-ganache');
|
||||||
|
|
||||||
engine.registerModuleGroup("namesystem");
|
engine.registerModuleGroup("namesystem");
|
||||||
engine.registerModuleGroup("compiler");
|
engine.registerModuleGroup("compiler");
|
||||||
engine.registerModuleGroup("contracts");
|
engine.registerModuleGroup("contracts");
|
||||||
engine.registerModuleGroup("pipeline");
|
|
||||||
engine.registerModuleGroup("webserver");
|
engine.registerModuleGroup("webserver");
|
||||||
engine.registerModuleGroup("filewatcher");
|
engine.registerModuleGroup("filewatcher");
|
||||||
engine.registerModulePackage('embark-deploy-tracker', { plugins: engine.plugins });
|
engine.registerModulePackage('embark-deploy-tracker', { plugins: engine.plugins });
|
||||||
|
@ -838,6 +836,7 @@ class EmbarkController {
|
||||||
engine.registerModuleGroup("coreComponents");
|
engine.registerModuleGroup("coreComponents");
|
||||||
engine.registerModuleGroup("stackComponents");
|
engine.registerModuleGroup("stackComponents");
|
||||||
|
|
||||||
|
engine.registerModuleGroup("compiler");
|
||||||
engine.registerModulePackage('embark-ganache');
|
engine.registerModulePackage('embark-ganache');
|
||||||
engine.registerModuleGroup("compiler");
|
engine.registerModuleGroup("compiler");
|
||||||
engine.registerModulePackage('embark-ethereum-blockchain-client');
|
engine.registerModulePackage('embark-ethereum-blockchain-client');
|
||||||
|
@ -845,7 +844,6 @@ class EmbarkController {
|
||||||
engine.registerModulePackage('embark-accounts-manager');
|
engine.registerModulePackage('embark-accounts-manager');
|
||||||
engine.registerModulePackage('embark-rpc-manager');
|
engine.registerModulePackage('embark-rpc-manager');
|
||||||
engine.registerModulePackage('embark-specialconfigs', { plugins: engine.plugins });
|
engine.registerModulePackage('embark-specialconfigs', { plugins: engine.plugins });
|
||||||
engine.registerModuleGroup("pipeline");
|
|
||||||
engine.registerModuleGroup("tests", options);
|
engine.registerModuleGroup("tests", options);
|
||||||
engine.registerModulePackage('embark-deploy-tracker', { plugins: engine.plugins, trackContracts: false });
|
engine.registerModulePackage('embark-deploy-tracker', { plugins: engine.plugins, trackContracts: false });
|
||||||
engine.registerModuleGroup("namesystem");
|
engine.registerModuleGroup("namesystem");
|
||||||
|
|
|
@ -8,15 +8,16 @@ require('./env');
|
||||||
|
|
||||||
class BasicPipeline {
|
class BasicPipeline {
|
||||||
|
|
||||||
constructor(embark, options) {
|
constructor(embark) {
|
||||||
this.embark = embark;
|
this.embark = embark;
|
||||||
this.assetFiles = embark.config.assetFiles;
|
this.assetFiles = embark.config.assetFiles;
|
||||||
this.isFirstBuild = true;
|
this.isFirstBuild = true;
|
||||||
this.embarkConfig = embark.config.embarkConfig;
|
this.embarkConfig = embark.config.embarkConfig;
|
||||||
// TODO: why god why
|
// TODO: why god why
|
||||||
this.useDashboard = options.useDashboard;
|
// this.useDashboard = options.useDashboard;
|
||||||
|
this.useDashboard = true;
|
||||||
this.fs = embark.fs;
|
this.fs = embark.fs;
|
||||||
this.webpackConfigName = options.webpackConfigName;
|
this.webpackConfigName = embark.config.webpackConfigName;
|
||||||
this.env = embark.config.env;
|
this.env = embark.config.env;
|
||||||
this.buildDir = embark.config.buildDir;
|
this.buildDir = embark.config.buildDir;
|
||||||
this.contractsFiles = embark.config.contractsFiles;
|
this.contractsFiles = embark.config.contractsFiles;
|
||||||
|
@ -24,7 +25,7 @@ class BasicPipeline {
|
||||||
|
|
||||||
this.logger = embark.logger;
|
this.logger = embark.logger;
|
||||||
this.events = embark.events;
|
this.events = embark.events;
|
||||||
this.plugins = options.plugins;
|
this.plugins = embark.pluginsAPI;
|
||||||
this.pipelinePlugins = this.plugins.getPluginsFor('pipeline');
|
this.pipelinePlugins = this.plugins.getPluginsFor('pipeline');
|
||||||
this.pipelineConfig = embark.config.pipelineConfig;
|
this.pipelineConfig = embark.config.pipelineConfig;
|
||||||
let plugin = this.plugins.createPlugin('basic-pipeline', {});
|
let plugin = this.plugins.createPlugin('basic-pipeline', {});
|
||||||
|
|
Loading…
Reference in New Issue