Skip to content

Conversation

@pyramation
Copy link
Contributor

No description provided.

Adds a new 'optionsFrom' property to questions that allows resolving
options dynamically from a resolver, similar to how 'defaultFrom' and
'setFrom' work for default values.

This enables boilerplate templates to use dynamic option lists like:
{
  "name": "license",
  "type": "list",
  "optionsFrom": "licenses"
}

The resolver should return an array of strings or OptionValue objects.

Co-Authored-By: Dan Lynch <[email protected]>
Registers a 'licenses' resolver that returns the list of supported
licenses from listSupportedLicenses(). This allows boilerplate templates
to use 'optionsFrom: licenses' to dynamically populate license options.

Also updates the test mock to include registerDefaultResolver.

Co-Authored-By: Dan Lynch <[email protected]>
@pyramation pyramation merged commit a91d4c9 into main Dec 21, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants