@backstage/frontend-plugin-api
Advanced tools
Comparing version 0.0.0-nightly-20231011021258 to 0.0.0-nightly-20231012021036
# @backstage/frontend-plugin-api | ||
## 0.0.0-nightly-20231011021258 | ||
## 0.0.0-nightly-20231012021036 | ||
@@ -13,6 +13,8 @@ ### Minor Changes | ||
- d3a37f55c086: Add support for `SidebarGroup` on the sidebar item extension. | ||
- 2ecd33618a7f: Plugins can now be assigned `routes` and `externalRoutes` when created. | ||
- 9a1fce352e6a: Updated dependency `@testing-library/jest-dom` to `^6.0.0`. | ||
- c1e9ca650049: Added `createExtensionOverrides` which can be used to install a collection of extensions in an app that will replace any existing ones. | ||
- 52366db5b36a: Added `createThemeExtension` and `coreExtensionData.theme`. | ||
- Updated dependencies | ||
- @backstage/core-plugin-api@0.0.0-nightly-20231011021258 | ||
- @backstage/core-plugin-api@0.0.0-nightly-20231012021036 | ||
- @backstage/types@1.1.1 | ||
@@ -19,0 +21,0 @@ |
/// <reference types="react" /> | ||
import React, { JSX as JSX$1, ReactNode } from 'react'; | ||
import { IconComponent, RouteRef, AnyApiFactory, AppTheme, AnyRoutes, AnyExternalRoutes, AnyApiRef } from '@backstage/core-plugin-api'; | ||
import { JsonObject } from '@backstage/types'; | ||
import { IconComponent, RouteRef, AnyApiFactory, AppTheme, AnyApiRef } from '@backstage/core-plugin-api'; | ||
import { z, ZodSchema, ZodTypeDef } from 'zod'; | ||
@@ -71,14 +71,18 @@ | ||
/** @public */ | ||
interface PluginOptions { | ||
interface PluginOptions<Routes extends AnyRoutes, ExternalRoutes extends AnyExternalRoutes> { | ||
id: string; | ||
routes?: Routes; | ||
externalRoutes?: ExternalRoutes; | ||
extensions?: Extension<unknown>[]; | ||
} | ||
/** @public */ | ||
interface BackstagePlugin { | ||
interface BackstagePlugin<Routes extends AnyRoutes = AnyRoutes, ExternalRoutes extends AnyExternalRoutes = AnyExternalRoutes> { | ||
$$type: '@backstage/BackstagePlugin'; | ||
id: string; | ||
extensions: Extension<unknown>[]; | ||
routes: Routes; | ||
externalRoutes: ExternalRoutes; | ||
} | ||
/** @public */ | ||
declare function createPlugin(options: PluginOptions): BackstagePlugin; | ||
declare function createPlugin<Routes extends AnyRoutes = AnyRoutes, ExternalRoutes extends AnyExternalRoutes = AnyExternalRoutes>(options: PluginOptions<Routes, ExternalRoutes>): BackstagePlugin<Routes, ExternalRoutes>; | ||
@@ -85,0 +89,0 @@ /** @public */ |
@@ -58,7 +58,9 @@ import React from 'react'; | ||
function createPlugin(options) { | ||
var _a; | ||
var _a, _b, _c; | ||
return { | ||
...options, | ||
$$type: "@backstage/BackstagePlugin", | ||
extensions: (_a = options.extensions) != null ? _a : [] | ||
routes: (_a = options.routes) != null ? _a : {}, | ||
externalRoutes: (_b = options.externalRoutes) != null ? _b : {}, | ||
extensions: (_c = options.extensions) != null ? _c : [], | ||
$$type: "@backstage/BackstagePlugin" | ||
}; | ||
@@ -65,0 +67,0 @@ } |
{ | ||
"name": "@backstage/frontend-plugin-api", | ||
"version": "0.0.0-nightly-20231011021258", | ||
"version": "0.0.0-nightly-20231012021036", | ||
"main": "dist/index.esm.js", | ||
@@ -26,6 +26,6 @@ "types": "dist/index.d.ts", | ||
"devDependencies": { | ||
"@backstage/cli": "^0.0.0-nightly-20231011021258", | ||
"@backstage/frontend-app-api": "^0.0.0-nightly-20231011021258", | ||
"@backstage/test-utils": "^0.0.0-nightly-20231011021258", | ||
"@testing-library/jest-dom": "^5.10.1", | ||
"@backstage/cli": "^0.0.0-nightly-20231012021036", | ||
"@backstage/frontend-app-api": "^0.0.0-nightly-20231012021036", | ||
"@backstage/test-utils": "^0.0.0-nightly-20231012021036", | ||
"@testing-library/jest-dom": "^6.0.0", | ||
"@testing-library/react": "^12.1.3" | ||
@@ -41,3 +41,3 @@ }, | ||
"dependencies": { | ||
"@backstage/core-plugin-api": "^0.0.0-nightly-20231011021258", | ||
"@backstage/core-plugin-api": "^0.0.0-nightly-20231012021036", | ||
"@backstage/types": "^1.1.1", | ||
@@ -44,0 +44,0 @@ "@types/react": "^16.13.1 || ^17.0.0", |
Sorry, the diff of this file is not supported yet
47146
415