From 89f03fa0447e4d24e025127e0c770319f50e9ad3 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 5 Sep 2023 16:42:05 +0200 Subject: [PATCH] cli,frontend-app-api: cleanup Signed-off-by: Patrik Oldsberg --- packages/app-next/app-config.yaml | 4 +--- packages/cli/package.json | 1 - packages/cli/src/lib/bundler/server.ts | 2 -- packages/cli/src/lib/bundler/types.ts | 1 - packages/frontend-app-api/src/createApp.tsx | 2 +- .../src/discover/discover-plugins.d.ts | 22 ------------------- .../index.ts => wiring/discovery.ts} | 0 yarn.lock | 8 ------- 8 files changed, 2 insertions(+), 38 deletions(-) delete mode 100644 packages/frontend-app-api/src/discover/discover-plugins.d.ts rename packages/frontend-app-api/src/{discover/index.ts => wiring/discovery.ts} (100%) diff --git a/packages/app-next/app-config.yaml b/packages/app-next/app-config.yaml index 182cda75e7..c798420c39 100644 --- a/packages/app-next/app-config.yaml +++ b/packages/app-next/app-config.yaml @@ -1,8 +1,6 @@ app: experimental: - # packages: 'all' # ✨ - packages: 'all' - + packages: 'all' # ✨ # scmAuthExtension: >- # createScmAuthExtension({ diff --git a/packages/cli/package.json b/packages/cli/package.json index 7889f3ab17..5999a55fc1 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -133,7 +133,6 @@ "webpack": "^5.70.0", "webpack-dev-server": "^4.7.3", "webpack-node-externals": "^3.0.0", - "webpack-virtual-modules": "^0.5.0", "yaml": "^2.0.0", "yml-loader": "^2.1.0", "yn": "^4.0.0", diff --git a/packages/cli/src/lib/bundler/server.ts b/packages/cli/src/lib/bundler/server.ts index f566c268f5..afd7a015bf 100644 --- a/packages/cli/src/lib/bundler/server.ts +++ b/packages/cli/src/lib/bundler/server.ts @@ -109,7 +109,6 @@ export async function serveBundle(options: ServeOptions) { } const { frontendConfig, fullConfig } = cliConfig; - // TODO: proper const url = resolveBaseUrl(frontendConfig); const host = @@ -133,7 +132,6 @@ export async function serveBundle(options: ServeOptions) { isDev: true, baseUrl: url, frontendConfig, - frontendAppConfigs: [], getFrontendAppConfigs: () => { return latestFrontendAppConfigs; }, diff --git a/packages/cli/src/lib/bundler/types.ts b/packages/cli/src/lib/bundler/types.ts index 67cdd80531..414414fa81 100644 --- a/packages/cli/src/lib/bundler/types.ts +++ b/packages/cli/src/lib/bundler/types.ts @@ -23,7 +23,6 @@ export type BundlingOptions = { isDev: boolean; frontendConfig: Config; getFrontendAppConfigs(): AppConfig[]; - frontendAppConfigs: AppConfig[]; baseUrl: URL; parallelism?: number; additionalEntryPoints?: string[]; diff --git a/packages/frontend-app-api/src/createApp.tsx b/packages/frontend-app-api/src/createApp.tsx index 988681e6a9..c50b507642 100644 --- a/packages/frontend-app-api/src/createApp.tsx +++ b/packages/frontend-app-api/src/createApp.tsx @@ -32,7 +32,7 @@ import { } from './wiring/parameters'; import { RoutingProvider } from './routing/RoutingContext'; import { RouteRef } from '@backstage/core-plugin-api'; -import { getAvailablePlugins } from './discover'; +import { getAvailablePlugins } from './wiring/discovery'; /** @public */ export function createApp(options: { plugins: BackstagePlugin[] }): { diff --git a/packages/frontend-app-api/src/discover/discover-plugins.d.ts b/packages/frontend-app-api/src/discover/discover-plugins.d.ts deleted file mode 100644 index a5af550743..0000000000 --- a/packages/frontend-app-api/src/discover/discover-plugins.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2023 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. - */ -declare module '__backstage-autodetected-plugins__' { - type DetectedModule = { - name: string; - module: Record; - }; - const modules: Array<{ name: string; module: Record }>; -} diff --git a/packages/frontend-app-api/src/discover/index.ts b/packages/frontend-app-api/src/wiring/discovery.ts similarity index 100% rename from packages/frontend-app-api/src/discover/index.ts rename to packages/frontend-app-api/src/wiring/discovery.ts diff --git a/yarn.lock b/yarn.lock index 3812cd2fd6..3e6f96ef56 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3882,7 +3882,6 @@ __metadata: webpack: ^5.70.0 webpack-dev-server: ^4.7.3 webpack-node-externals: ^3.0.0 - webpack-virtual-modules: ^0.5.0 yaml: ^2.0.0 yml-loader: ^2.1.0 yn: ^4.0.0 @@ -42820,13 +42819,6 @@ __metadata: languageName: node linkType: hard -"webpack-virtual-modules@npm:^0.5.0": - version: 0.5.0 - resolution: "webpack-virtual-modules@npm:0.5.0" - checksum: 22b59257b55c89d11ae295b588b683ee9fdf3aeb591bc7b6f88ac1d69cb63f4fcb507666ea986866dfae161a1fa534ad6fb4e2ea91bbcd0a6d454368d7d4c64b - languageName: node - linkType: hard - "webpack@npm:^5, webpack@npm:^5.70.0": version: 5.88.2 resolution: "webpack@npm:5.88.2"