@@ -2,6 +2,7 @@ import { Command } from "cliffy/command/mod.ts";
2
2
import { quartoConfig } from "../../core/quarto.ts" ;
3
3
import { commands } from "../command.ts" ;
4
4
import { buildJsCommand } from "./build-artifacts/cmd.ts" ;
5
+ import { hidden } from "../../core/lib/external/colors.ts" ;
5
6
6
7
type CommandOptionInfo = {
7
8
name : string ;
@@ -13,6 +14,7 @@ type CommandOptionInfo = {
13
14
} ;
14
15
15
16
type CommandInfo = {
17
+ hidden : boolean ;
16
18
name : string ;
17
19
description : string ;
18
20
options : CommandOptionInfo [ ] ;
@@ -33,10 +35,19 @@ const generateCliInfoCommand = new Command()
33
35
output [ "version" ] = quartoConfig . version ( ) ;
34
36
const commandsInfo : CommandInfo [ ] = [ ] ;
35
37
output [ "commands" ] = commandsInfo ;
38
+
39
+ // Cliffy doesn't export the "hidden" property, so we maintain our own list
40
+ // here
41
+ const hiddenCommands = [
42
+ "dev-call" ,
43
+ "editor-support" ,
44
+ "create-project" ,
45
+ ] ;
36
46
// deno-lint-ignore no-explicit-any
37
47
const cmdAsJson = ( cmd : any ) : CommandInfo => {
38
48
return {
39
49
name : cmd . getName ( ) ,
50
+ hidden : hiddenCommands . includes ( cmd . getName ( ) ) ,
40
51
description : cmd . getDescription ( ) ,
41
52
options : cmd . getOptions ( ) ,
42
53
usage : cmd . getUsage ( ) ,
@@ -50,6 +61,7 @@ const generateCliInfoCommand = new Command()
50
61
51
62
export const devCallCommand = new Command ( )
52
63
. name ( "dev-call" )
64
+ . hidden ( )
53
65
. description (
54
66
"Access internals of Quarto - this command is not intended for general use." ,
55
67
)
0 commit comments