import { ExecutionContext } from '@teambit/envs'; import type { Harmony } from '@teambit/harmony'; import type { Component } from '@teambit/component'; import type { Logger } from '@teambit/logger'; export declare class AppContext extends ExecutionContext { /** * name of the app */ readonly appName: string; /** * instance of harmony. */ readonly harmony: Harmony; /** * determine whether to serve the application in dev mode. */ readonly dev: boolean; /** * application component instance. */ readonly appComponent: Component; /** * working directory of the component. */ readonly workdir: string; /** * execution context of the app. */ readonly execContext: ExecutionContext; /** * A path for the host root dir * Host root dir is the dir where we run the app from * This can be used in different bundle options which run require.resolve * for example when configuring webpack aliases or webpack expose loader on the peers deps */ readonly hostRootDir?: string | undefined; /** * A port to run the app on */ readonly port?: number | undefined; /** * arguments to pass to the app. */ readonly args?: string | undefined; /** * path to the application component in the workspace */ readonly workspaceComponentPath?: string | undefined; /** * list of env variables to include. */ readonly envVariables: Record; constructor( /** * name of the app */ appName: string, /** * instance of harmony. */ harmony: Harmony, /** * determine whether to serve the application in dev mode. */ dev: boolean, /** * application component instance. */ appComponent: Component, /** * working directory of the component. */ workdir: string, /** * execution context of the app. */ execContext: ExecutionContext, /** * A path for the host root dir * Host root dir is the dir where we run the app from * This can be used in different bundle options which run require.resolve * for example when configuring webpack aliases or webpack expose loader on the peers deps */ hostRootDir?: string | undefined, /** * A port to run the app on */ port?: number | undefined, /** * arguments to pass to the app. */ args?: string | undefined, /** * path to the application component in the workspace */ workspaceComponentPath?: string | undefined, /** * list of env variables to include. */ envVariables?: Record); /** * return a logger instance for the env. */ createLogger(name?: string): Logger; /** * get an instance of an aspect. * make sure it is loaded prior to requesting it. */ getAspect(aspectId: string): T | undefined; static compose(appContext: AppContext, overrides?: Partial): AppContext; }