import type { Logger } from '@teambit/logger'; import { ExecutionContext } from '../context'; import type { EnvService, ServiceExecutionResult } from '../services'; import type { EnvRuntime } from './env-runtime'; import { EnvsExecutionResult } from './envs-execution-result'; export interface EnvResult { env: EnvRuntime; data?: T; error?: Error; } export declare class Runtime { /** * runtime instances of the environments. */ readonly runtimeEnvs: EnvRuntime[]; private logger; constructor( /** * runtime instances of the environments. */ runtimeEnvs: EnvRuntime[], logger: Logger); /** * execute a service on a specific env. */ runEnv(envRuntimeId: string, service: EnvService, options?: { [key: string]: any; }): Promise>; /** * execute a service once for all environments. */ runOnce(service: EnvService, options?: { [key: string]: any; }): Promise; getEnvExecutionContext(): ExecutionContext[]; /** * execute a service on each one of the environments. */ run( /** * environment service to execute. */ service: EnvService, /** * options to proxy to the service upon execution. */ options?: { [key: string]: any; }, runtimes?: EnvRuntime[]): Promise>; }