chore(scaffolder): clean up api report from schemas and validators
Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user