UNPKG

dt-app

Version:

The Dynatrace App Toolkit is a tool you can use from your command line to create, develop, and deploy apps on your Dynatrace environment.

36 lines (35 loc) 1.76 kB
import type { Diagnostic } from '../diagnostic'; import type { CompilationResult } from '../compile'; import type { ResolvedCliOptions, UiFilePaths } from '../../utils/config/cli-options'; import type { ViteBuildResult } from './definitions'; /** * Builds the UI using Vite and handles the results. * This is the main entry point for Vite-based UI builds. * * @param cliOptions - Resolved CLI options * @param isDev - Whether this is a development build * @param uiFilePaths - Paths for UI source files * @param normalizedBaseHref - Normalized base URL with trailing slash * @param typeCheckDiagnostics - Diagnostics from type checking * @returns Compilation result with diagnostics and timing */ export declare function handleViteBuildResults(cliOptions: ResolvedCliOptions, isDev: boolean, uiFilePaths: UiFilePaths, normalizedBaseHref: string, typeCheckDiagnostics: Diagnostic[]): Promise<CompilationResult>; /** * Resolves the main JavaScript and CSS bundle file names from the Vite build result. * This function handles both single and multiple output formats from Vite. * * @param result - The result from the Vite build, which can be a single output or an array of outputs * @returns An object containing the main JavaScript bundle file name and the main CSS bundle file name (if any) */ export declare function resolveUiEntryAssets(result: ViteBuildResult): { mainJsBundle: string; cssBundles: string[]; }; /** * Extracts the module IDs from the Vite Rolldown output. * These IDs represent all the source files that were bundled. * * @param uiResult - The Rolldown output from Vite build * @returns An array of module IDs (file paths) */ export declare function extractViteModuleIds(uiResult: ViteBuildResult): string[];