Skip to content

Commit

Permalink
docs: display rcConfig flag on CLI reference page (#7270)
Browse files Browse the repository at this point in the history
* docs: display rcConfig flag on CLI reference page

* Update word list
  • Loading branch information
nflaig authored Dec 3, 2024
1 parent 64eb015 commit 84e0699
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Vitalik
Vitest
Wagyu
api
args
async
backfill
beaconcha
Expand Down Expand Up @@ -244,3 +245,4 @@ xRelayPubKey
xcode
yaml
yamux
yml
8 changes: 7 additions & 1 deletion packages/cli/src/options/globalOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type GlobalSingleArgs = {
paramsFile?: string;
preset: string;
presetFile?: string;
rcConfig?: string;
};

export const defaultNetwork: NetworkName = "mainnet";
Expand Down Expand Up @@ -44,11 +45,16 @@ const globalSingleOptions: CliCommandOptions<GlobalSingleArgs> = {
description: "Preset configuration file to override the active preset with custom values",
type: "string",
},

rcConfig: {
description: "RC file to supplement command line args, accepted formats: .yml, .yaml, .json",
type: "string",
},
};

export const rcConfigOption: [string, string, (configPath: string) => Record<string, unknown>] = [
"rcConfig",
"RC file to supplement command line args, accepted formats: .yml, .yaml, .json",
globalSingleOptions.rcConfig.description as string,
(configPath: string): Record<string, unknown> => readFile(configPath, ["json", "yml", "yaml"]),
];

Expand Down

0 comments on commit 84e0699

Please sign in to comment.