diff --git a/.changeset/remove-createPublicSignInApp.md b/.changeset/remove-createPublicSignInApp.md new file mode 100644 index 0000000000..2d80d4790b --- /dev/null +++ b/.changeset/remove-createPublicSignInApp.md @@ -0,0 +1,5 @@ +--- +'@backstage/frontend-defaults': minor +--- + +**BREAKING**: Removed the deprecated `createPublicSignInApp` function. Use `createApp` from `@backstage/frontend-defaults` with `appModulePublicSignIn` from `@backstage/plugin-app/alpha` instead. diff --git a/docs/tutorials/enable-public-entry.md b/docs/tutorials/enable-public-entry.md index e430768785..a1321dca05 100644 --- a/docs/tutorials/enable-public-entry.md +++ b/docs/tutorials/enable-public-entry.md @@ -107,10 +107,11 @@ If your app uses the new frontend system, you can still use the public entry poi ```tsx title="in packages/app/src/index-public-experimental.tsx" import ReactDOM from 'react-dom/client'; import { signInPageModule } from './overrides/SignInPage'; -import { createPublicSignInApp } from '@backstage/frontend-defaults'; +import { appModulePublicSignIn } from '@backstage/plugin-app/alpha'; +import { createApp } from '@backstage/frontend-defaults'; -const app = createPublicSignInApp({ - features: [signInPageModule], +const app = createApp({ + features: [signInPageModule, appModulePublicSignIn], }); ReactDOM.createRoot(document.getElementById('root')!).render(app.createRoot()); diff --git a/packages/frontend-defaults/report.api.md b/packages/frontend-defaults/report.api.md index 75392d2dc1..bc620c95a3 100644 --- a/packages/frontend-defaults/report.api.md +++ b/packages/frontend-defaults/report.api.md @@ -37,11 +37,6 @@ export interface CreateAppOptions { features?: (FrontendFeature | FrontendFeatureLoader)[]; } -// @public @deprecated (undocumented) -export function createPublicSignInApp(options?: CreateAppOptions): { - createRoot(): JSX_2; -}; - // @public (undocumented) export function discoverAvailableFeatures(config: Config): { features: (FrontendFeature | FrontendFeatureLoader)[]; diff --git a/packages/frontend-defaults/src/createPublicSignInApp.test.tsx b/packages/frontend-defaults/src/createPublicSignInApp.test.tsx deleted file mode 100644 index 398dbcbf4a..0000000000 --- a/packages/frontend-defaults/src/createPublicSignInApp.test.tsx +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2024 The Backstage Authors - * - * 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 { createFrontendModule } from '@backstage/frontend-plugin-api'; -import { SignInPageBlueprint } from '@backstage/plugin-app-react'; -import { render, screen, waitFor } from '@testing-library/react'; -import { useEffect } from 'react'; -import { createPublicSignInApp } from './createPublicSignInApp'; -import { mockApis } from '@backstage/test-utils'; - -describe('createPublicSignInApp', () => { - beforeEach(() => { - jest.resetAllMocks(); - }); - - it('should render a sign-in page', async () => { - const app = createPublicSignInApp({ - advanced: { - configLoader: async () => ({ config: mockApis.config() }), - }, - features: [ - createFrontendModule({ - pluginId: 'app', - extensions: [ - SignInPageBlueprint.make({ - params: { - loader: async () => () =>