diff --git a/packages/frontend-app-api/src/wiring/createExtensionInstance.ts b/packages/frontend-app-api/src/wiring/createExtensionInstance.ts index 2cae60c1e6..52afe95121 100644 --- a/packages/frontend-app-api/src/wiring/createExtensionInstance.ts +++ b/packages/frontend-app-api/src/wiring/createExtensionInstance.ts @@ -23,6 +23,8 @@ import mapValues from 'lodash/mapValues'; /** @internal */ export interface ExtensionInstance { + readonly $$type: '@backstage/ExtensionInstance'; + readonly id: string; /** * Get concrete value for the given extension data reference. Returns undefined if no value is available. @@ -32,7 +34,6 @@ export interface ExtensionInstance { * Maps input names to the actual instances given to them. */ readonly attachments: Map; - readonly $$type: 'extension-instance'; } /** @internal */ @@ -86,12 +87,12 @@ export function createExtensionInstance(options: { } return { + $$type: '@backstage/ExtensionInstance', id: options.extension.id, getData(ref: ExtensionDataRef): T | undefined { return extensionData.get(ref.id) as T | undefined; }, attachments, - $$type: 'extension-instance', }; } diff --git a/packages/frontend-plugin-api/api-report.md b/packages/frontend-plugin-api/api-report.md index 2959dcb92e..3a0a3bf357 100644 --- a/packages/frontend-plugin-api/api-report.md +++ b/packages/frontend-plugin-api/api-report.md @@ -24,7 +24,7 @@ export type AnyExtensionDataMap = { // @public (undocumented) export interface BackstagePlugin { // (undocumented) - $$type: 'backstage-plugin'; + $$type: '@backstage/BackstagePlugin'; // (undocumented) extensions: Extension[]; // (undocumented) @@ -176,7 +176,7 @@ export function createSchemaFromZod( // @public (undocumented) export interface Extension { // (undocumented) - $$type: 'extension'; + $$type: '@backstage/Extension'; // (undocumented) at: string; // (undocumented) @@ -268,7 +268,7 @@ export type ExtensionDataRef< id: string; T: TData; config: TConfig; - $$type: 'extension-data'; + $$type: '@backstage/ExtensionDataRef'; }; // @public (undocumented) diff --git a/packages/frontend-plugin-api/src/wiring/createExtension.ts b/packages/frontend-plugin-api/src/wiring/createExtension.ts index bcea03595b..1a7e02804e 100644 --- a/packages/frontend-plugin-api/src/wiring/createExtension.ts +++ b/packages/frontend-plugin-api/src/wiring/createExtension.ts @@ -87,7 +87,7 @@ export function createExtension< return { ...options, disabled: options.disabled ?? false, - $$type: 'extension', + $$type: '@backstage/Extension', inputs: options.inputs ?? {}, factory({ bind, config, inputs }) { // TODO: Simplify this, but TS wouldn't infer the input type for some reason diff --git a/packages/frontend-plugin-api/src/wiring/createExtensionDataRef.ts b/packages/frontend-plugin-api/src/wiring/createExtensionDataRef.ts index 6d6309bee4..d0d96e85f9 100644 --- a/packages/frontend-plugin-api/src/wiring/createExtensionDataRef.ts +++ b/packages/frontend-plugin-api/src/wiring/createExtensionDataRef.ts @@ -22,7 +22,7 @@ export type ExtensionDataRef< id: string; T: TData; config: TConfig; - $$type: 'extension-data'; + $$type: '@backstage/ExtensionDataRef'; }; /** @public */ @@ -40,7 +40,7 @@ export function createExtensionDataRef( ): ConfigurableExtensionDataRef { return { id, - $$type: 'extension-data', + $$type: '@backstage/ExtensionDataRef', config: {}, optional() { return { ...this, config: { ...this.config, optional: true } }; diff --git a/packages/frontend-plugin-api/src/wiring/createPlugin.ts b/packages/frontend-plugin-api/src/wiring/createPlugin.ts index 7f7e44ff03..bb372f63c1 100644 --- a/packages/frontend-plugin-api/src/wiring/createPlugin.ts +++ b/packages/frontend-plugin-api/src/wiring/createPlugin.ts @@ -24,7 +24,7 @@ export interface PluginOptions { /** @public */ export interface BackstagePlugin { - $$type: 'backstage-plugin'; + $$type: '@backstage/BackstagePlugin'; id: string; extensions: Extension[]; } @@ -33,7 +33,7 @@ export interface BackstagePlugin { export function createPlugin(options: PluginOptions): BackstagePlugin { return { ...options, - $$type: 'backstage-plugin', + $$type: '@backstage/BackstagePlugin', extensions: options.extensions ?? [], }; } diff --git a/packages/frontend-plugin-api/src/wiring/types.ts b/packages/frontend-plugin-api/src/wiring/types.ts index dbe4633ff5..46b76e30f4 100644 --- a/packages/frontend-plugin-api/src/wiring/types.ts +++ b/packages/frontend-plugin-api/src/wiring/types.ts @@ -26,7 +26,7 @@ export type AnyExtensionDataMap = { /** @public */ export interface Extension { - $$type: 'extension'; + $$type: '@backstage/Extension'; id: string; at: string; disabled: boolean;