(feat) Add ability to disable plugins and show bundled plugins (#337)

This commit is contained in:
Gregory Schier authored and GitHub committed 2026-01-01 09:32:48 -08:00
1 parent 07ea1ea7dc
commit 92a8da03af
41 files changed
+515 -1183

No files matched your search

+9 -4
View File
@@ -5,10 +5,15 @@ export function migrateTemplateFunctionSelectOptions(
): TemplateFunctionPlugin {
const migratedArgs = f.args.map((a) => {
if (a.type === 'select') {
a.options = a.options.map((o) => ({
...o,
label: o.label || (o as any).name,
}));
// Migrate old options that had 'name' instead of 'label'
type LegacyOption = { label?: string; value: string; name?: string };
a.options = a.options.map((o) => {
const legacy = o as LegacyOption;
return {
label: legacy.label ?? legacy.name ?? '',
value: legacy.value,
};
});
}
return a;
});