Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions workspaces/app-defaults/.changeset/graduate-nfs-exports.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
'@red-hat-developer-hub/backstage-plugin-app-defaults': major
'@red-hat-developer-hub/backstage-plugin-app-auth': major
'@red-hat-developer-hub/backstage-plugin-app-integrations': major
'@red-hat-developer-hub/backstage-plugin-app-react': major
---

**BREAKING**: Graduate NFS exports from `/alpha` to the main entry point.

- All public APIs previously available from `./alpha` are now exported from the
package root (`.`). Update imports:

```diff
-import { appAuthModule } from '@red-hat-developer-hub/backstage-plugin-app-auth/alpha';
+import { appAuthModule } from '@red-hat-developer-hub/backstage-plugin-app-auth';

-import { appIntegrationsModule } from '@red-hat-developer-hub/backstage-plugin-app-integrations/alpha';
+import { appIntegrationsModule } from '@red-hat-developer-hub/backstage-plugin-app-integrations';

-import { appDrawerModule, AppDrawerContentBlueprint } from '@red-hat-developer-hub/backstage-plugin-app-react/alpha';
+import { appDrawerModule, AppDrawerContentBlueprint } from '@red-hat-developer-hub/backstage-plugin-app-react';

-import { appDefaultsModule } from '@red-hat-developer-hub/backstage-plugin-app-defaults/alpha';
+import { appDefaultsModule } from '@red-hat-developer-hub/backstage-plugin-app-defaults';
```

- The `./alpha` subpath has been removed from packages without translations
(`app-defaults`, `app-integrations`, `app-react`). Only `app-auth` retains
`./alpha` for translation exports (`signInTranslationRef`).

- `@red-hat-developer-hub/backstage-plugin-app-react` adds a new `./legacy`
subpath exporting the direct-use OFS components (`useAppDrawer`,
`ApplicationDrawer`, `DrawerPanel`) for backward compatibility.

- `@red-hat-developer-hub/backstage-plugin-app-react` adds a new
`./app-drawer-module` subpath that default-exports `appDrawerModule`
(`pluginId: 'app'`) for Scalprum / module-federation dynamic loading.

- All `pluginId: 'app'` modules are now re-exported as the default export from
their respective packages.
6 changes: 3 additions & 3 deletions workspaces/app-defaults/packages/app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

import { createApp } from '@backstage/frontend-defaults';
import catalogPlugin from '@backstage/plugin-catalog/alpha';
import { appAuthModule } from '@red-hat-developer-hub/backstage-plugin-app-auth/alpha';
import { appIntegrationsModule } from '@red-hat-developer-hub/backstage-plugin-app-integrations/alpha';
import { appDrawerModule } from '@red-hat-developer-hub/backstage-plugin-app-react/alpha';
import { appAuthModule } from '@red-hat-developer-hub/backstage-plugin-app-auth';
import { appIntegrationsModule } from '@red-hat-developer-hub/backstage-plugin-app-integrations';
import { appDrawerModule } from '@red-hat-developer-hub/backstage-plugin-app-react';
import {
globalHeaderModule,
globalHeaderTranslationsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import { createFrontendModule } from '@backstage/frontend-plugin-api';
import { AppDrawerContentBlueprint } from '@red-hat-developer-hub/backstage-plugin-app-react/alpha';
import { AppDrawerContentBlueprint } from '@red-hat-developer-hub/backstage-plugin-app-react';
import { GlobalHeaderMenuItemBlueprint } from '@red-hat-developer-hub/backstage-plugin-global-header/alpha';
import {
ChatDrawerContent,
Expand Down
4 changes: 2 additions & 2 deletions workspaces/app-defaults/plugins/app-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.2.0",
"license": "Apache-2.0",
"description": "RHDH sign-in page and OIDC/Auth0/SAML frontend auth APIs for the new frontend system",
"main": "src/alpha.ts",
"types": "src/alpha.ts",
"main": "src/index.ts",
"types": "src/index.ts",
"exports": {
".": "./src/index.ts",
"./alpha": "./src/alpha.ts",
Expand Down
34 changes: 0 additions & 34 deletions workspaces/app-defaults/plugins/app-auth/report-alpha.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,8 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { ApiRef } from '@backstage/core-plugin-api';
import { BackstageIdentityApi } from '@backstage/core-plugin-api';
import { FrontendModule } from '@backstage/frontend-plugin-api';
import { OAuthApi } from '@backstage/core-plugin-api';
import { OpenIdConnectApi } from '@backstage/core-plugin-api';
import { ProfileInfoApi } from '@backstage/core-plugin-api';
import { SessionApi } from '@backstage/core-plugin-api';
import { TranslationRef } from '@backstage/frontend-plugin-api';

// @alpha
const appAuthModule: FrontendModule;
export { appAuthModule };
export default appAuthModule;

// @alpha
export const auth0AuthApiRef: ApiRef<CustomAuthApiRefType>;

// @alpha
export type CustomAuthApiRefType = OAuthApi &
OpenIdConnectApi &
ProfileInfoApi &
BackstageIdentityApi &
SessionApi;

// @alpha
export const keycloakAuthApiRef: ApiRef<CustomAuthApiRefType>;

// @alpha
export const oidcAuthApiRef: ApiRef<CustomAuthApiRefType>;

// @alpha
export const pingfederateAuthApiRef: ApiRef<CustomAuthApiRefType>;

// @alpha
export const samlAuthApiRef: ApiRef<CustomAuthApiRefType>;

// @alpha
export const signInTranslationRef: TranslationRef<
'plugin.app-auth.sign-in',
Expand Down
35 changes: 33 additions & 2 deletions workspaces/app-defaults/plugins/app-auth/report.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,38 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { ApiRef } from '@backstage/core-plugin-api';
import { BackstageIdentityApi } from '@backstage/core-plugin-api';
import { FrontendModule } from '@backstage/frontend-plugin-api';
import { OAuthApi } from '@backstage/core-plugin-api';
import { OpenIdConnectApi } from '@backstage/core-plugin-api';
import { ProfileInfoApi } from '@backstage/core-plugin-api';
import { SessionApi } from '@backstage/core-plugin-api';

// @public
const appAuthModule: FrontendModule;
export { appAuthModule };
export default appAuthModule;

// @public
export const auth0AuthApiRef: ApiRef<CustomAuthApiRefType>;

// @public
export type CustomAuthApiRefType = OAuthApi &
OpenIdConnectApi &
ProfileInfoApi &
BackstageIdentityApi &
SessionApi;

// @public
export const keycloakAuthApiRef: ApiRef<CustomAuthApiRefType>;

// @public
export const oidcAuthApiRef: ApiRef<CustomAuthApiRefType>;

// @public
export const pingfederateAuthApiRef: ApiRef<CustomAuthApiRefType>;

// @public
const _default: {};
export default _default;
export const samlAuthApiRef: ApiRef<CustomAuthApiRefType>;
```
12 changes: 6 additions & 6 deletions workspaces/app-defaults/plugins/app-auth/src/AuthApiRefs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
/**
* Combined surface for custom RHDH auth APIs backed by `OAuth2` in the app module.
*
* @alpha
* @public
*/
export type CustomAuthApiRefType = OAuthApi &
OpenIdConnectApi &
Expand All @@ -38,7 +38,7 @@ export type CustomAuthApiRefType = OAuthApi &
/**
* OIDC auth API for the RHDH multi-provider sign-in page.
*
* @alpha
* @public
*/
export const oidcAuthApiRef: ApiRef<CustomAuthApiRefType> = createApiRef({
id: 'internal.auth.oidc',
Expand All @@ -47,7 +47,7 @@ export const oidcAuthApiRef: ApiRef<CustomAuthApiRefType> = createApiRef({
/**
* Keycloak auth API for the RHDH multi-provider sign-in page (OIDC-backed).
*
* @alpha
* @public
*/
export const keycloakAuthApiRef: ApiRef<CustomAuthApiRefType> = createApiRef({
id: 'internal.auth.keycloak',
Expand All @@ -56,7 +56,7 @@ export const keycloakAuthApiRef: ApiRef<CustomAuthApiRefType> = createApiRef({
/**
* PingFederate auth API for the RHDH multi-provider sign-in page (OIDC-backed).
*
* @alpha
* @public
*/
export const pingfederateAuthApiRef: ApiRef<CustomAuthApiRefType> =
createApiRef({
Expand All @@ -66,7 +66,7 @@ export const pingfederateAuthApiRef: ApiRef<CustomAuthApiRefType> =
/**
* Auth0 auth API for the RHDH multi-provider sign-in page.
*
* @alpha
* @public
*/
export const auth0AuthApiRef: ApiRef<CustomAuthApiRefType> = createApiRef({
id: 'internal.auth.auth0',
Expand All @@ -75,7 +75,7 @@ export const auth0AuthApiRef: ApiRef<CustomAuthApiRefType> = createApiRef({
/**
* SAML auth API for the RHDH multi-provider sign-in page.
*
* @alpha
* @public
*/
export const samlAuthApiRef: ApiRef<CustomAuthApiRefType> = createApiRef({
id: 'internal.auth.saml',
Expand Down
10 changes: 1 addition & 9 deletions workspaces/app-defaults/plugins/app-auth/src/alpha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,9 @@
*/

/**
* New Frontend System: RHDH sign-in and auth API extensions for the app plugin.
*
* The sign-in page UI is not re-exported here — it loads via
* {@link appAuthModule}'s SignInPageBlueprint loader so MUI / core-components
* stay off the Module Federation alpha sync chunk.
* Alpha exports: sign-in page translations.
*
* @packageDocumentation
*/

export { appAuthModule } from './appAuthModule';
export * from './AuthApiRefs';
export * from './translations/signIn';

export { appAuthModule as default } from './appAuthModule';
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ const signInPage = SignInPageBlueprint.make({
* RHDH app sign-in page plus OIDC, Keycloak, PingFederate, Auth0, and SAML OAuth2 frontend APIs (`pluginId: app`).
* Default-export this module for dynamic frontend loading.
*
* @alpha
* @public
*/
export const appAuthModule = createFrontendModule({
pluginId: 'app',
Expand Down
9 changes: 6 additions & 3 deletions workspaces/app-defaults/plugins/app-auth/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@
*/

/**
* Stub package root export for API reporting and bundlers. This plugin targets
* the new frontend system only; use `./alpha` for public APIs.
* RHDH sign-in and auth API extensions for the app plugin.
*
* @packageDocumentation
*/
export default {};

export { appAuthModule } from './appAuthModule';
export * from './AuthApiRefs';

export { appAuthModule as default } from './appAuthModule';
10 changes: 3 additions & 7 deletions workspaces/app-defaults/plugins/app-defaults/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@
"name": "@red-hat-developer-hub/backstage-plugin-app-defaults",
"version": "0.0.3",
"license": "Apache-2.0",
"description": "Empty RHDH app module for the new frontend system",
"main": "src/alpha.ts",
"types": "src/alpha.ts",
"description": "RHDH app module for the new frontend system",
"main": "src/index.ts",
"types": "src/index.ts",
"exports": {
".": "./src/index.ts",
"./alpha": "./src/alpha.ts",
"./package.json": "./package.json"
},
"typesVersions": {
"*": {
"alpha": [
"src/alpha.ts"
],
"package.json": [
"package.json"
]
Expand Down
7 changes: 5 additions & 2 deletions workspaces/app-defaults/plugins/app-defaults/report.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { FrontendModule } from '@backstage/frontend-plugin-api';

// @public
const _default: {};
export default _default;
const appDefaultsModule: FrontendModule;
export { appDefaultsModule };
export default appDefaultsModule;
```
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
*/

import { createFrontendModule } from '@backstage/frontend-plugin-api';
import { appDrawerExtension } from '@red-hat-developer-hub/backstage-plugin-app-react/alpha';
import { appDrawerExtension } from '@red-hat-developer-hub/backstage-plugin-app-react';

/**
* RHDH app module for `pluginId: 'app'`.
* Provides the application drawer system for dockable panel extensions.
* Default-export this module for dynamic frontend loading.
*
* @alpha
* @public
*/
export const appDefaultsModule = createFrontendModule({
pluginId: 'app',
Expand Down
8 changes: 5 additions & 3 deletions workspaces/app-defaults/plugins/app-defaults/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
*/

/**
* Stub package root export for API reporting and bundlers. This plugin targets
* the new frontend system only; use `./alpha` for public APIs.
* RHDH app module for the new frontend system.
*
* @packageDocumentation
*/
export default {};

export { appDefaultsModule } from './appDefaultsModule';

export { appDefaultsModule as default } from './appDefaultsModule';
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.1.1",
"license": "Apache-2.0",
"description": "RHDH default SCM integrations and scmAuth wiring for the new frontend system",
"main": "src/alpha.ts",
"types": "src/alpha.ts",
"main": "src/index.ts",
"types": "src/index.ts",
"exports": {
".": "./src/index.ts",
"./alpha": "./src/alpha.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@

```ts
import type { ConfigApi } from '@backstage/core-plugin-api';
import { FrontendModule } from '@backstage/frontend-plugin-api';
import type { OAuthApi } from '@backstage/core-plugin-api';
import { ScmAuthApi } from '@backstage/integration-react';

// @alpha
const appIntegrationsModule: FrontendModule;
export { appIntegrationsModule };
export default appIntegrationsModule;

// @alpha
export function mergeScmAuthFromDeps(deps: ScmAuthFactoryDeps): ScmAuthApi;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { FrontendModule } from '@backstage/frontend-plugin-api';

// @public
const _default: {};
export default _default;
const appIntegrationsModule: FrontendModule;
export { appIntegrationsModule };
export default appIntegrationsModule;
```
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@
*/

/**
* New Frontend System: default SCM integrations APIs for the app plugin.
* Alpha exports: SCM auth merge utility.
*
* @packageDocumentation
*/

export { appIntegrationsModule } from './appIntegrationsModule';
export { mergeScmAuthFromDeps } from './mergeScmAuthFromDeps';
export type { ScmAuthFactoryDeps } from './mergeScmAuthFromDeps';

export { appIntegrationsModule as default } from './appIntegrationsModule';
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const scmAuthApi = ApiBlueprint.make({
* RHDH-style `scmIntegrationsApiRef` + `scmAuthApiRef` for `pluginId: 'app'`.
* Default-export this module for dynamic frontend loading.
*
* @alpha
* @public
*/
export const appIntegrationsModule = createFrontendModule({
pluginId: 'app',
Expand Down
Loading
Loading