UNPKG

mvom

Version:

Multivalue Object Mapper

67 lines (66 loc) 2.31 kB
import type http from 'http'; import type https from 'https'; import type LogHandler from './LogHandler'; export interface CreateDeploymentManagerOptions { /** * Request timeout (ms) * 0 implies no timeout * @defaultValue 0 */ timeout?: number; /** Optional http agent */ httpAgent?: http.Agent; /** Optional https agent */ httpsAgent?: https.Agent; } export interface DeployOptions { /** * Create directory when deploying * @defaultValue false */ createDir?: boolean; } declare class DeploymentManager { /** File system path of the UniBasic source code */ private static readonly unibasicPath; /** MVIS subroutine name */ readonly subroutineName: string; /** Axios instance */ private readonly axiosInstance; /** Database account name */ private readonly account; /** Log handler instance used for diagnostic logging */ private readonly logHandler; /** MVIS Admin authorization header */ private readonly authorization; /** Main file source code name */ private readonly mainFileName; private constructor(); /** Create a deployment manager */ static createDeploymentManager( /** URL of the MVIS Admin */ mvisAdminUrl: string, /** Database account that will be administered will be used against */ account: string, /** MVIS Admin username */ username: string, /** MVIS Admin password */ password: string, /** Log Handler */ logHandler: LogHandler, options?: CreateDeploymentManagerOptions): DeploymentManager; /** Validate that the MVOM main subroutine is available */ validateDeployment(): Promise<boolean>; /** Deploy the MVOM main subroutine to MVIS */ deploy(sourceDir: string, options?: DeployOptions): Promise<void>; /** Authenticate to MVIS admin and return headers needed for subsequent API calls */ private authenticate; /** Validate the presence of the REST subroutine definition */ private validateRestDefinition; /** Validate that the MVOM subroutine is cataloged */ private validateCatalog; /** Create MVIS REST Definition */ private createRestDefinition; /** Deploy subroutine to database server */ private deploySubroutine; } export default DeploymentManager;