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.
77 lines (76 loc) • 4.89 kB
TypeScript
/**
* @license
* Copyright 2024 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 { DtApp, DtAppPlugin } from './src/plugin/plugin';
import type { BeforeBuildCallback, BeforeServeCallBack } from './src/plugin/hooks';
import { type RunFunctionOptions, executeFunction } from './src/execute-function/execute-function';
import { getBearerToken } from './src/auth/get-bearer-token';
import { getDtAppFileConfig } from './src/utils/config/get-dt-app-file-config';
import { dtFetch, Response as UndiciResponse, type RequestOptions as UndiciRequestOptions } from './src/utils/request';
import { getSSOUrl } from './src/utils/get-sso-url';
import { extractDtAppConfigFromTs } from './src/utils/config/extract-dt-app-config-from-ts';
export { UiCommands, OperatingSystem, DEFAULT_SSO_URL, DEFAULT_SSO_CLIENT_ID, CliAsset, SourceMaps, CliUiSource, CliFunctionSource, CliActionSource, EsbuildPlugin, PluginConfiguration, BuildOptions, UIPluginConfiguration, DeprecatedPluginConfiguration, ActionPluginConfiguration, WidgetPluginConfiguration, ServerOptions, AppOptions, ActionBase, Action, ActionManifest, SettingsManifest, DocumentsManifest, DocumentTypesManifest, FunctionManifest, CSPAppDirectives, DirectiveValue, OAuthScope, CliOptions, DocumentTypes, CliEnvFlags, CliFlags, CliFlagOptions, ResolvedCliAsset, ResolvedCliUiSource, ResolvedCliFunctionSource, ResolvedCliApiSource, ResolvedAction, ResolvedBuildOptions, ResolvedAppOptions, ResolvedServerOptions, ResolvedCliOptions, DefaultableCliOptions, getDefaultCliOptions, getNormalizedBaseHrefWithSlash, mergeRecursively, } from './src/utils/config/cli-options';
export { DevServer } from './src/utils/dev-server';
export { DtApp, DtAppPlugin } from './src/plugin/plugin';
export { BeforeBuildCallback, BeforeServeCallBack } from './src/plugin/hooks';
export { createProjectCommand, getPackageManager, TemplateConfig, createProject, createDtAppConfigBuffer, getFilesRecursive, canBeFormatted, loadTemplates, getAvailableEmbeddedTemplates, loadEmbeddedTemplates, writeTemplateFiles, File, FileMap, FileMode, getCompiledFileName, } from './src/create-project';
export { type RunFunctionOptions, executeFunction, } from './src/execute-function/execute-function';
export { getBearerToken } from './src/auth/get-bearer-token';
export { getDtAppFileConfig } from './src/utils/config/get-dt-app-file-config';
export { fetch, RequestOptions, Response } from './src/utils/dt-fetch';
export { APP_REGISTRY_BASE_URL } from './src/utils/gateway-communication';
export { mergeOptions } from './src/utils/config/cli-options';
export { getSSOUrl } from './src/utils/get-sso-url';
export { extractDtAppConfigFromTs } from './src/utils/config/extract-dt-app-config-from-ts';
export { DynatraceApplicationManifest as _InternalDynatraceApplicationManifest } from './src/interfaces/manifest';
export { prepareManifest as _InternalPrepareManifest } from './src/utils/prepare-manifest';
export type _DtApp = DtApp;
export type _DtAppPlugin = DtAppPlugin;
export type _BeforeBuildCallback = BeforeBuildCallback;
export type _BeforeServeCallBack = BeforeServeCallBack;
export type _RunFunctionOptions = RunFunctionOptions;
/**
* Executes a function using the runtime-simulator
* @param options
* @returns function response
*/
export declare const _ExecuteFunction: typeof executeFunction;
/**
* Wrapper function that will validate and return token without returning token validity
*/
export declare const _GetBearerToken: typeof getBearerToken;
/**
* Searches for app.config.{json,js,ts} in root of project and returns
* config if one exists
*/
export declare const _GetDtAppFileConfig: typeof getDtAppFileConfig;
/**
* Sends request using undici and returns a response
* @internal */
export declare const _Fetch: typeof dtFetch;
export declare const _Response: typeof UndiciResponse;
export type _RequestOptions = UndiciRequestOptions;
/**
* Builds the SSOUrl based on the environment
* @param environmentUrl envUrl is used to fetch the ssoUrl
* @returns the ssoUrl as a string and undefined if ssoUrl couldn't be fetched
*/
export declare const _GetSSOUrl: typeof getSSOUrl;
/**
* Transpile app.config.ts from commonJs to ES2021.
* @param configFilePath needs to be an absolute path
* @returns The dt-app configuration found
*/
export declare const _ExtractDtAppConfigFromTs: typeof extractDtAppConfigFromTs;