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.64 kB
TypeScript
/**
* @license
* Copyright 2022 Dynatrace LLC
* 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.
*/
import type { Action } from '@dynatrace/openkit-js';
import type { FileMap } from './utils';
import type { TemplateConfig } from './create-project';
import { type TreeNode } from '../utils/layout';
/** Loads the available templates and saves them in this module. */
export declare function loadAvailableTemplates(dtAppVersion?: string): Promise<FileMap>;
/**
* Parses linux styled paths
* @param filePath Path from the zip e.g. dt-app-templates-0.115.0/.gitignore or dt-app-templates-0.115.0/templates/default/.eslintignore
* @returns
*/
export declare function parseFilePath(filePath: string): string;
/** Returns a list of all available templates from the github repository */
export declare function getAvailableTemplates(templatesFileMap: FileMap): string[];
/** Collects all the template files from the given templateName and returns them in form of a filemap */
export declare function getTemplate(config: Required<TemplateConfig>, rootAction?: Action): Promise<{
fileMap: FileMap;
generatedFiles: TreeNode[];
}>;