From f795c07c3027a0d850de6c7e77778fd3bc001cf1 Mon Sep 17 00:00:00 2001 From: Sindre Gulseth Date: Tue, 26 Mar 2024 19:54:44 +0100 Subject: [PATCH] fix(typegen): add placeholder group to allow typegen to show in help --- packages/@sanity/cli/src/commands/index.ts | 2 ++ .../@sanity/cli/src/commands/typegen/typegenGroup.ts | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 packages/@sanity/cli/src/commands/typegen/typegenGroup.ts diff --git a/packages/@sanity/cli/src/commands/index.ts b/packages/@sanity/cli/src/commands/index.ts index 39691907a0b..49bbd033c7b 100644 --- a/packages/@sanity/cli/src/commands/index.ts +++ b/packages/@sanity/cli/src/commands/index.ts @@ -15,6 +15,7 @@ import enableTelemetryCommand from './telemetry/enableTelemetryCommand' import telemetryGroup from './telemetry/telemetryGroup' import telemetryStatusCommand from './telemetry/telemetryStatusCommand' import generateTypegenCommand from './typegen/generateTypesCommand' +import typegenGroup from './typegen/typegenGroup' import upgradeCommand from './upgrade/upgradeCommand' import versionsCommand from './versions/versionsCommand' @@ -37,4 +38,5 @@ export const baseCommands: (CliCommandDefinition | CliCommandGroupDefinition)[] enableTelemetryCommand, telemetryStatusCommand, generateTypegenCommand, + typegenGroup, ] diff --git a/packages/@sanity/cli/src/commands/typegen/typegenGroup.ts b/packages/@sanity/cli/src/commands/typegen/typegenGroup.ts new file mode 100644 index 00000000000..a457adb45d1 --- /dev/null +++ b/packages/@sanity/cli/src/commands/typegen/typegenGroup.ts @@ -0,0 +1,10 @@ +import {type CliCommandGroupDefinition} from '../../types' + +const typegenGroup: CliCommandGroupDefinition = { + name: 'typegen', + signature: '[COMMAND]', + isGroupRoot: true, + description: 'Beta: Generate TypeScript types for schema and GROQ', +} + +export default typegenGroup