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.
79 lines (78 loc) • 3.41 kB
TypeScript
import type { HtmlBuilder } from '../utils/inject/injector';
export declare const DOCUMENTS_DIR = "documents";
export declare const DOCUMENT_TYPES_DIR = "document-types";
/**
* Injecting the agent script into the index.html.
* If it is an internal app (appId: dynatrace.*) it will not inject the selfmonAgentConfig so the actions from the agent will correlate with the top level session.
* @param html
* @param agentUrl
* @param distDir path where the ui is located e.g. dist/ui or dist/widgets/actions/action-1
* @param appId
* @param uiFiles
*/
export declare function injectAgent(html: HtmlBuilder, agentUrl: string, distDir: string, appId: string): Promise<void>;
/** Get the list of function files from functions directory */
export declare function getFunctionFiles(options: {
/** The current working directory of the project */
cwd: string;
/** Relative path where the functions are located */
sourceRoot: string;
/** Include JS in the glob */
includeJs?: boolean;
}): string[];
/** Get the list of function files from functions directory */
export declare function printFunctionsInfo(options: {
/** The current working directory of the project */
cwd: string;
/** Relative path where the functions are located */
sourceRoot: string;
url: string;
}): void;
/** Returns a printable list of project actions (new implementation) */
export declare function printActionInfo(options: {
/** The current working directory of the project */
cwd: string;
/** The current working directory of the project */
actionsDir: string;
/** Server url location */
url: string;
/** The environment url */
environmentUrl: string;
/** The location app ids */
locationAppIds: string;
}): Promise<void>;
/** Returns all the filePaths resulting from the glob string passed. */
export declare function globFilesFromRoot(root: string, globString: string): Promise<string[]>;
/** Returns a printable list of project settings widgets */
export declare function printSettingsWidgetsInfo(options: {
/** The current working directory of the project */
cwd: string;
/** Location of the settings widgets */
widgetSettingsDir: string;
/** Server url location */
url: string;
/** The environment url */
environmentUrl: string;
}): Promise<void>;
/** Returns a printable list of app documents */
export declare function printDocumentsInfo(options: {
cwd: string;
appId: string;
documentsDir: string;
}): Promise<void>;
/**
* Generates clickable file URLs for a list of file paths
* @param paths Array of file paths
* @param cwd Current working directory
* @param baseDir Base directory relative to cwd
* @returns Record mapping file names to clickable paths
*/
export declare function generateFileUrls(paths: string[], cwd: string): Record<string, string>;
/**
* Creates a clickable file path in terminals that support ANSI escape sequences
* Format: \u001B]8;;file:///absolute-path\u001B\\display-text\u001B]8;;\u001B\\ see https://datatracker.ietf.org/doc/rfc8089/
* @param absolutePath The absolute file path to make clickable - must be absolute
* @param displayText The text to display in the terminal
* @returns The formatted string with ANSI escape sequences for clickable paths
*/
export declare function generateClickableFilePath(absolutePath: string, displayText: string): string;