diff --git a/cli/src/datafeed.ts b/cli/src/datafeed.ts index 9f3f34e9f..d35975502 100644 --- a/cli/src/datafeed.ts +++ b/cli/src/datafeed.ts @@ -1,4 +1,4 @@ -import { command, option, string as cmdstring } from 'cmd-ts' +import { command, option, string as cmdstring, subcommands } from 'cmd-ts' import { insertHandler as adapterInsertHandler } from './adapter' import { insertHandler as aggregatorInsertHandler } from './aggregator' import { ReadFile } from './cli-types' @@ -36,7 +36,7 @@ export function datafeedSub() { // datafeed bulk-insert --source ${source} // datafeed bulk-activate --source ${source} - const bulkInsert = command({ + const insert = command({ name: 'bulk-insert', args: { data: option({ @@ -51,7 +51,7 @@ export function datafeedSub() { handler: bulkInsertHandler() }) - const bulkActivate = command({ + const activate = command({ name: 'bulk-activate', args: { data: option({ @@ -65,6 +65,11 @@ export function datafeedSub() { }, handler: bulkActivateHandler() }) + + return subcommands({ + name: 'adapter', + cmds: { insert, activate } + }) } export function bulkInsertHandler() { diff --git a/cli/src/index.ts b/cli/src/index.ts index aa3d20aa1..9ec059e94 100644 --- a/cli/src/index.ts +++ b/cli/src/index.ts @@ -4,6 +4,7 @@ import { binary, command, run, subcommands } from 'cmd-ts' import { adapterSub } from './adapter' import { aggregatorSub } from './aggregator' import { chainSub } from './chain' +import { datafeedSub } from './datafeed' import { delegatorSub } from './delegator' import { fetcherSub } from './fetcher' import { listenerSub } from './listener' @@ -23,6 +24,7 @@ async function main() { const reporter = reporterSub() const delegator = delegatorSub() const proxy = proxySub() + const datafeed = datafeedSub() const version = command({ name: 'version', @@ -45,7 +47,8 @@ async function main() { reporter, version, delegator, - proxy + proxy, + datafeed } })