From 8656f794f8f3261777cd3407258133c808336753 Mon Sep 17 00:00:00 2001 From: liang liang Date: Tue, 10 Jan 2023 14:05:11 -0500 Subject: [PATCH] expand documention on handling --help --- packages/core/cli.js | 2 ++ packages/dashboard/src/contexts/DashContext/state.ts | 1 + packages/dashboard/src/contexts/DashContext/types/Action.ts | 2 ++ 3 files changed, 5 insertions(+) diff --git a/packages/core/cli.js b/packages/core/cli.js index 31f1dd14c96..04ef1a791e1 100755 --- a/packages/core/cli.js +++ b/packages/core/cli.js @@ -69,7 +69,9 @@ if ( const helpIndex = inputStrings.indexOf("--help"); if (helpIndex !== -1) { + //remove `--help` from array inputStrings.splice(helpIndex, 1); + //insert `help` in first position inputStrings.unshift("help"); } } diff --git a/packages/dashboard/src/contexts/DashContext/state.ts b/packages/dashboard/src/contexts/DashContext/state.ts index a806c55dbee..e1234cb7626 100644 --- a/packages/dashboard/src/contexts/DashContext/state.ts +++ b/packages/dashboard/src/contexts/DashContext/state.ts @@ -49,6 +49,7 @@ export const initialState: State = { } }; +//To-do: set-analytics in reducer export const reducer = (state: State, action: Action): State => { const { type, data } = action; switch (type) { diff --git a/packages/dashboard/src/contexts/DashContext/types/Action.ts b/packages/dashboard/src/contexts/DashContext/types/Action.ts index 5bece0bccd7..a0bc03abc84 100644 --- a/packages/dashboard/src/contexts/DashContext/types/Action.ts +++ b/packages/dashboard/src/contexts/DashContext/types/Action.ts @@ -2,6 +2,8 @@ import type { ReceivedMessageLifecycle } from "@truffle/dashboard-message-bus-cl import type { Message } from "@truffle/dashboard-message-bus-common"; import type { State } from "src/contexts/DashContext/types"; +//To-do: add set-analytics ActionType +//To-do: add interface for SetAnalyticAction export type ActionType = | "set-decoder" | "set-chain-info"