From a2f3718c8b2ab882ee54a42e1c351c277a1bd424 Mon Sep 17 00:00:00 2001 From: benjdlambert Date: Tue, 9 Sep 2025 10:55:13 +0200 Subject: [PATCH] chore: added tdev app Signed-off-by: benjdlambert Signed-off-by: benjdlambert --- plugins/auth/dev/index.tsx | 13 ++++++++++++- plugins/auth/package.json | 16 +++++++++++----- plugins/auth/src/index.ts | 2 +- yarn.lock | 37 +++++++++++-------------------------- 4 files changed, 35 insertions(+), 33 deletions(-) diff --git a/plugins/auth/dev/index.tsx b/plugins/auth/dev/index.tsx index 04598f0f2e..b0762416c6 100644 --- a/plugins/auth/dev/index.tsx +++ b/plugins/auth/dev/index.tsx @@ -14,4 +14,15 @@ * limitations under the License. */ -// todo +import { createApp } from '@backstage/frontend-defaults'; +import { createRoot } from 'react-dom/client'; + +import plugin from '../src'; + +const app = createApp({ + features: [plugin], +}); + +const container = document.getElementById('root'); +const root = createRoot(container!); +root.render(app.createRoot()); diff --git a/plugins/auth/package.json b/plugins/auth/package.json index 9d3fe7b197..a623185f42 100644 --- a/plugins/auth/package.json +++ b/plugins/auth/package.json @@ -51,24 +51,30 @@ "@backstage/errors": "workspace:^", "@backstage/frontend-plugin-api": "workspace:^", "@backstage/theme": "workspace:^", - "@material-ui/core": "^4.9.13", + "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", - "@material-ui/lab": "4.0.0-alpha.57", + "@material-ui/lab": "4.0.0-alpha.61", "react-use": "^17.2.4" }, "peerDependencies": { - "react": "^17.0.0", - "react-router-dom": "^6.0.0" + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0", + "react-router-dom": "^6.3.0" }, "devDependencies": { "@backstage/cli": "workspace:^", "@backstage/core-app-api": "workspace:^", "@backstage/dev-utils": "workspace:^", + "@backstage/frontend-defaults": "workspace:^", "@backstage/test-utils": "workspace:^", "@testing-library/jest-dom": "^6.0.0", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.0.0", - "msw": "^1.0.0" + "@types/react": "^18.0.0", + "msw": "^1.0.0", + "react": "^18.0.2", + "react-dom": "^18.0.2" }, "files": [ "dist" diff --git a/plugins/auth/src/index.ts b/plugins/auth/src/index.ts index d507bac202..31460b3e9d 100644 --- a/plugins/auth/src/index.ts +++ b/plugins/auth/src/index.ts @@ -13,5 +13,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export { authPlugin, AuthRouter } from './plugin'; +export { default } from './plugin'; export { rootRouteRef } from './routes'; diff --git a/yarn.lock b/yarn.lock index fd631a0fe0..4d15a81ad2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4275,20 +4275,26 @@ __metadata: "@backstage/core-plugin-api": "workspace:^" "@backstage/dev-utils": "workspace:^" "@backstage/errors": "workspace:^" + "@backstage/frontend-defaults": "workspace:^" "@backstage/frontend-plugin-api": "workspace:^" "@backstage/test-utils": "workspace:^" "@backstage/theme": "workspace:^" - "@material-ui/core": "npm:^4.9.13" + "@material-ui/core": "npm:^4.12.2" "@material-ui/icons": "npm:^4.9.1" - "@material-ui/lab": "npm:4.0.0-alpha.57" + "@material-ui/lab": "npm:4.0.0-alpha.61" "@testing-library/jest-dom": "npm:^6.0.0" "@testing-library/react": "npm:^14.0.0" "@testing-library/user-event": "npm:^14.0.0" + "@types/react": "npm:^18.0.0" msw: "npm:^1.0.0" + react: "npm:^18.0.2" + react-dom: "npm:^18.0.2" react-use: "npm:^17.2.4" peerDependencies: - react: ^17.0.0 - react-router-dom: ^6.0.0 + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + react-router-dom: ^6.3.0 languageName: unknown linkType: soft @@ -10494,27 +10500,6 @@ __metadata: languageName: node linkType: hard -"@material-ui/lab@npm:4.0.0-alpha.57": - version: 4.0.0-alpha.57 - resolution: "@material-ui/lab@npm:4.0.0-alpha.57" - dependencies: - "@babel/runtime": "npm:^7.4.4" - "@material-ui/utils": "npm:^4.11.2" - clsx: "npm:^1.0.4" - prop-types: "npm:^15.7.2" - react-is: "npm:^16.8.0 || ^17.0.0" - peerDependencies: - "@material-ui/core": ^4.9.10 - "@types/react": ^16.8.6 || ^17.0.0 - react: ^16.8.0 || ^17.0.0 - react-dom: ^16.8.0 || ^17.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/0142df7864fd8307a577a7e98e5c198bc71225a1abfe186abb3f5bb6d15bfcf99cf64204d43ea1a9be6723907135e1773a63dc41605b84c37596a02015f3e3b4 - languageName: node - linkType: hard - "@material-ui/lab@npm:4.0.0-alpha.61, @material-ui/lab@npm:^4.0.0-alpha.57, @material-ui/lab@npm:^4.0.0-alpha.60, @material-ui/lab@npm:^4.0.0-alpha.61": version: 4.0.0-alpha.61 resolution: "@material-ui/lab@npm:4.0.0-alpha.61" @@ -10650,7 +10635,7 @@ __metadata: languageName: node linkType: hard -"@material-ui/utils@npm:^4.11.2, @material-ui/utils@npm:^4.11.3": +"@material-ui/utils@npm:^4.11.3": version: 4.11.3 resolution: "@material-ui/utils@npm:4.11.3" dependencies: