diff --git a/README.md b/README.md index 05bc1d4..f400400 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/oclif.config.js b/oclif.config.js index 56aaa47..d307194 100644 --- a/oclif.config.js +++ b/oclif.config.js @@ -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: ' ', diff --git a/src/commands/typegen/__tests__/generate.test.ts b/src/commands/typegen/__tests__/generate.test.ts index 4c56344..5117355 100644 --- a/src/commands/typegen/__tests__/generate.test.ts +++ b/src/commands/typegen/__tests__/generate.test.ts @@ -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 ] [--watch] @@ -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 @@ -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 diff --git a/src/commands/typegen/generate.ts b/src/commands/typegen/generate.ts index 1521b53..991d1f6 100644 --- a/src/commands/typegen/generate.ts +++ b/src/commands/typegen/generate.ts @@ -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: @@ -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