This commit is contained in:
Gregory Schier authored and GitHub committed 2025-01-26 13:13:45 -08:00
1 parent 82b1ad35ff
commit f678593903
99 files changed
+3492 -1583

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import {HttpRequestAction, TemplateFunction} from '@yaakapp/api';
export function migrateTemplateFunctionSelectOptions(f: TemplateFunction): TemplateFunction {
const migratedArgs = f.args.map((a) => {
if (a.type === 'select') {
a.options = a.options.map((o) => ({
...o,
label: o.label || (o as any).name,
}));
}
return a;
});
return {
...f,
args: migratedArgs,
};
}
export function migrateHttpRequestActionKey(a: HttpRequestAction): HttpRequestAction {
return {
...a,
name: a.name || (a as any).key,
}
}