chore(scaffolder): clean up api report from schemas and validators

Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
This commit is contained in:
Hellgren Heikki
2025-09-24 10:43:15 +03:00
parent 48d409f4ab
commit 4ee97cf3ab
31 changed files with 77 additions and 131 deletions
+3 -3
View File
@@ -522,10 +522,10 @@ export const scaffolderTranslationRef: TranslationRef<
readonly 'ongoingTask.title': 'Run of';
readonly 'ongoingTask.contextMenu.cancel': 'Cancel';
readonly 'ongoingTask.contextMenu.startOver': 'Start Over';
readonly 'ongoingTask.contextMenu.retry': 'Retry';
readonly 'ongoingTask.contextMenu.hideLogs': 'Hide Logs';
readonly 'ongoingTask.contextMenu.showLogs': 'Show Logs';
readonly 'ongoingTask.contextMenu.hideButtonBar': 'Hide Button Bar';
readonly 'ongoingTask.contextMenu.retry': 'Retry';
readonly 'ongoingTask.contextMenu.showButtonBar': 'Show Button Bar';
readonly 'ongoingTask.subtitle': 'Task {{taskId}}';
readonly 'ongoingTask.pageTitle.hasTemplateName': 'Run of {{templateName}}';
@@ -608,8 +608,8 @@ export const scaffolderTranslationRef: TranslationRef<
readonly 'templateListPage.pageTitle': 'Create a new component';
readonly 'templateListPage.templateGroups.defaultTitle': 'Templates';
readonly 'templateListPage.templateGroups.otherTitle': 'Other Templates';
readonly 'templateListPage.contentHeader.registerExistingButtonTitle': 'Register Existing Component';
readonly 'templateListPage.contentHeader.supportButtonTitle': 'Create new software components using standard templates. Different templates create different kinds of components (services, websites, documentation, ...).';
readonly 'templateListPage.contentHeader.registerExistingButtonTitle': 'Register Existing Component';
readonly 'templateListPage.additionalLinksForEntity.viewTechDocsTitle': 'View TechDocs';
readonly 'templateWizardPage.title': 'Create a new component';
readonly 'templateWizardPage.subtitle': 'Create new software components using standard templates in your organization';
@@ -622,8 +622,8 @@ export const scaffolderTranslationRef: TranslationRef<
readonly 'templateEditorToolbar.addToCatalogDialogTitle': 'Publish changes';
readonly 'templateEditorToolbar.addToCatalogDialogContent.stepsIntroduction': 'Follow the instructions below to create or update a template:';
readonly 'templateEditorToolbar.addToCatalogDialogContent.stepsListItems': 'Save the template files in a local directory\nCreate a pull request to a new or existing git repository\nIf the template already exists, the changes will be reflected in the software catalog once the pull request gets merged\nBut if you are creating a new template, follow the documentation linked below to register the new template repository in software catalog';
readonly 'templateEditorToolbar.addToCatalogDialogActions.documentationButton': 'Go to the documentation';
readonly 'templateEditorToolbar.addToCatalogDialogActions.documentationUrl': 'https://backstage.io/docs/features/software-templates/adding-templates/';
readonly 'templateEditorToolbar.addToCatalogDialogActions.documentationButton': 'Go to the documentation';
readonly 'templateEditorToolbarFileMenu.button': 'File';
readonly 'templateEditorToolbarFileMenu.options.openDirectory': 'Open template directory';
readonly 'templateEditorToolbarFileMenu.options.createDirectory': 'Create template directory';
+5 -74
View File
@@ -70,15 +70,6 @@ export const EntityNamePickerFieldExtension: FieldExtensionComponent_2<
any
>;
// @public (undocumented)
export const EntityNamePickerFieldSchema: FieldSchema_2<string, any>;
// @public (undocumented)
export const entityNamePickerValidation: (
value: string,
validation: FieldValidation,
) => void;
// @public
export const EntityPickerFieldExtension: FieldExtensionComponent_2<
string,
@@ -237,39 +228,6 @@ export const MultiEntityPickerFieldExtension: FieldExtensionComponent_2<
}
>;
// @public (undocumented)
export const MultiEntityPickerFieldSchema: FieldSchema_2<
string[],
{
defaultKind?: string | undefined;
defaultNamespace?: string | false | undefined;
catalogFilter?:
| Record<
string,
| string
| string[]
| {
exists?: boolean | undefined;
}
>
| Record<
string,
| string
| string[]
| {
exists?: boolean | undefined;
}
>[]
| undefined;
allowArbitraryValues?: boolean | undefined;
}
>;
// @public
export type MultiEntityPickerUiOptions = NonNullable<
(typeof MultiEntityPickerFieldSchema.TProps.uiSchema)['ui:options']
>;
// @public
export const MyGroupsPickerFieldExtension: FieldExtensionComponent_2<
string,
@@ -422,9 +380,9 @@ export const RepoBranchPickerFieldExtension: FieldExtensionComponent_2<
| {
azure?: string[] | undefined;
github?: string[] | undefined;
gitlab?: string[] | undefined;
bitbucket?: string[] | undefined;
gerrit?: string[] | undefined;
gitlab?: string[] | undefined;
gitea?: string[] | undefined;
}
| undefined;
@@ -433,33 +391,6 @@ export const RepoBranchPickerFieldExtension: FieldExtensionComponent_2<
}
>;
// @public (undocumented)
export const RepoBranchPickerFieldSchema: FieldSchema_2<
string,
{
requestUserCredentials?:
| {
secretsKey: string;
additionalScopes?:
| {
azure?: string[] | undefined;
github?: string[] | undefined;
bitbucket?: string[] | undefined;
gerrit?: string[] | undefined;
gitlab?: string[] | undefined;
gitea?: string[] | undefined;
}
| undefined;
}
| undefined;
}
>;
// @public
export type RepoBranchPickerUiOptions = NonNullable<
(typeof RepoBranchPickerFieldSchema.TProps.uiSchema)['ui:options']
>;
// @public
export const repoPickerValidation: (
value: string,
@@ -473,11 +404,11 @@ export const repoPickerValidation: (
export const RepoUrlPickerFieldExtension: FieldExtensionComponent_2<
string,
{
allowedHosts?: string[] | undefined;
allowedOrganizations?: string[] | undefined;
allowedOwners?: string[] | undefined;
allowedProjects?: string[] | undefined;
allowedRepos?: string[] | undefined;
allowedHosts?: string[] | undefined;
requestUserCredentials?:
| {
secretsKey: string;
@@ -485,9 +416,9 @@ export const RepoUrlPickerFieldExtension: FieldExtensionComponent_2<
| {
azure?: string[] | undefined;
github?: string[] | undefined;
gitlab?: string[] | undefined;
bitbucket?: string[] | undefined;
gerrit?: string[] | undefined;
gitlab?: string[] | undefined;
gitea?: string[] | undefined;
}
| undefined;
@@ -500,11 +431,11 @@ export const RepoUrlPickerFieldExtension: FieldExtensionComponent_2<
export const RepoUrlPickerFieldSchema: FieldSchema_2<
string,
{
allowedHosts?: string[] | undefined;
allowedOrganizations?: string[] | undefined;
allowedOwners?: string[] | undefined;
allowedProjects?: string[] | undefined;
allowedRepos?: string[] | undefined;
allowedHosts?: string[] | undefined;
requestUserCredentials?:
| {
secretsKey: string;
@@ -512,9 +443,9 @@ export const RepoUrlPickerFieldSchema: FieldSchema_2<
| {
azure?: string[] | undefined;
github?: string[] | undefined;
gitlab?: string[] | undefined;
bitbucket?: string[] | undefined;
gerrit?: string[] | undefined;
gitlab?: string[] | undefined;
gitea?: string[] | undefined;
}
| undefined;
@@ -14,11 +14,11 @@
* limitations under the License.
*/
import { createFormField } from '@backstage/plugin-scaffolder-react/alpha';
import { EntityNamePicker as Component } from '../../components/fields/EntityNamePicker/EntityNamePicker';
import {
EntityNamePicker as Component,
EntityNamePickerFieldSchema,
entityNamePickerValidation,
} from '../../components';
} from '../../components/fields/EntityNamePicker';
export const EntityNamePicker = createFormField({
component: Component,
@@ -14,8 +14,10 @@
* limitations under the License.
*/
import { createFormField } from '@backstage/plugin-scaffolder-react/alpha';
import { EntityPicker as Component } from '../../components/fields/EntityPicker/EntityPicker';
import { EntityPickerFieldSchema } from '../../components';
import {
EntityPicker as Component,
EntityPickerFieldSchema,
} from '../../components/fields/EntityPicker';
export const EntityPicker = createFormField({
component: Component,
@@ -14,8 +14,10 @@
* limitations under the License.
*/
import { createFormField } from '@backstage/plugin-scaffolder-react/alpha';
import { EntityTagsPicker as Component } from '../../components/fields/EntityTagsPicker/EntityTagsPicker';
import { EntityTagsPickerFieldSchema } from '../../components';
import {
EntityTagsPicker as Component,
EntityTagsPickerFieldSchema,
} from '../../components/fields/EntityTagsPicker';
export const EntityTagsPicker = createFormField({
component: Component,
@@ -14,8 +14,10 @@
* limitations under the License.
*/
import { createFormField } from '@backstage/plugin-scaffolder-react/alpha';
import { MultiEntityPicker as Component } from '../../components/fields/MultiEntityPicker/MultiEntityPicker';
import { MultiEntityPickerFieldSchema } from '../../components';
import {
MultiEntityPicker as Component,
MultiEntityPickerFieldSchema,
} from '../../components/fields/MultiEntityPicker';
export const MultiEntityPicker = createFormField({
component: Component,
@@ -14,8 +14,10 @@
* limitations under the License.
*/
import { createFormField } from '@backstage/plugin-scaffolder-react/alpha';
import { MyGroupsPicker as Component } from '../../components/fields/MyGroupsPicker/MyGroupsPicker';
import { MyGroupsPickerFieldSchema } from '../../components';
import {
MyGroupsPicker as Component,
MyGroupsPickerFieldSchema,
} from '../../components/fields/MyGroupsPicker';
export const MyGroupsPicker = createFormField({
component: Component,
@@ -14,8 +14,10 @@
* limitations under the License.
*/
import { createFormField } from '@backstage/plugin-scaffolder-react/alpha';
import { OwnedEntityPicker as Component } from '../../components/fields/OwnedEntityPicker/OwnedEntityPicker';
import { OwnedEntityPickerFieldSchema } from '../../components';
import {
OwnedEntityPicker as Component,
OwnedEntityPickerFieldSchema,
} from '../../components/fields/OwnedEntityPicker';
export const OwnedEntityPicker = createFormField({
component: Component,
@@ -14,8 +14,10 @@
* limitations under the License.
*/
import { createFormField } from '@backstage/plugin-scaffolder-react/alpha';
import { OwnerPicker as Component } from '../../components/fields/OwnerPicker/OwnerPicker';
import { OwnerPickerFieldSchema } from '../../components';
import {
OwnerPicker as Component,
OwnerPickerFieldSchema,
} from '../../components/fields/OwnerPicker';
export const OwnerPicker = createFormField({
component: Component,
@@ -14,8 +14,10 @@
* limitations under the License.
*/
import { createFormField } from '@backstage/plugin-scaffolder-react/alpha';
import { RepoBranchPicker as Component } from '../../components/fields/RepoBranchPicker/RepoBranchPicker';
import { RepoBranchPickerFieldSchema } from '../../components';
import {
RepoBranchPicker as Component,
RepoBranchPickerFieldSchema,
} from '../../components/fields/RepoBranchPicker';
export const RepoBranchPicker = createFormField({
component: Component,
@@ -14,11 +14,11 @@
* limitations under the License.
*/
import { createFormField } from '@backstage/plugin-scaffolder-react/alpha';
import { RepoUrlPicker as Component } from '../../components/fields/RepoUrlPicker/RepoUrlPicker';
import {
repoPickerValidation,
RepoUrlPicker as Component,
RepoUrlPickerFieldSchema,
} from '../../components';
} from '../../components/fields/RepoUrlPicker';
export const RepoUrlPicker = createFormField({
component: Component,
@@ -13,5 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { EntityNamePicker } from './EntityNamePicker';
export { entityNamePickerValidation } from './validation';
export { EntityNamePickerFieldSchema } from './schema';
@@ -15,9 +15,6 @@
*/
import { makeFieldSchema } from '@backstage/plugin-scaffolder-react';
/**
* @public
*/
export const EntityNamePickerFieldSchema = makeFieldSchema({
output: z => z.string(),
});
@@ -17,9 +17,6 @@
import { FieldValidation } from '@rjsf/utils';
import { KubernetesValidatorFunctions } from '@backstage/catalog-model';
/**
* @public
*/
export const entityNamePickerValidation = (
value: string,
validation: FieldValidation,
@@ -13,4 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { EntityPicker } from './EntityPicker';
export { EntityPickerFieldSchema, type EntityPickerUiOptions } from './schema';
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { EntityTagsPicker } from './EntityTagsPicker';
export {
EntityTagsPickerFieldSchema,
type EntityTagsPickerUiOptions,
@@ -46,7 +46,6 @@ export type EntityTagsPickerProps = typeof EntityTagsPickerFieldSchema.TProps;
/**
* The input props that can be specified under `ui:options` for the
* `EntityTagsPicker` field extension.
*
* @public
*/
export type EntityTagsPickerUiOptions = NonNullable<
@@ -14,6 +14,7 @@
* limitations under the License.
*/
export { MultiEntityPicker } from './MultiEntityPicker';
export {
MultiEntityPickerFieldSchema,
type MultiEntityPickerUiOptions,
@@ -16,9 +16,6 @@
import { z as zod } from 'zod';
import { makeFieldSchema } from '@backstage/plugin-scaffolder-react';
/**
* @public
*/
export const entityQueryFilterExpressionSchema = zod.record(
zod
.string()
@@ -26,9 +23,6 @@ export const entityQueryFilterExpressionSchema = zod.record(
.or(zod.array(zod.string())),
);
/**
* @public
*/
export const MultiEntityPickerFieldSchema = makeFieldSchema({
output: z => z.array(z.string()),
uiOptions: z =>
@@ -60,7 +54,6 @@ export const MultiEntityPickerFieldSchema = makeFieldSchema({
/**
* The input props that can be specified under `ui:options` for the
* `EntityPicker` field extension.
* @public
*/
export type MultiEntityPickerUiOptions = NonNullable<
(typeof MultiEntityPickerFieldSchema.TProps.uiSchema)['ui:options']
@@ -14,6 +14,7 @@
* limitations under the License.
*/
export { MyGroupsPicker } from './MyGroupsPicker';
export {
MyGroupsPickerSchema,
type MyGroupsPickerUiOptions,
@@ -36,7 +36,6 @@ export type MyGroupsPickerUiOptions = NonNullable<
/**
* Props for the MyGroupsPicker.
* @public
*/
export type MyGroupsPickerProps = typeof MyGroupsPickerFieldSchema.TProps;
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { OwnedEntityPicker } from './OwnedEntityPicker';
export {
OwnedEntityPickerFieldSchema,
type OwnedEntityPickerUiOptions,
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { EntityPickerFieldSchema } from '../EntityPicker/schema';
import { EntityPickerFieldSchema } from '../EntityPicker';
/**
* @public
@@ -23,7 +23,6 @@ export const OwnedEntityPickerFieldSchema = EntityPickerFieldSchema;
/**
* The input props that can be specified under `ui:options` for the
* `OwnedEntityPicker` field extension.
*
* @public
*/
export type OwnedEntityPickerUiOptions = NonNullable<
@@ -13,4 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { OwnerPicker } from './OwnerPicker';
export { OwnerPickerFieldSchema, type OwnerPickerUiOptions } from './schema';
@@ -54,7 +54,6 @@ export const OwnerPickerFieldSchema = makeFieldSchema({
/**
* The input props that can be specified under `ui:options` for the
* `OwnerPicker` field extension.
*
* @public
*/
export type OwnerPickerUiOptions = NonNullable<
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { RepoBranchPicker } from './RepoBranchPicker';
export {
RepoBranchPickerFieldSchema,
type RepoBranchPickerUiOptions,
@@ -15,9 +15,6 @@
*/
import { makeFieldSchema } from '@backstage/plugin-scaffolder-react';
/**
* @public
*/
export const RepoBranchPickerFieldSchema = makeFieldSchema({
output: z => z.string(),
uiOptions: z =>
@@ -69,8 +66,6 @@ export const RepoBranchPickerFieldSchema = makeFieldSchema({
/**
* The input props that can be specified under `ui:options` for the
* `RepoBranchPicker` field extension.
*
* @public
*/
export type RepoBranchPickerUiOptions = NonNullable<
(typeof RepoBranchPickerFieldSchema.TProps.uiSchema)['ui:options']
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { RepoUrlPicker } from './RepoUrlPicker';
export {
RepoUrlPickerFieldSchema,
type RepoUrlPickerUiOptions,
@@ -22,7 +22,6 @@ import { scmIntegrationsApiRef } from '@backstage/integration-react';
* The validation function for the `repoUrl` that is returned from the
* field extension. Ensures that you have all the required fields filled for
* the different providers that exist.
*
* @public
*/
export const repoPickerValidation = (
@@ -13,14 +13,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './EntityPicker';
export * from './EntityNamePicker';
export * from './OwnerPicker';
export * from './RepoUrlPicker';
export * from './OwnedEntityPicker';
export * from './EntityTagsPicker';
export * from './RepoBranchPicker';
export * from './MultiEntityPicker';
export * from './MyGroupsPicker';
export { type FieldSchema, makeFieldSchemaFromZod } from './utils';
+27 -1
View File
@@ -14,7 +14,33 @@
* limitations under the License.
*/
export * from './fields';
export type { RepoUrlPickerUiOptions } from './fields';
export {
EntityPickerFieldSchema,
type EntityPickerUiOptions,
} from './fields/EntityPicker';
export {
EntityTagsPickerFieldSchema,
type EntityTagsPickerUiOptions,
} from './fields/EntityTagsPicker';
export {
MyGroupsPickerFieldSchema,
MyGroupsPickerSchema,
type MyGroupsPickerUiOptions,
} from './fields/MyGroupsPicker';
export {
OwnedEntityPickerFieldSchema,
type OwnedEntityPickerUiOptions,
} from './fields/OwnedEntityPicker';
export {
OwnerPickerFieldSchema,
type OwnerPickerUiOptions,
} from './fields/OwnerPicker';
export {
repoPickerValidation,
RepoUrlPickerFieldSchema,
type RepoUrlPickerUiOptions,
} from './fields/RepoUrlPicker';
export { TemplateTypePicker } from './TemplateTypePicker';