Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# @sanity/codegen

Codegen toolkit for Sanity.io, used to generate Typescript types for a Sanity Schema & GROQ queries. This package is currently in an experimental state, and subject to change.
Codegen toolkit for Sanity.io, used to generate Typescript types for a Sanity Schema & GROQ queries.
2 changes: 1 addition & 1 deletion oclif.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
plugins: ['@oclif/plugin-help'],
topics: {
typegen: {
description: 'Beta: Generate TypeScript types for schema and GROQ',
description: 'Generate TypeScript types for schema and GROQ',
},
},
topicSeparator: ' ',
Expand Down
9 changes: 2 additions & 7 deletions src/commands/typegen/__tests__/generate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('#typegen:generate', () => {
const {stdout} = await runCommand('typegen generate --help')

expect(stdout).toMatchInlineSnapshot(`
"Sanity TypeGen (Beta)
"Sanity TypeGen

USAGE
$ sanity typegen generate [--config-path <value>] [--watch]
Expand All @@ -42,9 +42,7 @@ describe('#typegen:generate', () => {
--watch [Default: false] Run the typegen in watch mode

DESCRIPTION
Sanity TypeGen (Beta)
This command is currently in beta and may undergo significant changes.
Feedback is welcome!
Sanity TypeGen

Configuration:
This command can utilize configuration settings defined in a
Expand All @@ -71,9 +69,6 @@ describe('#typegen:generate', () => {
- The \`sanity schema extract\` command is a prerequisite for extracting your
Sanity Studio schema into a \`schema.json\` file, which is then used by the
\`sanity typegen generate\` command to generate type definitions.
- While this tool is in beta, we encourage you to experiment with these
configurations and provide feedback to help improve its functionality and
usability.

EXAMPLES
Generate TypeScript type definitions from a Sanity Studio schema extracted
Expand Down
6 changes: 2 additions & 4 deletions src/commands/typegen/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import {TypegenWatchModeTrace, TypesGeneratedTrace} from '../../typegen.telemetr
import {debug} from '../../utils/debug.js'
import {promiseWithResolvers} from '../../utils/promiseWithResolvers.js'

const description = `Sanity TypeGen (Beta)
This command is currently in beta and may undergo significant changes. Feedback is welcome!
const description = `Sanity TypeGen

${styleText('bold', 'Configuration:')}
This command can utilize configuration settings defined in a \`sanity-typegen.json\` file. These settings include:
Expand All @@ -31,8 +30,7 @@ This command can utilize configuration settings defined in a \`sanity-typegen.js
The default configuration values listed above are used if not overridden in your \`sanity-typegen.json\` configuration file. To customize the behavior of the type generation, adjust these properties in the configuration file according to your project's needs.

${styleText('bold', 'Note:')}
- The \`sanity schema extract\` command is a prerequisite for extracting your Sanity Studio schema into a \`schema.json\` file, which is then used by the \`sanity typegen generate\` command to generate type definitions.
- While this tool is in beta, we encourage you to experiment with these configurations and provide feedback to help improve its functionality and usability.`.trim()
- The \`sanity schema extract\` command is a prerequisite for extracting your Sanity Studio schema into a \`schema.json\` file, which is then used by the \`sanity typegen generate\` command to generate type definitions.`.trim()

/**
* @internal
Expand Down