Skip to content

Commit

Permalink
chore: make basic-pipeline an optional plugin
Browse files Browse the repository at this point in the history
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
  • Loading branch information
iurimatias committed Mar 13, 2020
1 parent db8282c commit 8c11adf
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 28 deletions.
3 changes: 2 additions & 1 deletion dapps/templates/boilerplate/embark.json
Expand Up @@ -18,7 +18,8 @@
"embark-geth": {},
"embark-parity": {},
"embark-profiler": {},
"embark-graph": {}
"embark-graph": {},
"embark-basic-pipeline": {}
},
"options": {
"solc": {
Expand Down
1 change: 1 addition & 0 deletions dapps/templates/boilerplate/package.json
Expand Up @@ -33,6 +33,7 @@
},
"devDependencies": {
"embark": "^5.3.0-nightly.9",
"embark-basic-pipeline": "^5.3.0-nightly.7",
"embark-geth": "^5.3.0-nightly.9",
"embark-graph": "^5.3.0-nightly.7",
"embark-ipfs": "^5.3.0-nightly.9",
Expand Down
3 changes: 2 additions & 1 deletion dapps/templates/demo/embark.json
Expand Up @@ -18,7 +18,8 @@
"embark-geth": {},
"embark-parity": {},
"embark-profiler": {},
"embark-graph": {}
"embark-graph": {},
"embark-basic-pipeline": {}
},
"options": {
"solc": {
Expand Down
1 change: 1 addition & 0 deletions dapps/templates/demo/package.json
Expand Up @@ -35,6 +35,7 @@
"bootstrap": "4.3.1",
"classnames": "2.2.6",
"embark": "^5.3.0-nightly.9",
"embark-basic-pipeline": "^5.3.0-nightly.7",
"embark-geth": "^5.3.0-nightly.9",
"embark-graph": "^5.3.0-nightly.7",
"embark-ipfs": "^5.3.0-nightly.9",
Expand Down
3 changes: 2 additions & 1 deletion dapps/tests/app/embark.json
Expand Up @@ -25,7 +25,8 @@
"embark-parity": {},
"embark-profiler": {},
"embark-graph": {},
"embark-dapp-test-service": {}
"embark-dapp-test-service": {},
"embark-basic-pipeline": {}
},
"options": {
"solc": {
Expand Down
1 change: 1 addition & 0 deletions dapps/tests/app/package.json
Expand Up @@ -3,6 +3,7 @@
"devDependencies": {
"bootstrap": "3.4.1",
"embark": "^5.3.0-nightly.9",
"embark-basic-pipeline": "^5.3.0-nightly.7",
"embark-dapp-test-service": "^5.2.3",
"embark-geth": "^5.3.0-nightly.9",
"embark-graph": "^5.3.0-nightly.7",
Expand Down
3 changes: 2 additions & 1 deletion dapps/tests/contracts/embark.json
Expand Up @@ -18,6 +18,7 @@
"embark-geth": {},
"embark-parity": {},
"embark-profiler": {},
"embark-graph": {}
"embark-graph": {},
"embark-basic-pipeline": {}
}
}
1 change: 1 addition & 0 deletions dapps/tests/contracts/package.json
Expand Up @@ -2,6 +2,7 @@
"description": "Test DApp for integration testing purposes",
"devDependencies": {
"embark": "^5.3.0-nightly.9",
"embark-basic-pipeline": "^5.3.0-nightly.7",
"embark-geth": "^5.3.0-nightly.9",
"embark-graph": "^5.3.0-nightly.7",
"embark-ipfs": "^5.3.0-nightly.9",
Expand Down
3 changes: 3 additions & 0 deletions packages/core/core/src/plugin.ts
Expand Up @@ -89,6 +89,8 @@ export class Plugin {

plugins: any;

pluginsAPI: any;

env: any;

loaded = false;
Expand Down Expand Up @@ -121,6 +123,7 @@ export class Plugin {
this.acceptedContext = options.pluginConfig.context || [constants.contexts.any];
this.version = options.version;
this.constants = constants;
this.pluginsAPI = options.pluginsAPI;

if (!Array.isArray(this.currentContext)) {
this.currentContext = [this.currentContext];
Expand Down
3 changes: 3 additions & 0 deletions packages/core/core/src/plugins.ts
Expand Up @@ -87,6 +87,7 @@ export class Plugins {
events: this.events,
config: this.config,
plugins: this.plugins,
pluginsAPI: this,
fs: this.fs,
isInternal: true,
context: this.context,
Expand Down Expand Up @@ -121,6 +122,7 @@ export class Plugins {
events: this.events,
config: this.config,
plugins: this.plugins,
pluginsAPI: this,
fs: this.fs,
isInternal: true,
context: this.context,
Expand Down Expand Up @@ -152,6 +154,7 @@ export class Plugins {
events: this.events,
config: this.config,
plugins: this.plugins,
pluginsAPI: this,
fs: this.fs,
isInternal: false,
context: this.context,
Expand Down
1 change: 0 additions & 1 deletion packages/core/engine/package.json
Expand Up @@ -50,7 +50,6 @@
"embark-accounts-manager": "^5.3.0-nightly.9",
"embark-api": "^5.3.0-nightly.9",
"embark-authenticator": "^5.3.0-nightly.7",
"embark-basic-pipeline": "^5.3.0-nightly.9",
"embark-blockchain": "^5.3.0-nightly.9",
"embark-code-runner": "^5.3.0-nightly.9",
"embark-communication": "^5.3.0-nightly.7",
Expand Down
12 changes: 0 additions & 12 deletions packages/core/engine/src/index.ts
Expand Up @@ -39,8 +39,6 @@ export class Engine {

webServerConfig: any;

webpackConfigName: string;

singleUseAuthToken: boolean;

ipcRole = 'client';
Expand Down Expand Up @@ -73,7 +71,6 @@ export class Engine {
this.context = options.context;
this.useDashboard = options.useDashboard;
this.webServerConfig = options.webServerConfig;
this.webpackConfigName = options.webpackConfigName;
this.singleUseAuthToken = options.singleUseAuthToken;
this.package = options.package;
this.ipcRole = options.ipcRole || 'client';
Expand Down Expand Up @@ -170,7 +167,6 @@ export class Engine {
blockchainStackComponents: this.blockchainStackComponents,
compiler: this.compilerComponents,
contracts: this.contractsComponents,
pipeline: this.pipelineService,
webserver: this.webserverService,
namesystem: this.namesystemComponents,
filewatcher: this.filewatcherService,
Expand All @@ -197,14 +193,6 @@ export class Engine {
this.registerModulePackage('embark-watcher');
}

pipelineService(_options) {
this.registerModulePackage('embark-basic-pipeline', {
plugins: this.plugins,
webpackConfigName: this.webpackConfigName,
useDashboard: this.useDashboard
});
}

serviceMonitor() {
this.servicesMonitor = new ServicesMonitor({ events: this.events, logger: this.logger, plugins: this.plugins });

Expand Down
3 changes: 0 additions & 3 deletions packages/core/engine/tsconfig.json
Expand Up @@ -13,9 +13,6 @@
{
"path": "../../plugins/accounts-manager"
},
{
"path": "../../plugins/basic-pipeline"
},
{
"path": "../../plugins/coverage"
},
Expand Down
6 changes: 2 additions & 4 deletions packages/embark/src/cmd/cmd_controller.js
Expand Up @@ -183,7 +183,6 @@ class EmbarkController {
engine.registerModuleGroup("namesystem");
engine.registerModuleGroup("compiler");
engine.registerModuleGroup("contracts");
engine.registerModuleGroup("pipeline");
engine.registerModuleGroup("webserver");
engine.registerModuleGroup("filewatcher");
engine.registerModuleGroup("cockpit");
Expand Down Expand Up @@ -435,7 +434,6 @@ class EmbarkController {
engine.registerModuleGroup("namesystem");
engine.registerModuleGroup("compiler");
engine.registerModuleGroup("contracts");
engine.registerModuleGroup("pipeline");
engine.registerModuleGroup("webserver");
engine.registerModuleGroup("filewatcher");
if (!isSecondaryProcess(engine)) {
Expand Down Expand Up @@ -756,10 +754,10 @@ class EmbarkController {
engine.registerModuleGroup("stackComponents");

engine.registerModulePackage('embark-ganache');

engine.registerModuleGroup("namesystem");
engine.registerModuleGroup("compiler");
engine.registerModuleGroup("contracts");
engine.registerModuleGroup("pipeline");
engine.registerModuleGroup("webserver");
engine.registerModuleGroup("filewatcher");
engine.registerModulePackage('embark-deploy-tracker', { plugins: engine.plugins });
Expand Down Expand Up @@ -838,14 +836,14 @@ class EmbarkController {
engine.registerModuleGroup("coreComponents");
engine.registerModuleGroup("stackComponents");

engine.registerModuleGroup("compiler");
engine.registerModulePackage('embark-ganache');
engine.registerModuleGroup("compiler");
engine.registerModulePackage('embark-ethereum-blockchain-client');
engine.registerModulePackage('embark-web3');
engine.registerModulePackage('embark-accounts-manager');
engine.registerModulePackage('embark-rpc-manager');
engine.registerModulePackage('embark-specialconfigs', { plugins: engine.plugins });
engine.registerModuleGroup("pipeline");
engine.registerModuleGroup("tests", options);
engine.registerModulePackage('embark-deploy-tracker', { plugins: engine.plugins, trackContracts: false });
engine.registerModuleGroup("namesystem");
Expand Down
9 changes: 5 additions & 4 deletions packages/plugins/basic-pipeline/src/index.js
Expand Up @@ -8,23 +8,24 @@ require('./env');

class BasicPipeline {

constructor(embark, options) {
constructor(embark) {
this.embark = embark;
this.assetFiles = embark.config.assetFiles;
this.isFirstBuild = true;
this.embarkConfig = embark.config.embarkConfig;
// TODO: why god why
this.useDashboard = options.useDashboard;
// this.useDashboard = options.useDashboard;
this.useDashboard = true;
this.fs = embark.fs;
this.webpackConfigName = options.webpackConfigName;
this.webpackConfigName = embark.config.webpackConfigName;
this.env = embark.config.env;
this.buildDir = embark.config.buildDir;
this.contractsFiles = embark.config.contractsFiles;
this.embarkConfig = embark.config.embarkConfig;

this.logger = embark.logger;
this.events = embark.events;
this.plugins = options.plugins;
this.plugins = embark.pluginsAPI;
this.pipelinePlugins = this.plugins.getPluginsFor('pipeline');
this.pipelineConfig = embark.config.pipelineConfig;
let plugin = this.plugins.createPlugin('basic-pipeline', {});
Expand Down

0 comments on commit 8c11adf

Please sign in to comment.