From d0213c3c504335f6594af93e9049c0ba28cbdd14 Mon Sep 17 00:00:00 2001 From: "Christiane (Tina) Heiligers" Date: Thu, 3 Nov 2022 09:30:39 -0700 Subject: [PATCH] Removes unused exported constants --- packages/core/apps/core-apps-server-internal/index.ts | 8 +------- .../core/apps/core-apps-server-internal/src/core_app.ts | 2 ++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/core/apps/core-apps-server-internal/index.ts b/packages/core/apps/core-apps-server-internal/index.ts index 88f0106865856..7a28e9f9d2f87 100644 --- a/packages/core/apps/core-apps-server-internal/index.ts +++ b/packages/core/apps/core-apps-server-internal/index.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import Path from 'path'; + export { CoreAppsService } from './src'; export type { InternalCoreAppsServiceRequestHandlerContext, @@ -13,9 +13,3 @@ export type { } from './src'; // only used by integration tests export { FileHashCache, registerRouteForBundle } from './src'; -// After the package is built and bootstrap extracts files to bazel-bin, node modules structure exposes assets outside of the src folder -// These constants reference locations in the hierarchy after the build is done -export const ASSETS_DIR = Path.resolve(__dirname, '../assets'); -export const FAVICONS_DIR = `${ASSETS_DIR}/favicons`; -export const THEMES_DIR = `${ASSETS_DIR}`; -export const FONTS_DIR = `${ASSETS_DIR}/fonts`; diff --git a/packages/core/apps/core-apps-server-internal/src/core_app.ts b/packages/core/apps/core-apps-server-internal/src/core_app.ts index 7caa79005c98b..3e094fab889a6 100644 --- a/packages/core/apps/core-apps-server-internal/src/core_app.ts +++ b/packages/core/apps/core-apps-server-internal/src/core_app.ts @@ -201,6 +201,8 @@ export class CoreAppsService { }); } + // After the package is built and bootstrap extracts files to bazel-bin, + // assets are exposed at the root of the package and in the package's node_modules dir private registerStaticDirs(core: InternalCoreSetup | InternalCorePreboot) { core.http.registerStaticDir( '/ui/{path*}',