From bde252de0e9c176bef2cb7cf5ab2ec75f0a441b3 Mon Sep 17 00:00:00 2001 From: Incede <33103370+Incede@users.noreply.github.com> Date: Wed, 23 Aug 2023 12:14:46 +0100 Subject: [PATCH] Add enable-chain-connector-plugin flag on commander (#8891) Add new flag Co-authored-by: !shan --- .../templates/init/src/commands/start.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/commander/src/bootstrapping/templates/lisk-template-ts/templates/init/src/commands/start.ts b/commander/src/bootstrapping/templates/lisk-template-ts/templates/init/src/commands/start.ts index 09c3fb4e0ce..380b966365f 100644 --- a/commander/src/bootstrapping/templates/lisk-template-ts/templates/init/src/commands/start.ts +++ b/commander/src/bootstrapping/templates/lisk-template-ts/templates/init/src/commands/start.ts @@ -11,6 +11,7 @@ import { MonitorPlugin } from '@liskhq/lisk-framework-monitor-plugin'; import { ReportMisbehaviorPlugin } from '@liskhq/lisk-framework-report-misbehavior-plugin'; import { DashboardPlugin } from '@liskhq/lisk-framework-dashboard-plugin'; import { FaucetPlugin } from '@liskhq/lisk-framework-faucet-plugin'; +import { ChainConnectorPlugin } from '@liskhq/lisk-framework-chain-connector-plugin'; import { join } from 'path'; import { getApplication } from '../app/app'; @@ -75,7 +76,7 @@ export class StartCommand extends BaseStartCommand { 'enable-report-misbehavior-plugin': flagParser.boolean({ description: 'Enable ReportMisbehavior Plugin. Environment variable "LISK_ENABLE_REPORT_MISBEHAVIOR_PLUGIN" can also be used.', - env: 'LISK_ENABLE_MONITOR_PLUGIN', + env: 'LISK_ENABLE_MISBEHAVIOR_PLUGIN', default: false, }), 'enable-faucet-plugin': flagParser.boolean({ @@ -102,6 +103,12 @@ export class StartCommand extends BaseStartCommand { env: 'LISK_DASHBOARD_PLUGIN_PORT', dependsOn: ['enable-dashboard-plugin'], }), + 'enable-chain-connector-plugin': flagParser.boolean({ + description: + 'Enable ChainConnector Plugin. Environment variable "LISK_ENABLE_CHAIN_CONNECTOR_PLUGIN" can also be used.', + env: 'LISK_ENABLE_CONNECTOR_PLUGIN', + default: false, + }), }; public async getApplication(config: PartialApplicationConfig): Promise { @@ -126,6 +133,9 @@ export class StartCommand extends BaseStartCommand { if (flags['enable-dashboard-plugin']) { app.registerPlugin(new DashboardPlugin(), { loadAsChildProcess: true }); } + if (flags['enable-chain-connector-plugin']) { + app.registerPlugin(new ChainConnectorPlugin(), { loadAsChildProcess: true }); + } return app; }