From e86adc689210c7cabdc73d90306797e71d2d680d Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 7 Sep 2021 12:00:33 +0200 Subject: [PATCH] chore: remove unwanted files Signed-off-by: blam --- .../writing-custom-field-extensions.md | 34 ---------------- .../src/test-integrations.ts | 40 ------------------- 2 files changed, 74 deletions(-) delete mode 100644 docs/features/software-templates/writing-custom-field-extensions.md delete mode 100644 plugins/scaffolder-backend/src/test-integrations.ts diff --git a/docs/features/software-templates/writing-custom-field-extensions.md b/docs/features/software-templates/writing-custom-field-extensions.md deleted file mode 100644 index e32aa4e78d..0000000000 --- a/docs/features/software-templates/writing-custom-field-extensions.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -id: writing-custom-field-extensions -title: Writing Custom Field Extensions -description: How to write your own field extensions ---- - -Collecting input from the user is a very large part of the scaffolding process -and Software Templates as a whole. Sometimes the built in components and fields -just aren't good enough, and sometimes you want to enrich the form that the -users sees with better inputs that fit better. - -This is where `Custom Field Extensions` come in. - -With them you can show your own `React` Components and use them to control the -state of the JSON schema, as well as provide your own validation functions to -validate the data too. - -## Creating a Field Extension - -Field extensions are a way to combine an ID, a `React` Component and a -`validation` function together in a modular way that you can then use to pass to -the `Scaffolder` frontend plugin in your own `App.tsx`. - -You can create your own Field Extension by using the -`createScaffolderFieldExtension` `API` like below: - -```tsx -//packages/app/scaffolder/MyCustomExtension/MyCustomExtension.tsx -export const MyCustomExtension = () => {}; -``` - -```tsx -// packages/app/scaffolder/MyCustomExtension/validation.ts -``` diff --git a/plugins/scaffolder-backend/src/test-integrations.ts b/plugins/scaffolder-backend/src/test-integrations.ts deleted file mode 100644 index 65d84768aa..0000000000 --- a/plugins/scaffolder-backend/src/test-integrations.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2021 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { - loadBackendConfig, - getRootLogger, - UrlReaders, -} from '@backstage/backend-common'; -// import { ScmIntegrations } from '@backstage/integration'; - -const run = async () => { - const root = getRootLogger(); - const config = await loadBackendConfig({ - argv: process.argv, - logger: root, - }); - - // const integrations = ScmIntegrations.fromConfig(config); - const reader = UrlReaders.default({ logger: root, config }); - - console.log( - await reader.readTree( - 'https://dev.azure.com/backstage-verification/test-template-fetch/_git/test-template-fetch', - ), - ); -}; - -run();