From 3c7d087fbca1c4da210d8c364cf7f53c53ecacdc Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 16 Feb 2022 10:30:51 +0100 Subject: [PATCH] chore: adding deprecations for the spec.metadata and spec.baseUrl to the new templateInfo Signed-off-by: blam --- plugins/scaffolder-common/src/TaskSpec.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugins/scaffolder-common/src/TaskSpec.ts b/plugins/scaffolder-common/src/TaskSpec.ts index 1cbe41b28c..0b829ef824 100644 --- a/plugins/scaffolder-common/src/TaskSpec.ts +++ b/plugins/scaffolder-common/src/TaskSpec.ts @@ -21,11 +21,22 @@ import { JsonValue, JsonObject } from '@backstage/types'; * stored in the database. * * @public + * @deprecated */ export type TemplateMetadata = { name: string; }; +/** + * Information about a template that is stored on the scaffolder spec + * + * @public + */ +export type TemplateInfo = { + name: string; + baseUrl?: string; +}; + /** * An individual step of a scaffolder task, as stored in the database. * @@ -64,11 +75,14 @@ export interface TaskSpecV1beta2 { */ export interface TaskSpecV1beta3 { apiVersion: 'scaffolder.backstage.io/v1beta3'; + /** @deprecated use templateInfo.baseUrl instead */ baseUrl?: string; parameters: JsonObject; steps: TaskStep[]; output: { [name: string]: JsonValue }; + /** @deprecated use templateInfo instead */ metadata?: TemplateMetadata; + templateInfo?: TemplateInfo; } /**