feat(codegen): emit skipPrompt: true for fields with backend-managed defaults#784
Merged
pyramation merged 3 commits intomainfrom Mar 5, 2026
Merged
Conversation
…defaults When generating CLI commands, fields detected as having backend defaults (via getFieldsWithDefaults) now include skipPrompt: true in their question definition. This tells inquirerer to skip prompting for these fields while still allowing CLI flag overrides and man page documentation. Updated codegen template + regenerated all constructive-cli commands.
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…pt is published The generated CLI code now uses skipPrompt which is not yet in the published inquirerer types (pending dev-utils PR #68). The generate script adds @ts-nocheck to CLI .ts files as a temporary measure. This can be removed once inquirerer is published with skipPrompt support.
inquirerer v4.6.0 now includes skipPrompt support, so the generated CLI code compiles cleanly without @ts-nocheck. Removed the post-generation ts-nocheck step from generate-sdk.ts and regenerated all CLI files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(codegen): emit
skipPrompt: truefor fields with backend-managed defaultsSummary
Updates the CLI codegen template (
table-command-generator.ts) so that question objects for fields with backend-managed defaults includeskipPrompt: true. This tellsinquirererto skip interactive prompting for these fields while still allowing CLI flag overrides (e.g.--fieldName value) and man page documentation.Template change (the only hand-written code): In
buildMutationHandler, fields infieldsWithDefaultsnow get an additionalskipPrompt: trueproperty appended to their question definition. The remaining ~1,480 lines of diff are regenerated CLI command files reflecting this change across 134 files / 4 APIs.Dependency: This relies on
skipPromptsupport in inquirerer (merged and published asinquirerer@4.6.0).Updates since last revision
// @ts-nocheckworkaround —inquirerer@4.6.0is now published with theskipPrompttype, so the generated CLI code compiles cleanly without any type suppressions. The post-processing step ingenerate-sdk.tsthat injected// @ts-nocheckhas been removed entirely.inquirererto^4.6.0insdk/constructive-cli/package.json.@ts-nocheck,@ts-ignore, oras anycasts.Review & Testing Checklist for Human
fieldsWithDefaultsaccuracy — Spot-check a few generated files (e.g.invite.ts,view.ts,app-membership.ts) to confirm the right fields gotskipPrompt: trueand required fields (those without defaults) did NOT. The correctness of which fields are skipped depends entirely ongetFieldsWithDefaults().handleCreateandhandleUpdateemitskipPrompt: truefor defaulted fields. For updates, all fields are alreadyrequired: false, soskipPromptmeans they won't appear in the interactive prompt at all. Confirm this is the desired UX for updates.csdkinteractively against a table with defaulted fields (e.g.invite create) to verify that defaulted fields are skipped in the prompt but can still be set via--fieldName value.Notes
pnpm-lock.yamldiff is large due to lockfile formatting changes — the only meaningful dependency change isinquirerer^4.5.2→^4.6.0.