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.
35 lines (34 loc) • 1.53 kB
TypeScript
import type { ResolvedCliOptions } from '../../utils/config/cli-options';
import type { FileMap } from '../../create-project/utils/file-map';
type InjectOptions = {
/** Default `'head'` */
location?: 'head' | 'body';
/** Default `false` */
defer?: boolean;
};
export type HtmlBuilder = {
setAppName: (appName: string) => HtmlBuilder;
setBaseURL: (url: string) => HtmlBuilder;
setRootID: (rootId: string) => HtmlBuilder;
injectScript: (url: string, options?: InjectOptions) => HtmlBuilder;
addInjectionMarker: () => HtmlBuilder;
injectScriptWithContent: (content: string, location?: 'head' | 'body') => HtmlBuilder;
injectStylesheet: (url: string) => HtmlBuilder;
build: () => string;
};
/**
* Utility for building the index entry html file and injecting dependencies into
* it.
*/
export declare function getIndexHtmlBuilder(userHtmlPath?: string): HtmlBuilder;
/**
* Populates the created index HTML with all the content needed (css, scripts)
* @param options The CLI options we are getting
* @param uiFiles The filemap containing ui files
* @param normalizedBaseHref The baseHref in normalized format
* @param webSocketUrlScript The url script of the websocket
* @param sdkShimScript The script of the sdk
* @returns The HTML index page in Buffer format
*/
export declare function getHTMLContent(options: ResolvedCliOptions, uiFiles: FileMap, normalizedBaseHref: string, webSocketUrlScript: string, sdkShimScript: string, uiFilesEntryPoint: string): Buffer;
export {};