chore: fix up the api-reports

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-12-10 12:29:42 +01:00
parent 184161fe57
commit 3562d2b111
5 changed files with 80 additions and 39 deletions
@@ -50,5 +50,17 @@ export const useCustomFieldExtensions = <
}),
);
return [...blueprintFields, ...outletFields];
// This should really be a different type moving foward, but we do this to keep type compatibility.
// should probably also move the defaults into the API eventually too, but that will come with the move
// to the new frontend system.
const blueprintsToLegacy: FieldExtensionOptions[] = blueprintFields?.map(
field => ({
component: field.component,
name: field.name,
validation: field.validation,
schema: field.schema?.schema,
}),
);
return [...blueprintsToLegacy, ...outletFields];
};
@@ -40,6 +40,7 @@ class DefaultScaffolderFormFieldsApi implements ScaffolderFormFieldsApi {
}
}
/** @alpha */
export const formFieldsApi = ApiBlueprint.makeWithOverrides({
name: 'form-fields',
inputs: {