Skip to content

Feat/options from#28

Merged
pyramation merged 2 commits intomainfrom
feat/options-from
Dec 21, 2025
Merged

Feat/options from#28
pyramation merged 2 commits intomainfrom
feat/options-from

Conversation

@pyramation
Copy link
Copy Markdown
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 <pyramation@gmail.com>
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 <pyramation@gmail.com>
@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.

1 participant