chore: deprecate the namespace option in blueprints and extensions
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -24,7 +24,6 @@ const iconsDataRef = createExtensionDataRef<{
|
||||
/** @public */
|
||||
export const IconBundleBlueprint = createExtensionBlueprint({
|
||||
kind: 'icon-bundle',
|
||||
namespace: 'app',
|
||||
attachTo: { id: 'api:app/icons', input: 'icons' },
|
||||
output: [iconsDataRef],
|
||||
config: {
|
||||
|
||||
@@ -42,7 +42,7 @@ describe('ThemeBlueprint', () => {
|
||||
"inputs": {},
|
||||
"kind": "theme",
|
||||
"name": "light",
|
||||
"namespace": "app",
|
||||
"namespace": undefined,
|
||||
"output": [
|
||||
[Function],
|
||||
],
|
||||
|
||||
@@ -28,7 +28,6 @@ const themeDataRef = createExtensionDataRef<AppTheme>().with({
|
||||
*/
|
||||
export const ThemeBlueprint = createExtensionBlueprint({
|
||||
kind: 'theme',
|
||||
namespace: 'app',
|
||||
attachTo: { id: 'api:app/app-theme', input: 'themes' },
|
||||
output: [themeDataRef],
|
||||
dataRefs: {
|
||||
|
||||
@@ -122,6 +122,7 @@ export type CreateExtensionOptions<
|
||||
UFactoryOutput extends ExtensionDataValue<any, any>,
|
||||
> = {
|
||||
kind?: TKind;
|
||||
/** @deprecated namespace is no longer required, you can safely remove this option and it will default to the `pluginId`. It will be removed in a future release. */
|
||||
namespace?: TNamespace;
|
||||
name?: TName;
|
||||
attachTo: { id: string; input: string };
|
||||
|
||||
@@ -57,6 +57,7 @@ export type CreateExtensionBlueprintOptions<
|
||||
TDataRefs extends { [name in string]: AnyExtensionDataRef },
|
||||
> = {
|
||||
kind: TKind;
|
||||
/** @deprecated namespace is no longer required, you can safely remove this option and it will default to the `pluginId`. It will be removed in a future release. */
|
||||
namespace?: TNamespace;
|
||||
attachTo: { id: string; input: string };
|
||||
disabled?: boolean;
|
||||
@@ -111,6 +112,7 @@ export interface ExtensionBlueprint<
|
||||
TNewNamespace extends string | undefined,
|
||||
TNewName extends string | undefined,
|
||||
>(args: {
|
||||
/** @deprecated namespace is no longer required, you can safely remove this option and it will default to the `pluginId`. It will be removed in a future release. */
|
||||
namespace?: TNewNamespace;
|
||||
name?: TNewName;
|
||||
attachTo?: { id: string; input: string };
|
||||
@@ -149,6 +151,7 @@ export interface ExtensionBlueprint<
|
||||
>;
|
||||
},
|
||||
>(args: {
|
||||
/** @deprecated namespace is no longer required, you can safely remove this option and it will default to the `pluginId`. It will be removed in a future release. */
|
||||
namespace?: TNewNamespace;
|
||||
name?: TNewName;
|
||||
attachTo?: { id: string; input: string };
|
||||
|
||||
@@ -27,7 +27,6 @@ import { ApiProvider } from '../../../../packages/core-app-api/src';
|
||||
import { AppThemeProvider } from '../../../../packages/core-app-api/src/app/AppThemeProvider';
|
||||
|
||||
export const App = createExtension({
|
||||
namespace: 'app',
|
||||
attachTo: { id: 'root', input: 'app' },
|
||||
inputs: {
|
||||
root: createExtensionInput([coreExtensionData.reactElement], {
|
||||
|
||||
@@ -23,7 +23,6 @@ import {
|
||||
import { SidebarPage } from '@backstage/core-components';
|
||||
|
||||
export const AppLayout = createExtension({
|
||||
namespace: 'app',
|
||||
name: 'layout',
|
||||
attachTo: { id: 'app/root', input: 'children' },
|
||||
inputs: {
|
||||
|
||||
@@ -82,7 +82,6 @@ const SidebarNavItem = (
|
||||
};
|
||||
|
||||
export const AppNav = createExtension({
|
||||
namespace: 'app',
|
||||
name: 'nav',
|
||||
attachTo: { id: 'app/layout', input: 'nav' },
|
||||
inputs: {
|
||||
|
||||
@@ -53,7 +53,6 @@ import { RouteTracker } from '../../../../packages/frontend-app-api/src/routing/
|
||||
import { getBasePath } from '../../../../packages/frontend-app-api/src/routing/getBasePath';
|
||||
|
||||
export const AppRoot = createExtension({
|
||||
namespace: 'app',
|
||||
name: 'root',
|
||||
attachTo: { id: 'app', input: 'root' },
|
||||
inputs: {
|
||||
|
||||
@@ -25,7 +25,6 @@ import {
|
||||
import { useRoutes } from 'react-router-dom';
|
||||
|
||||
export const AppRoutes = createExtension({
|
||||
namespace: 'app',
|
||||
name: 'routes',
|
||||
attachTo: { id: 'app/layout', input: 'content' },
|
||||
inputs: {
|
||||
|
||||
@@ -19,7 +19,6 @@ import { AppRootElementBlueprint } from '@backstage/frontend-plugin-api';
|
||||
import React from 'react';
|
||||
|
||||
export const oauthRequestDialogAppRootElement = AppRootElementBlueprint.make({
|
||||
namespace: 'app',
|
||||
name: 'oauth-request-dialog',
|
||||
params: {
|
||||
element: <OAuthRequestDialog />,
|
||||
@@ -28,7 +27,6 @@ export const oauthRequestDialogAppRootElement = AppRootElementBlueprint.make({
|
||||
|
||||
export const alertDisplayAppRootElement =
|
||||
AppRootElementBlueprint.makeWithOverrides({
|
||||
namespace: 'app',
|
||||
name: 'alert-display',
|
||||
config: {
|
||||
schema: {
|
||||
|
||||
Reference in New Issue
Block a user