File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed
src/lib/command-framework/help Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ import { ActorsCallCommand } from '../src/commands/actors/call' ;
2+ import { TopLevelCallCommand } from '../src/commands/call' ;
3+ import { LoginCommand } from '../src/commands/login' ;
4+ import { LogoutCommand } from '../src/commands/logout' ;
5+ import type { BuiltApifyCommand } from '../src/lib/command-framework/apify-command' ;
6+ import type { BaseCommandRenderer } from '../src/lib/command-framework/help/_BaseCommandRenderer' ;
7+
8+ interface CommandsInCategory extends Partial < Parameters < BaseCommandRenderer [ 'selectiveRender' ] > [ 0 ] > {
9+ command : typeof BuiltApifyCommand ;
10+ aliases ?: ( typeof BuiltApifyCommand ) [ ] ;
11+ }
12+
13+ const Commands = {
14+ call : TopLevelCallCommand ,
15+ login : LoginCommand ,
16+ logout : LogoutCommand ,
17+ actorsCall : ActorsCallCommand ,
18+ } ;
19+
20+ // render description in code block, then usage, no short description after command header
21+
22+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
23+ const categories : Record < string , CommandsInCategory [ ] > = {
24+ 'auth-commands' : [
25+ //
26+ { command : Commands . login } ,
27+ { command : Commands . logout } ,
28+ { command : Commands . actorsCall , aliases : [ Commands . call ] } ,
29+ ] ,
30+ 'actor-commands' : [
31+ //
32+ { command : Commands . call , aliases : [ Commands . call ] } ,
33+ ] ,
34+ 'general-commands' : [
35+ //
36+ ] ,
37+ 'dataset-commands' : [
38+ //
39+ ] ,
40+ 'key-value-store-commands' : [
41+ //
42+ ] ,
43+ } ;
Original file line number Diff line number Diff line change @@ -34,6 +34,14 @@ DESCRIPTION
3434GLOBAL FLAGS
3535 --json Format output as json.
3636
37+ USAGE
38+ $ apify login [-t <value>] [-m console|manual]
39+
40+ FLAGS
41+ -m, --method=<option> [Optional] Method of logging in to Apify
42+ <options: console|manual>
43+ -t, --token=<value> [Optional] Apify API token
44+
3745 */
3846
3947export class CommandHelp extends BaseCommandRenderer {
You can’t perform that action at this time.
0 commit comments