diff --git a/workspaces/orchestrator/.changeset/promote-nfs-stable.md b/workspaces/orchestrator/.changeset/promote-nfs-stable.md new file mode 100644 index 00000000000..fd479b858ea --- /dev/null +++ b/workspaces/orchestrator/.changeset/promote-nfs-stable.md @@ -0,0 +1,43 @@ +--- +'@red-hat-developer-hub/backstage-plugin-orchestrator': major +'@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets': major +--- + +**BREAKING**: Graduated the New Frontend System (NFS) orchestrator plugins to stable API. + +The NFS plugins (`createFrontendPlugin`) have been promoted from the `./alpha` subpath to the primary `.` entry point. Legacy (OFS) exports have been moved to the new `./legacy` subpath. + +For `@red-hat-developer-hub/backstage-plugin-orchestrator`, the `./alpha` subpath now only exports translations. For `@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets`, the `./alpha` subpath has been removed. + +**Migration for NFS consumers (previously using `./alpha`):** + +```diff +- import orchestratorPlugin, { orchestratorTranslationsModule } from '@red-hat-developer-hub/backstage-plugin-orchestrator/alpha'; +- import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets/alpha'; ++ import orchestratorPlugin, { orchestratorTranslationsModule } from '@red-hat-developer-hub/backstage-plugin-orchestrator'; ++ import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets'; +``` + +**Migration for OFS consumers:** + +```diff +- import { OrchestratorPage, OrchestratorIcon } from '@red-hat-developer-hub/backstage-plugin-orchestrator'; +- import { orchestratorFormWidgetsPlugin } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets'; ++ import { OrchestratorPage, OrchestratorIcon } from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy'; ++ import { orchestratorFormWidgetsPlugin } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets/legacy'; +``` + +**Migration for dynamic plugin configurations:** + +Legacy exports require `module: Legacy` — they are not available on the default module. + +```yaml +dynamicPlugins: + frontend: + red-hat-developer-hub.backstage-plugin-orchestrator: + # Legacy exports require `module: Legacy` + dynamicRoutes: + - path: /orchestrator + importName: OrchestratorPage + module: Legacy +``` diff --git a/workspaces/orchestrator/docs/static-plugin-installation.md b/workspaces/orchestrator/docs/static-plugin-installation.md index 27da9d5f27c..818158d0f8f 100644 --- a/workspaces/orchestrator/docs/static-plugin-installation.md +++ b/workspaces/orchestrator/docs/static-plugin-installation.md @@ -41,7 +41,7 @@ Follow these instructions to install the orchestrator plugin in a Backstage envi ```tsx title="packages/app/src/App.tsx" /* highlight-add-next-line */ - import { OrchestratorPage } from '@red-hat-developer-hub/backstage-plugin-orchestrator'; + import { OrchestratorPage } from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy'; const routes = ( @@ -56,7 +56,7 @@ Follow these instructions to install the orchestrator plugin in a Backstage envi ```tsx title="packages/app/src/components/Root/Root.tsx" /* highlight-add-next-line */ - import { OrchestratorIcon } from '@red-hat-developer-hub/backstage-plugin-orchestrator'; + import { OrchestratorIcon } from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy'; export const Root = ({ children }: PropsWithChildren<{}>) => ( @@ -86,8 +86,8 @@ If your app uses `createApp` from `@backstage/frontend-defaults`, add the orches import { createApp } from '@backstage/frontend-defaults'; import orchestratorPlugin, { orchestratorTranslationsModule, -} from '@red-hat-developer-hub/backstage-plugin-orchestrator/alpha'; -import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets/alpha'; +} from '@red-hat-developer-hub/backstage-plugin-orchestrator'; +import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets'; export default createApp({ features: [ diff --git a/workspaces/orchestrator/docs/workflows-tab.md b/workspaces/orchestrator/docs/workflows-tab.md index cd0299c7d77..02326cc0478 100644 --- a/workspaces/orchestrator/docs/workflows-tab.md +++ b/workspaces/orchestrator/docs/workflows-tab.md @@ -66,7 +66,7 @@ To expose workflows directly on the entity page, update import { OrchestratorCatalogTab, IsOrchestratorCatalogTabAvailable, -} from '@red-hat-developer-hub/backstage-plugin-orchestrator'; +} from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy'; const serviceEntityPage = ( diff --git a/workspaces/orchestrator/packages/app-legacy/src/App.tsx b/workspaces/orchestrator/packages/app-legacy/src/App.tsx index 08b74d2b2cc..01c5cd4295e 100644 --- a/workspaces/orchestrator/packages/app-legacy/src/App.tsx +++ b/workspaces/orchestrator/packages/app-legacy/src/App.tsx @@ -46,8 +46,8 @@ import { import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib'; import { TechDocsAddons } from '@backstage/plugin-techdocs-react'; import { UserSettingsPage } from '@backstage/plugin-user-settings'; -import { OrchestratorPage } from '@red-hat-developer-hub/backstage-plugin-orchestrator'; -import { orchestratorFormWidgetsPlugin } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets'; +import { OrchestratorPage } from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy'; +import { orchestratorFormWidgetsPlugin } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets/legacy'; import { customAuthProviderPlugin } from 'custom-authentication-provider-module'; import { getThemes } from '@red-hat-developer-hub/backstage-plugin-theme'; import { NotificationsPage } from '@backstage/plugin-notifications'; @@ -58,7 +58,7 @@ import { apis } from './apis'; import { entityPage } from './components/catalog/EntityPage'; import { Root } from './components/Root'; import { searchPage } from './components/search/SearchPage'; -import { orchestratorTranslations } from '@red-hat-developer-hub/backstage-plugin-orchestrator'; +import { orchestratorTranslations } from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy'; const app = createApp({ apis, diff --git a/workspaces/orchestrator/packages/app-legacy/src/components/Root/Root.tsx b/workspaces/orchestrator/packages/app-legacy/src/components/Root/Root.tsx index 9236cc839f0..efc5974c70c 100644 --- a/workspaces/orchestrator/packages/app-legacy/src/components/Root/Root.tsx +++ b/workspaces/orchestrator/packages/app-legacy/src/components/Root/Root.tsx @@ -40,7 +40,7 @@ import MenuIcon from '@mui/icons-material/Menu'; import GroupIcon from '@mui/icons-material/People'; import SearchIcon from '@mui/icons-material/Search'; import Box from '@mui/material/Box'; -import { OrchestratorIcon } from '@red-hat-developer-hub/backstage-plugin-orchestrator'; +import { OrchestratorIcon } from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy'; import { NotificationsSidebarItem } from '@backstage/plugin-notifications'; import { Administration } from '@backstage-community/plugin-rbac'; import { diff --git a/workspaces/orchestrator/packages/app-legacy/src/components/catalog/EntityPage.tsx b/workspaces/orchestrator/packages/app-legacy/src/components/catalog/EntityPage.tsx index 03f4eb45d77..a95525dabb1 100644 --- a/workspaces/orchestrator/packages/app-legacy/src/components/catalog/EntityPage.tsx +++ b/workspaces/orchestrator/packages/app-legacy/src/components/catalog/EntityPage.tsx @@ -71,7 +71,7 @@ import Grid from '@mui/material/Grid'; import { OrchestratorCatalogTab, IsOrchestratorCatalogTabAvailable, -} from '@red-hat-developer-hub/backstage-plugin-orchestrator'; +} from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy'; const techdocsContent = ( diff --git a/workspaces/orchestrator/packages/app/src/App.tsx b/workspaces/orchestrator/packages/app/src/App.tsx index b44202759fd..d22c903bc0a 100644 --- a/workspaces/orchestrator/packages/app/src/App.tsx +++ b/workspaces/orchestrator/packages/app/src/App.tsx @@ -19,8 +19,8 @@ import catalogPlugin from '@backstage/plugin-catalog/alpha'; import userSettingsPlugin from '@backstage/plugin-user-settings/alpha'; import orchestratorPlugin, { orchestratorTranslationsModule, -} from '@red-hat-developer-hub/backstage-plugin-orchestrator/alpha'; -import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets/alpha'; +} from '@red-hat-developer-hub/backstage-plugin-orchestrator'; +import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets'; import { rhdhThemeModule } from '@red-hat-developer-hub/backstage-plugin-theme/alpha'; import { navModule } from './modules/nav'; diff --git a/workspaces/orchestrator/plugins/orchestrator-form-widgets/README.md b/workspaces/orchestrator/plugins/orchestrator-form-widgets/README.md index eae7b761f36..6cf114eceda 100644 --- a/workspaces/orchestrator/plugins/orchestrator-form-widgets/README.md +++ b/workspaces/orchestrator/plugins/orchestrator-form-widgets/README.md @@ -6,23 +6,33 @@ Documentation of implemented widgets can be found in a [orchestratorFormWidgets. ## Deployment -### Static (for development) +### New frontend system (NFS) -In the packages/app/src/App.tsx: +```tsx +import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets'; +export default createApp({ + features: [ + // ... + orchestratorFormWidgetsPlugin, + ], +}); ``` -import { orchestratorFormWidgetsPlugin } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets'; -... + +### Legacy frontend (OFS) + +```tsx +import { orchestratorFormWidgetsPlugin } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets/legacy'; + const app = createApp({ - ... - plugins: [orchestratorFormWidgetsPlugin], -}) + plugins: [orchestratorFormWidgetsPlugin], +}); ``` ### Dynamic (for RHDH production) -For RHDH production deployments, it is expected that the plugin is exported as a dynamic plugin using RHDH CLI a loaded among the other dynamic frontend plugins. -No explicit configuration is needed. +For RHDH production deployments, it is expected that the plugin is exported as a dynamic plugin using RHDH CLI and loaded among the other dynamic frontend plugins. +No explicit configuration is needed for NFS. Legacy OFS Scalprum consumers should use `module: Legacy`. ## `http-workflow-dev-server` - HTTP server for dynamic widgets development diff --git a/workspaces/orchestrator/plugins/orchestrator-form-widgets/package.json b/workspaces/orchestrator/plugins/orchestrator-form-widgets/package.json index cfaa0854b9f..18539f39718 100644 --- a/workspaces/orchestrator/plugins/orchestrator-form-widgets/package.json +++ b/workspaces/orchestrator/plugins/orchestrator-form-widgets/package.json @@ -6,13 +6,13 @@ "types": "src/index.ts", "exports": { ".": "./src/index.ts", - "./alpha": "./src/alpha.tsx", + "./legacy": "./src/legacyExports.ts", "./package.json": "./package.json" }, "typesVersions": { "*": { - "alpha": [ - "src/alpha.tsx" + "legacy": [ + "src/legacyExports.ts" ], "package.json": [ "package.json" @@ -89,7 +89,8 @@ "scalprum": { "name": "red-hat-developer-hub.backstage-plugin-orchestrator-form-widgets", "exposedModules": { - "PluginRoot": "./src/index.ts" + "PluginRoot": "./src/index.ts", + "Legacy": "./src/legacyExports.ts" } }, "devDependencies": { diff --git a/workspaces/orchestrator/plugins/orchestrator-form-widgets/report-alpha.api.md b/workspaces/orchestrator/plugins/orchestrator-form-widgets/report-alpha.api.md deleted file mode 100644 index d3711e58c90..00000000000 --- a/workspaces/orchestrator/plugins/orchestrator-form-widgets/report-alpha.api.md +++ /dev/null @@ -1,38 +0,0 @@ -## API Report File for "@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts -import { AnyApiFactory } from '@backstage/frontend-plugin-api'; -import { ApiFactory } from '@backstage/frontend-plugin-api'; -import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api'; -import { ExtensionDataRef } from '@backstage/frontend-plugin-api'; -import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api'; -import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api'; - -// @alpha -const _default: OverridableFrontendPlugin< - {}, - {}, - { - 'api:orchestrator-form-widgets': OverridableExtensionDefinition<{ - kind: 'api'; - name: undefined; - config: {}; - configInput: {}; - output: ExtensionDataRef; - inputs: {}; - params: < - TApi, - TImpl extends TApi, - TDeps extends { [name in string]: unknown }, - >( - params: ApiFactory, - ) => ExtensionBlueprintParams; - }>; - } ->; -export default _default; - -// (No @packageDocumentation comment for this package) -``` diff --git a/workspaces/orchestrator/plugins/orchestrator-form-widgets/report-legacy.api.md b/workspaces/orchestrator/plugins/orchestrator-form-widgets/report-legacy.api.md new file mode 100644 index 00000000000..60fba50076a --- /dev/null +++ b/workspaces/orchestrator/plugins/orchestrator-form-widgets/report-legacy.api.md @@ -0,0 +1,25 @@ +## API Report File for "@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { ApiFactory } from '@backstage/frontend-plugin-api'; +import { BackstagePlugin } from '@backstage/core-plugin-api'; +import { OrchestratorFormApi } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-api'; + +// Warning: (ae-forgotten-export) The symbol "FormWidgetsApi" needs to be exported by the entry point legacyExports.d.ts +// +// @public +export const orchestratorFormApiFactory: ApiFactory< + OrchestratorFormApi, + FormWidgetsApi, + { + [x: string]: unknown; + } +>; + +// @public +export const orchestratorFormWidgetsPlugin: BackstagePlugin<{}, {}, {}>; + +// (No @packageDocumentation comment for this package) +``` diff --git a/workspaces/orchestrator/plugins/orchestrator-form-widgets/report.api.md b/workspaces/orchestrator/plugins/orchestrator-form-widgets/report.api.md index 5e200399067..f7edf1667a0 100644 --- a/workspaces/orchestrator/plugins/orchestrator-form-widgets/report.api.md +++ b/workspaces/orchestrator/plugins/orchestrator-form-widgets/report.api.md @@ -3,23 +3,36 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts +import { AnyApiFactory } from '@backstage/frontend-plugin-api'; import { ApiFactory } from '@backstage/frontend-plugin-api'; -import { BackstagePlugin } from '@backstage/core-plugin-api'; -import { OrchestratorFormApi } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-api'; +import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api'; +import { ExtensionDataRef } from '@backstage/frontend-plugin-api'; +import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api'; +import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api'; -// Warning: (ae-forgotten-export) The symbol "FormWidgetsApi" needs to be exported by the entry point index.d.ts -// // @public -export const orchestratorFormApiFactory: ApiFactory< - OrchestratorFormApi, - FormWidgetsApi, +const _default: OverridableFrontendPlugin< + {}, + {}, { - [x: string]: unknown; + 'api:orchestrator-form-widgets': OverridableExtensionDefinition<{ + kind: 'api'; + name: undefined; + config: {}; + configInput: {}; + output: ExtensionDataRef; + inputs: {}; + params: < + TApi, + TImpl extends TApi, + TDeps extends { [name in string]: unknown }, + >( + params: ApiFactory, + ) => ExtensionBlueprintParams; + }>; } >; - -// @public -export const orchestratorFormWidgetsPlugin: BackstagePlugin<{}, {}, {}>; +export default _default; // (No @packageDocumentation comment for this package) ``` diff --git a/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/alpha.tsx b/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/alpha.tsx deleted file mode 100644 index 48c2e7e84a3..00000000000 --- a/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/alpha.tsx +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright Red Hat, Inc. - * - * 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 { - ApiBlueprint, - createApiFactory, - createFrontendPlugin, -} from '@backstage/frontend-plugin-api'; -import { orchestratorFormApiRef } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-api'; -import { FormWidgetsApi } from './FormWidgetsApi'; - -const orchestratorFormApi = ApiBlueprint.make({ - params: defineParams => - defineParams( - createApiFactory({ - api: orchestratorFormApiRef, - deps: {}, - factory: () => new FormWidgetsApi(), - }), - ), -}); - -/** - * - * @alpha - * Orchestrator Form Widgets plugin for the new frontend system. - * Provides default RJSF widgets (SchemaUpdater, ActiveTextInput, etc.) for the Workflow Execution form. - * - */ -export default createFrontendPlugin({ - pluginId: 'orchestrator-form-widgets', - extensions: [orchestratorFormApi], -}); diff --git a/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/index.ts b/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/index.ts index 13e9901126c..975c761cb24 100644 --- a/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/index.ts +++ b/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/index.ts @@ -14,7 +14,32 @@ * limitations under the License. */ -export { - orchestratorFormWidgetsPlugin, - orchestratorFormApiFactory, -} from './plugin'; +import { + ApiBlueprint, + createApiFactory, + createFrontendPlugin, +} from '@backstage/frontend-plugin-api'; +import { orchestratorFormApiRef } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-api'; +import { FormWidgetsApi } from './FormWidgetsApi'; + +const orchestratorFormApi = ApiBlueprint.make({ + params: defineParams => + defineParams( + createApiFactory({ + api: orchestratorFormApiRef, + deps: {}, + factory: () => new FormWidgetsApi(), + }), + ), +}); + +/** + * Orchestrator Form Widgets plugin for the new frontend system. + * Provides default RJSF widgets (SchemaUpdater, ActiveTextInput, etc.) for the Workflow Execution form. + * + * @public + */ +export default createFrontendPlugin({ + pluginId: 'orchestrator-form-widgets', + extensions: [orchestratorFormApi], +}); diff --git a/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/legacyExports.ts b/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/legacyExports.ts new file mode 100644 index 00000000000..13e9901126c --- /dev/null +++ b/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/legacyExports.ts @@ -0,0 +1,20 @@ +/* + * Copyright Red Hat, Inc. + * + * 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. + */ + +export { + orchestratorFormWidgetsPlugin, + orchestratorFormApiFactory, +} from './plugin'; diff --git a/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/alpha.test.tsx b/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/nfsExports.test.tsx similarity index 91% rename from workspaces/orchestrator/plugins/orchestrator-form-widgets/src/alpha.test.tsx rename to workspaces/orchestrator/plugins/orchestrator-form-widgets/src/nfsExports.test.tsx index 4762f893bb3..428c02c4a2c 100644 --- a/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/alpha.test.tsx +++ b/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/nfsExports.test.tsx @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import plugin from './alpha'; +import plugin from './index'; -describe('orchestrator-form-widgets alpha', () => { +describe('orchestrator-form-widgets NFS', () => { it('should export a valid frontend plugin', () => { expect(plugin).toBeDefined(); expect(plugin.$$type).toBe('@backstage/FrontendPlugin'); diff --git a/workspaces/orchestrator/plugins/orchestrator/README.md b/workspaces/orchestrator/plugins/orchestrator/README.md index 3d498589c47..542372d1e9f 100644 --- a/workspaces/orchestrator/plugins/orchestrator/README.md +++ b/workspaces/orchestrator/plugins/orchestrator/README.md @@ -4,8 +4,9 @@ Frontend plugin for the Workflow Orchestrator: run and manage workflows. ## Entry points -- **`@red-hat-developer-hub/backstage-plugin-orchestrator`** — Legacy Backstage app (default export, `OrchestratorPage`, etc.). -- **`@red-hat-developer-hub/backstage-plugin-orchestrator/alpha`** — New frontend system (NFS): plugin instance, pages, nav items, and translation module. +- **`@red-hat-developer-hub/backstage-plugin-orchestrator`** — New frontend system (NFS): plugin instance, pages, entity content, and translation module. +- **`@red-hat-developer-hub/backstage-plugin-orchestrator/legacy`** — Legacy Backstage app (OFS): `orchestratorPlugin`, `OrchestratorPage`, icons, catalog tab helpers. +- **`@red-hat-developer-hub/backstage-plugin-orchestrator/alpha`** — Translations only (`orchestratorTranslations`, `orchestratorTranslationRef`). ## Development diff --git a/workspaces/orchestrator/plugins/orchestrator/app-config.yaml b/workspaces/orchestrator/plugins/orchestrator/app-config.yaml index c20139d1cf1..ed1e37b3c06 100644 --- a/workspaces/orchestrator/plugins/orchestrator/app-config.yaml +++ b/workspaces/orchestrator/plugins/orchestrator/app-config.yaml @@ -1,15 +1,19 @@ dynamicPlugins: frontend: red-hat-developer-hub.backstage-plugin-orchestrator: + # Legacy exports require `module: Legacy` — they are not available on the default module. translationResources: - importName: orchestratorTranslations ref: orchestratorTranslationRef + module: Legacy appIcons: - name: orchestratorIcon importName: OrchestratorIcon + module: Legacy dynamicRoutes: - path: /orchestrator importName: OrchestratorPage + module: Legacy menuItem: icon: orchestratorIcon text: Orchestrator @@ -25,6 +29,7 @@ dynamicPlugins: mountPoints: - mountPoint: entity.page.workflows/cards importName: OrchestratorCatalogTab + module: Legacy config: layout: gridColumn: '1 / -1' diff --git a/workspaces/orchestrator/plugins/orchestrator/dev/index.tsx b/workspaces/orchestrator/plugins/orchestrator/dev/index.tsx index 41032359c38..5ad506a6fb4 100644 --- a/workspaces/orchestrator/plugins/orchestrator/dev/index.tsx +++ b/workspaces/orchestrator/plugins/orchestrator/dev/index.tsx @@ -26,12 +26,10 @@ import userSettingsPlugin from '@backstage/plugin-user-settings/alpha'; // eslint-disable-next-line @backstage/no-ui-css-imports-in-non-frontend import '@backstage/ui/css/styles.css'; -import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets/alpha'; +import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets'; import { rhdhThemeModule } from '@red-hat-developer-hub/backstage-plugin-theme/alpha'; -import orchestratorPlugin, { - orchestratorTranslationsModule, -} from '../src/alpha'; +import orchestratorPlugin, { orchestratorTranslationsModule } from '../src'; import { devNavModule } from './nav'; const App = createApp({ diff --git a/workspaces/orchestrator/plugins/orchestrator/dev/legacy.tsx b/workspaces/orchestrator/plugins/orchestrator/dev/legacy.tsx index 7a7df6b8a2c..e42cd3169fb 100644 --- a/workspaces/orchestrator/plugins/orchestrator/dev/legacy.tsx +++ b/workspaces/orchestrator/plugins/orchestrator/dev/legacy.tsx @@ -18,7 +18,7 @@ import { createDevApp } from '@backstage/dev-utils'; import { getAllThemes } from '@red-hat-developer-hub/backstage-plugin-theme'; -import { OrchestratorPage, orchestratorPlugin } from '../src'; +import { OrchestratorPage, orchestratorPlugin } from '../src/legacyExports'; import { orchestratorTranslations } from '../src/translations'; createDevApp() diff --git a/workspaces/orchestrator/plugins/orchestrator/package.json b/workspaces/orchestrator/plugins/orchestrator/package.json index 5acd233b219..2799ba55def 100644 --- a/workspaces/orchestrator/plugins/orchestrator/package.json +++ b/workspaces/orchestrator/plugins/orchestrator/package.json @@ -2,18 +2,22 @@ "name": "@red-hat-developer-hub/backstage-plugin-orchestrator", "version": "5.10.0", "license": "Apache-2.0", - "main": "src/index.ts", - "types": "src/index.ts", + "main": "src/index.tsx", + "types": "src/index.tsx", "exports": { - ".": "./src/index.ts", - "./alpha": "./src/alpha.tsx", + ".": "./src/index.tsx", + "./alpha": "./src/alpha.ts", + "./legacy": "./src/legacyExports.ts", "./orchestrator-translations-module": "./src/orchestratorTranslationsModuleExport.ts", "./package.json": "./package.json" }, "typesVersions": { "*": { "alpha": [ - "src/alpha.tsx" + "src/alpha.ts" + ], + "legacy": [ + "src/legacyExports.ts" ], "orchestrator-translations-module": [ "src/orchestratorTranslationsModuleExport.ts" @@ -135,8 +139,9 @@ "scalprum": { "name": "red-hat-developer-hub.backstage-plugin-orchestrator", "exposedModules": { - "PluginRoot": "./src/index.ts", - "Alpha": "./src/alpha.tsx" + "PluginRoot": "./src/index.tsx", + "Legacy": "./src/legacyExports.ts", + "OrchestratorTranslationsModule": "./src/orchestratorTranslationsModuleExport.ts" } }, "maintainers": [ diff --git a/workspaces/orchestrator/plugins/orchestrator/report-alpha.api.md b/workspaces/orchestrator/plugins/orchestrator/report-alpha.api.md index 3256ed1be90..5e596716234 100644 --- a/workspaces/orchestrator/plugins/orchestrator/report-alpha.api.md +++ b/workspaces/orchestrator/plugins/orchestrator/report-alpha.api.md @@ -3,220 +3,9 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { AnyApiFactory } from '@backstage/frontend-plugin-api'; -import { AnyRouteRefParams } from '@backstage/frontend-plugin-api'; -import { ApiFactory } from '@backstage/frontend-plugin-api'; -import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api'; -import { Entity } from '@backstage/catalog-model'; -import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api'; -import { ExtensionDataRef } from '@backstage/frontend-plugin-api'; -import { ExtensionInput } from '@backstage/frontend-plugin-api'; -import { FilterPredicate } from '@backstage/filter-predicates'; -import { FrontendModule } from '@backstage/frontend-plugin-api'; -import { IconElement } from '@backstage/frontend-plugin-api'; -import { JSX as JSX_2 } from 'react'; -import { JSXElementConstructor } from 'react'; -import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api'; -import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api'; -import { PathParams } from '@backstage/core-plugin-api'; -import { ReactElement } from 'react'; -import { RouteRef } from '@backstage/core-plugin-api'; -import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api'; -import { SubRouteRef } from '@backstage/core-plugin-api'; import { TranslationRef } from '@backstage/frontend-plugin-api'; import { TranslationResource } from '@backstage/frontend-plugin-api'; -// @alpha -const _default: OverridableFrontendPlugin< - { - root: RouteRef; - workflow: SubRouteRef>; - workflowRuns: SubRouteRef>; - workflowInstance: SubRouteRef>; - executeWorkflow: SubRouteRef>; - entityWorkflow: SubRouteRef< - PathParams<'/entity/:namespace/:kind/:name/:workflowId'> - >; - entityInstance: SubRouteRef< - PathParams<'/entity/:namespace/:kind/:name/:workflowId/:instanceId'> - >; - }, - {}, - { - 'api:orchestrator': OverridableExtensionDefinition<{ - kind: 'api'; - name: undefined; - config: {}; - configInput: {}; - output: ExtensionDataRef; - inputs: {}; - params: < - TApi, - TImpl extends TApi, - TDeps extends { [name in string]: unknown }, - >( - params: ApiFactory, - ) => ExtensionBlueprintParams; - }>; - 'entity-content:orchestrator/workflows': OverridableExtensionDefinition<{ - kind: 'entity-content'; - name: 'workflows'; - config: { - path: string | undefined; - title: string | undefined; - filter: FilterPredicate | undefined; - group: string | false | undefined; - icon: string | undefined; - }; - configInput: { - path?: string | undefined; - title?: string | undefined; - filter?: FilterPredicate | undefined; - group?: string | false | undefined; - icon?: string | undefined; - }; - output: - | ExtensionDataRef - | ExtensionDataRef< - RouteRef_2, - 'core.routing.ref', - { - optional: true; - } - > - | ExtensionDataRef - | ExtensionDataRef< - (entity: Entity) => boolean, - 'catalog.entity-filter-function', - { - optional: true; - } - > - | ExtensionDataRef< - string, - 'catalog.entity-filter-expression', - { - optional: true; - } - > - | ExtensionDataRef - | ExtensionDataRef< - string, - 'catalog.entity-content-group', - { - optional: true; - } - > - | ExtensionDataRef< - string | ReactElement>, - 'catalog.entity-content-icon', - { - optional: true; - } - >; - inputs: {}; - params: { - defaultPath?: [Error: `Use the 'path' param instead`]; - path: string; - defaultTitle?: [Error: `Use the 'title' param instead`]; - title: string; - defaultGroup?: [Error: `Use the 'group' param instead`]; - group?: - | ( - | 'operation' - | 'overview' - | 'documentation' - | 'development' - | 'deployment' - | 'observability' - ) - | (string & {}); - icon?: string | ReactElement; - loader: () => Promise; - routeRef?: RouteRef_2; - filter?: string | FilterPredicate | ((entity: Entity) => boolean); - }; - }>; - 'page:orchestrator': OverridableExtensionDefinition<{ - kind: 'page'; - name: undefined; - config: { - path: string | undefined; - title: string | undefined; - }; - configInput: { - path?: string | undefined; - title?: string | undefined; - }; - output: - | ExtensionDataRef - | ExtensionDataRef - | ExtensionDataRef< - RouteRef_2, - 'core.routing.ref', - { - optional: true; - } - > - | ExtensionDataRef< - string, - 'core.title', - { - optional: true; - } - > - | ExtensionDataRef< - IconElement, - 'core.icon', - { - optional: true; - } - >; - inputs: { - pages: ExtensionInput< - | ConfigurableExtensionDataRef - | ConfigurableExtensionDataRef - | ConfigurableExtensionDataRef< - RouteRef_2, - 'core.routing.ref', - { - optional: true; - } - > - | ConfigurableExtensionDataRef< - string, - 'core.title', - { - optional: true; - } - > - | ConfigurableExtensionDataRef< - IconElement, - 'core.icon', - { - optional: true; - } - >, - { - singleton: false; - optional: false; - internal: false; - } - >; - }; - params: { - path: string; - title?: string; - icon?: IconElement; - loader?: () => Promise; - routeRef?: RouteRef_2; - noHeader?: boolean; - }; - }>; - } ->; -export default _default; - // @public export const orchestratorTranslationRef: TranslationRef< 'plugin.orchestrator', @@ -412,8 +201,5 @@ export const orchestratorTranslationRef: TranslationRef< // @public export const orchestratorTranslations: TranslationResource<'plugin.orchestrator'>; -// @alpha -export const orchestratorTranslationsModule: FrontendModule; - // (No @packageDocumentation comment for this package) ``` diff --git a/workspaces/orchestrator/plugins/orchestrator/report-legacy.api.md b/workspaces/orchestrator/plugins/orchestrator/report-legacy.api.md new file mode 100644 index 00000000000..064494da8a4 --- /dev/null +++ b/workspaces/orchestrator/plugins/orchestrator/report-legacy.api.md @@ -0,0 +1,239 @@ +## API Report File for "@red-hat-developer-hub/backstage-plugin-orchestrator" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { BackstagePlugin } from '@backstage/core-plugin-api'; +import { Entity } from '@backstage/catalog-model'; +import { JSX as JSX_2 } from 'react/jsx-runtime'; +import { RouteRef } from '@backstage/core-plugin-api'; +import type { SVGProps } from 'react'; +import { TranslationRef } from '@backstage/frontend-plugin-api'; +import { TranslationResource } from '@backstage/frontend-plugin-api'; + +// @public +export const IsOrchestratorCatalogTabAvailable: (entity: Entity) => boolean; + +// Warning: (ae-missing-release-tag) "OrchestratorCatalogTab" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const OrchestratorCatalogTab: () => JSX_2.Element; + +// @public +export const OrchestratorIcon: ( + props: SVGProps, +) => JSX_2.Element; + +// @public +export const OrchestratorPage: () => JSX_2.Element; + +// @public +export const orchestratorPlugin: BackstagePlugin< + { + root: RouteRef; + }, + {}, + {} +>; + +// @public +export const orchestratorTranslationRef: TranslationRef< + 'plugin.orchestrator', + { + readonly 'table.title.workflows': string; + readonly 'table.title.allRuns': string; + readonly 'table.title.allWorkflowRuns': string; + readonly 'table.headers.name': string; + readonly 'table.headers.description': string; + readonly 'table.headers.version': string; + readonly 'table.headers.duration': string; + readonly 'table.headers.entity': string; + readonly 'table.headers.runStatus': string; + readonly 'table.headers.started': string; + readonly 'table.headers.status': string; + readonly 'table.headers.workflowStatus': string; + readonly 'table.headers.lastRun': string; + readonly 'table.headers.lastRunStatus': string; + readonly 'table.headers.runsLastMonth': string; + readonly 'table.headers.successRatio': string; + readonly 'table.headers.workflowName': string; + readonly 'table.headers.runBy': string; + readonly 'table.actions.run': string; + readonly 'table.actions.runAsEvent': string; + readonly 'table.actions.viewRuns': string; + readonly 'table.actions.viewInputSchema': string; + readonly 'table.actions.viewRunVariables': string; + readonly 'table.filters.entity': string; + readonly 'table.filters.started': string; + readonly 'table.filters.status': string; + readonly 'table.filters.runBy': string; + readonly 'table.filters.placeholder': string; + readonly 'table.filters.clearAll': string; + readonly 'table.filters.startedOptions.today': string; + readonly 'table.filters.startedOptions.yesterday': string; + readonly 'table.filters.startedOptions.last7days': string; + readonly 'table.filters.startedOptions.thisMonth': string; + readonly 'table.status.running': string; + readonly 'table.status.failed': string; + readonly 'table.status.completed': string; + readonly 'table.status.aborted': string; + readonly 'table.status.pending': string; + readonly 'table.status.active': string; + readonly 'common.details': string; + readonly 'common.values': string; + readonly 'common.execute': string; + readonly 'common.close': string; + readonly 'common.run': string; + readonly 'common.unavailable': string; + readonly 'common.cancel': string; + readonly 'common.links': string; + readonly 'common.back': string; + readonly 'common.next': string; + readonly 'common.review': string; + readonly 'common.goBack': string; + readonly 'duration.aFewSeconds': string; + readonly 'duration.aSecond': string; + readonly 'duration.seconds': string; + readonly 'duration.aMinute': string; + readonly 'duration.minutes': string; + readonly 'duration.anHour': string; + readonly 'duration.hours': string; + readonly 'duration.aDay': string; + readonly 'duration.days': string; + readonly 'duration.aMonth': string; + readonly 'duration.months': string; + readonly 'duration.aYear': string; + readonly 'duration.years': string; + readonly 'page.title': string; + readonly 'page.tabs.workflows': string; + readonly 'page.tabs.allRuns': string; + readonly 'page.tabs.workflowDetails': string; + readonly 'page.tabs.workflowRuns': string; + readonly 'run.title': string; + readonly 'run.results': string; + readonly 'run.status.running': string; + readonly 'run.status.failed': string; + readonly 'run.status.completed': string; + readonly 'run.status.aborted': string; + readonly 'run.status.abortedWithoutTime': string; + readonly 'run.status.completedWithMessage': string; + readonly 'run.status.failedAt': string; + readonly 'run.status.completedAt': string; + readonly 'run.status.runningWaitingAtNode': string; + readonly 'run.status.workflowIsRunning': string; + readonly 'run.status.noAdditionalInfo': string; + readonly 'run.status.resultsWillBeDisplayedHereOnceTheRunIsComplete': string; + readonly 'run.messages.eventTriggered': string; + readonly 'run.pageTitle': string; + readonly 'run.variables': string; + readonly 'run.inputs': string; + readonly 'run.logs.title': string; + readonly 'run.logs.viewLogs': string; + readonly 'run.logs.noLogsAvailable': string; + readonly 'run.abort.button': string; + readonly 'run.abort.title': string; + readonly 'run.abort.completed.title': string; + readonly 'run.abort.completed.message': string; + readonly 'run.abort.warning': string; + readonly 'run.retrigger': string; + readonly 'run.viewVariables': string; + readonly 'run.suggestedNextWorkflow': string; + readonly 'run.suggestedNextWorkflows': string; + readonly 'workflow.details': string; + readonly 'workflow.progress': string; + readonly 'workflow.errors.retriggerFailed': string; + readonly 'workflow.errors.abortFailed': string; + readonly 'workflow.errors.abortFailedWithReason': string; + readonly 'workflow.errors.failedToLoadDetails': string; + readonly 'workflow.status.available': string; + readonly 'workflow.status.unavailable': string; + readonly 'workflow.successRatio': string; + readonly 'workflow.definition': string; + readonly 'workflow.inputSchema': string; + readonly 'workflow.inputSchemaDescription': string; + readonly 'workflow.successRatioDescription': string; + readonly 'workflow.runSuccess': string; + readonly 'workflow.ofTotal': string; + readonly 'workflow.statsSuccess': string; + readonly 'workflow.statsFailed': string; + readonly 'workflow.unavailable.title': string; + readonly 'workflow.unavailable.runTooltip': string; + readonly 'workflow.unavailable.requestFailed': string; + readonly 'workflow.unavailable.statusCodeLine': string; + readonly 'workflow.unavailable.statusTextLine': string; + readonly 'workflow.fields.description': string; + readonly 'workflow.fields.version': string; + readonly 'workflow.fields.workflowId': string; + readonly 'workflow.fields.duration': string; + readonly 'workflow.fields.entity': string; + readonly 'workflow.fields.runStatus': string; + readonly 'workflow.fields.started': string; + readonly 'workflow.fields.workflowStatus': string; + readonly 'workflow.fields.runBy': string; + readonly 'workflow.fields.workflow': string; + readonly 'workflow.fields.averageDuration': string; + readonly 'workflow.fields.workflowIdCopy': string; + readonly 'workflow.fields.workflowIdCopied': string; + readonly 'workflow.messages.areYouSureYouWantToRunThisWorkflow': string; + readonly 'workflow.messages.userNotAuthorizedExecute': string; + readonly 'workflow.messages.workflowDown': string; + readonly 'workflow.buttons.run': string; + readonly 'workflow.buttons.runAsEvent': string; + readonly 'workflow.buttons.running': string; + readonly 'workflow.buttons.runWorkflow': string; + readonly 'workflow.buttons.runAgain': string; + readonly 'workflow.buttons.entireWorkflow': string; + readonly 'workflow.buttons.fromFailurePoint': string; + readonly 'workflow.buttons.runFailedAgain': string; + readonly 'messages.noDataAvailable': string; + readonly 'messages.noVariablesFound': string; + readonly 'messages.noInputSchemaWorkflow': string; + readonly 'messages.workflowInstanceNoInputs': string; + readonly 'messages.missingJsonSchema.title': string; + readonly 'messages.missingJsonSchema.message': string; + readonly 'messages.additionalDetailsAboutThisErrorAreNotAvailable': string; + readonly 'tooltips.completed': string; + readonly 'tooltips.aborted': string; + readonly 'tooltips.pending': string; + readonly 'tooltips.active': string; + readonly 'tooltips.userNotAuthorizedExecute': string; + readonly 'tooltips.workflowDown': string; + readonly 'tooltips.suspended': string; + readonly 'tooltips.userNotAuthorizedAbort': string; + readonly 'reviewStep.hiddenFieldsNote': string; + readonly 'reviewStep.showHiddenParameters': string; + readonly 'permissions.accessDenied': string; + readonly 'permissions.accessDeniedDescription': string; + readonly 'permissions.requiredPermission': string; + readonly 'permissions.contactAdmin': string; + readonly 'permissions.missingOwnership': string; + readonly 'permissions.notYourRun': string; + readonly 'alerts.duplicateWorkflowIds.message': string; + readonly 'alerts.duplicateWorkflowIds.learnMore': string; + readonly 'emptyState.workflows.title': string; + readonly 'emptyState.workflows.description': string; + readonly 'emptyState.workflows.viewDocumentation': string; + readonly 'emptyState.runs.title': string; + readonly 'emptyState.runs.description': string; + readonly 'emptyState.runs.runWorkflow': string; + readonly 'emptyState.illustrationAlt': string; + readonly 'stepperObjectField.error': string; + readonly 'formDecorator.error': string; + readonly 'samlSso.body': string; + readonly 'samlSso.title': string; + readonly 'samlSso.reauthorizeButton': string; + readonly 'samlSso.reauthorizeHint': string; + readonly 'samlSso.fallbackHint': string; + readonly 'aria.close': string; + } +>; + +// @public +export const orchestratorTranslations: TranslationResource<'plugin.orchestrator'>; + +// Warnings were encountered during analysis: +// +// src/components/catalogComponents/CatalogTab.d.ts:12:22 - (ae-undocumented) Missing documentation for "OrchestratorCatalogTab". + +// (No @packageDocumentation comment for this package) +``` diff --git a/workspaces/orchestrator/plugins/orchestrator/report-orchestrator-translations-module.api.md b/workspaces/orchestrator/plugins/orchestrator/report-orchestrator-translations-module.api.md index ca378d5cef4..bca34bde0a1 100644 --- a/workspaces/orchestrator/plugins/orchestrator/report-orchestrator-translations-module.api.md +++ b/workspaces/orchestrator/plugins/orchestrator/report-orchestrator-translations-module.api.md @@ -5,7 +5,7 @@ ```ts import { FrontendModule } from '@backstage/frontend-plugin-api'; -// @alpha +// @public const orchestratorTranslationsModule: FrontendModule; export default orchestratorTranslationsModule; diff --git a/workspaces/orchestrator/plugins/orchestrator/report.api.md b/workspaces/orchestrator/plugins/orchestrator/report.api.md index 064494da8a4..2232d3ff158 100644 --- a/workspaces/orchestrator/plugins/orchestrator/report.api.md +++ b/workspaces/orchestrator/plugins/orchestrator/report.api.md @@ -3,38 +3,219 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackstagePlugin } from '@backstage/core-plugin-api'; +import { AnyApiFactory } from '@backstage/frontend-plugin-api'; +import { AnyRouteRefParams } from '@backstage/frontend-plugin-api'; +import { ApiFactory } from '@backstage/frontend-plugin-api'; +import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api'; import { Entity } from '@backstage/catalog-model'; -import { JSX as JSX_2 } from 'react/jsx-runtime'; +import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api'; +import { ExtensionDataRef } from '@backstage/frontend-plugin-api'; +import { ExtensionInput } from '@backstage/frontend-plugin-api'; +import { FilterPredicate } from '@backstage/filter-predicates'; +import { FrontendModule } from '@backstage/frontend-plugin-api'; +import { IconElement } from '@backstage/frontend-plugin-api'; +import { JSX as JSX_2 } from 'react'; +import { JSXElementConstructor } from 'react'; +import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api'; +import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api'; +import { PathParams } from '@backstage/core-plugin-api'; +import { ReactElement } from 'react'; import { RouteRef } from '@backstage/core-plugin-api'; -import type { SVGProps } from 'react'; +import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api'; +import { SubRouteRef } from '@backstage/core-plugin-api'; import { TranslationRef } from '@backstage/frontend-plugin-api'; import { TranslationResource } from '@backstage/frontend-plugin-api'; // @public -export const IsOrchestratorCatalogTabAvailable: (entity: Entity) => boolean; - -// Warning: (ae-missing-release-tag) "OrchestratorCatalogTab" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const OrchestratorCatalogTab: () => JSX_2.Element; - -// @public -export const OrchestratorIcon: ( - props: SVGProps, -) => JSX_2.Element; - -// @public -export const OrchestratorPage: () => JSX_2.Element; - -// @public -export const orchestratorPlugin: BackstagePlugin< +const _default: OverridableFrontendPlugin< { root: RouteRef; + workflow: SubRouteRef>; + workflowRuns: SubRouteRef>; + workflowInstance: SubRouteRef>; + executeWorkflow: SubRouteRef>; + entityWorkflow: SubRouteRef< + PathParams<'/entity/:namespace/:kind/:name/:workflowId'> + >; + entityInstance: SubRouteRef< + PathParams<'/entity/:namespace/:kind/:name/:workflowId/:instanceId'> + >; }, {}, - {} + { + 'api:orchestrator': OverridableExtensionDefinition<{ + kind: 'api'; + name: undefined; + config: {}; + configInput: {}; + output: ExtensionDataRef; + inputs: {}; + params: < + TApi, + TImpl extends TApi, + TDeps extends { [name in string]: unknown }, + >( + params: ApiFactory, + ) => ExtensionBlueprintParams; + }>; + 'entity-content:orchestrator/workflows': OverridableExtensionDefinition<{ + kind: 'entity-content'; + name: 'workflows'; + config: { + path: string | undefined; + title: string | undefined; + filter: FilterPredicate | undefined; + group: string | false | undefined; + icon: string | undefined; + }; + configInput: { + path?: string | undefined; + title?: string | undefined; + filter?: FilterPredicate | undefined; + group?: string | false | undefined; + icon?: string | undefined; + }; + output: + | ExtensionDataRef + | ExtensionDataRef< + RouteRef_2, + 'core.routing.ref', + { + optional: true; + } + > + | ExtensionDataRef + | ExtensionDataRef< + (entity: Entity) => boolean, + 'catalog.entity-filter-function', + { + optional: true; + } + > + | ExtensionDataRef< + string, + 'catalog.entity-filter-expression', + { + optional: true; + } + > + | ExtensionDataRef + | ExtensionDataRef< + string, + 'catalog.entity-content-group', + { + optional: true; + } + > + | ExtensionDataRef< + string | ReactElement>, + 'catalog.entity-content-icon', + { + optional: true; + } + >; + inputs: {}; + params: { + defaultPath?: [Error: `Use the 'path' param instead`]; + path: string; + defaultTitle?: [Error: `Use the 'title' param instead`]; + title: string; + defaultGroup?: [Error: `Use the 'group' param instead`]; + group?: + | ( + | 'operation' + | 'overview' + | 'documentation' + | 'development' + | 'deployment' + | 'observability' + ) + | (string & {}); + icon?: string | ReactElement; + loader: () => Promise; + routeRef?: RouteRef_2; + filter?: string | FilterPredicate | ((entity: Entity) => boolean); + }; + }>; + 'page:orchestrator': OverridableExtensionDefinition<{ + kind: 'page'; + name: undefined; + config: { + path: string | undefined; + title: string | undefined; + }; + configInput: { + path?: string | undefined; + title?: string | undefined; + }; + output: + | ExtensionDataRef + | ExtensionDataRef + | ExtensionDataRef< + RouteRef_2, + 'core.routing.ref', + { + optional: true; + } + > + | ExtensionDataRef< + string, + 'core.title', + { + optional: true; + } + > + | ExtensionDataRef< + IconElement, + 'core.icon', + { + optional: true; + } + >; + inputs: { + pages: ExtensionInput< + | ConfigurableExtensionDataRef + | ConfigurableExtensionDataRef + | ConfigurableExtensionDataRef< + RouteRef_2, + 'core.routing.ref', + { + optional: true; + } + > + | ConfigurableExtensionDataRef< + string, + 'core.title', + { + optional: true; + } + > + | ConfigurableExtensionDataRef< + IconElement, + 'core.icon', + { + optional: true; + } + >, + { + singleton: false; + optional: false; + internal: false; + } + >; + }; + params: { + path: string; + title?: string; + icon?: IconElement; + loader?: () => Promise; + routeRef?: RouteRef_2; + noHeader?: boolean; + }; + }>; + } >; +export default _default; // @public export const orchestratorTranslationRef: TranslationRef< @@ -231,9 +412,8 @@ export const orchestratorTranslationRef: TranslationRef< // @public export const orchestratorTranslations: TranslationResource<'plugin.orchestrator'>; -// Warnings were encountered during analysis: -// -// src/components/catalogComponents/CatalogTab.d.ts:12:22 - (ae-undocumented) Missing documentation for "OrchestratorCatalogTab". +// @public +export const orchestratorTranslationsModule: FrontendModule; // (No @packageDocumentation comment for this package) ``` diff --git a/workspaces/orchestrator/plugins/orchestrator/src/alpha.ts b/workspaces/orchestrator/plugins/orchestrator/src/alpha.ts new file mode 100644 index 00000000000..0b9bb1f8b7d --- /dev/null +++ b/workspaces/orchestrator/plugins/orchestrator/src/alpha.ts @@ -0,0 +1,17 @@ +/* + * Copyright Red Hat, Inc. + * + * 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. + */ + +export * from './translations'; diff --git a/workspaces/orchestrator/plugins/orchestrator/src/alpha.tsx b/workspaces/orchestrator/plugins/orchestrator/src/index.tsx similarity index 95% rename from workspaces/orchestrator/plugins/orchestrator/src/alpha.tsx rename to workspaces/orchestrator/plugins/orchestrator/src/index.tsx index a6d843eec0a..d6351cf1e2b 100644 --- a/workspaces/orchestrator/plugins/orchestrator/src/alpha.tsx +++ b/workspaces/orchestrator/plugins/orchestrator/src/index.tsx @@ -17,8 +17,8 @@ /** * @packageDocumentation * - * Alpha exports for the Orchestrator plugin (Backstage new frontend system). - * Provides the plugin instance, pages, nav items, entity content, and translation module. + * Orchestrator plugin for the Backstage new frontend system (NFS). + * Provides the plugin instance, pages, entity content, and translation module. */ import { discoveryApiRef, identityApiRef } from '@backstage/core-plugin-api'; @@ -83,7 +83,6 @@ const orchestratorApi = ApiBlueprint.make({ }); /** - * @alpha * @param entity - The entity to check if it has the orchestrator.io/workflows annotation * @returns True if the entity has the orchestrator.io/workflows annotation */ @@ -113,7 +112,7 @@ const orchestratorTranslation = TranslationBlueprint.make({ /** * The Orchestrator plugin for the new frontend system. - * @alpha + * @public */ export default createFrontendPlugin({ pluginId: 'orchestrator', @@ -136,7 +135,7 @@ export default createFrontendPlugin({ * A frontend module that registers Orchestrator translations. * Must be installed separately in the app's features since TranslationBlueprint * is restricted to the app plugin (pluginId: 'app'). - * @alpha + * @public */ export const orchestratorTranslationsModule = createFrontendModule({ pluginId: 'app', diff --git a/workspaces/orchestrator/plugins/orchestrator/src/index.ts b/workspaces/orchestrator/plugins/orchestrator/src/legacyExports.ts similarity index 100% rename from workspaces/orchestrator/plugins/orchestrator/src/index.ts rename to workspaces/orchestrator/plugins/orchestrator/src/legacyExports.ts diff --git a/workspaces/orchestrator/plugins/orchestrator/src/alpha.test.tsx b/workspaces/orchestrator/plugins/orchestrator/src/nfsExports.test.tsx similarity index 92% rename from workspaces/orchestrator/plugins/orchestrator/src/alpha.test.tsx rename to workspaces/orchestrator/plugins/orchestrator/src/nfsExports.test.tsx index ec4edaedf27..7f93a2f8347 100644 --- a/workspaces/orchestrator/plugins/orchestrator/src/alpha.test.tsx +++ b/workspaces/orchestrator/plugins/orchestrator/src/nfsExports.test.tsx @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import plugin, { orchestratorTranslationsModule } from './alpha'; +import plugin, { orchestratorTranslationsModule } from './index'; import translationsModuleDefault from './orchestratorTranslationsModuleExport'; -describe('orchestrator alpha plugin test', () => { +describe('orchestrator NFS plugin test', () => { it('should export a valid frontend plugin', () => { expect(plugin).toBeDefined(); expect(plugin.$$type).toBe('@backstage/FrontendPlugin'); diff --git a/workspaces/orchestrator/plugins/orchestrator/src/orchestratorTranslationsModuleExport.ts b/workspaces/orchestrator/plugins/orchestrator/src/orchestratorTranslationsModuleExport.ts index b82fcb7cfc8..5341e87a1b9 100644 --- a/workspaces/orchestrator/plugins/orchestrator/src/orchestratorTranslationsModuleExport.ts +++ b/workspaces/orchestrator/plugins/orchestrator/src/orchestratorTranslationsModuleExport.ts @@ -13,4 +13,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export { orchestratorTranslationsModule as default } from './alpha'; +export { orchestratorTranslationsModule as default } from './index';