Skip to content

Commit 68ea0b2

Browse files
committed
expose hidden field to cli-info json object
1 parent b589111 commit 68ea0b2

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/command/dev-call/build-artifacts/cmd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export async function buildAssets() {
157157
}
158158

159159
export const buildJsCommand = new Command()
160-
.name("build-js")
160+
.name("build-artifacts")
161161
.hidden()
162162
.description(
163163
"Builds all the javascript assets necessary for IDE support.\n\n",

src/command/dev-call/cmd.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Command } from "cliffy/command/mod.ts";
22
import { quartoConfig } from "../../core/quarto.ts";
33
import { commands } from "../command.ts";
44
import { buildJsCommand } from "./build-artifacts/cmd.ts";
5+
import { hidden } from "../../core/lib/external/colors.ts";
56

67
type CommandOptionInfo = {
78
name: string;
@@ -13,6 +14,7 @@ type CommandOptionInfo = {
1314
};
1415

1516
type CommandInfo = {
17+
hidden: boolean;
1618
name: string;
1719
description: string;
1820
options: CommandOptionInfo[];
@@ -33,10 +35,19 @@ const generateCliInfoCommand = new Command()
3335
output["version"] = quartoConfig.version();
3436
const commandsInfo: CommandInfo[] = [];
3537
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+
];
3646
// deno-lint-ignore no-explicit-any
3747
const cmdAsJson = (cmd: any): CommandInfo => {
3848
return {
3949
name: cmd.getName(),
50+
hidden: hiddenCommands.includes(cmd.getName()),
4051
description: cmd.getDescription(),
4152
options: cmd.getOptions(),
4253
usage: cmd.getUsage(),

0 commit comments

Comments
 (0)