import { type FatalErrorService, type Knifecycle } from 'knifecycle';
import { type LogService } from 'common-services';
import { type AppEnvVars, type BaseAppEnv } from './ENV.js';
export type ProcessService = {
    service: NodeJS.Process;
    dispose: () => Promise<void>;
};
export type ProcessServiceConfig = {
    PROCESS_NAME?: string;
    SIGNALS?: NodeJS.Signals[];
};
export type ProcessServiceDependencies<T extends BaseAppEnv> = ProcessServiceConfig & {
    ENV: AppEnvVars;
    APP_ENV: T;
    exit: typeof process.exit;
    $instance: Knifecycle;
    $fatalError: FatalErrorService;
    log?: LogService;
};
declare const _default: typeof initProcess;
export default _default;
/**
 * Instantiate the process service
 * @name initProcess
 * @function
 * @param  {Object}   services
 * The services `process` depends on
 * @param  {Object}   services.APP_ENV
 * The injected `APP_ENV` value
 * @param  {Object}   [services.PROCESS_NAME]
 * The process name to display
 * @param  {Object}   [services.SIGNALS]
 * The process signals that interrupt the process
 * @param  {Object}   [services.exit]
 * A `process.exit` like function
 * @param  {Object}   services.$instance
 * The Knifecycle instance
 * @param  {Object}   services.$fatalError
 * The Knifecycle fatal error manager
 * @param  {Object}   [services.log=noop]
 * An optional logging service
 * @return {Promise<Object>}
 * A promise of the process object
 */
declare function initProcess<T extends BaseAppEnv>({ ENV, APP_ENV, PROCESS_NAME, SIGNALS, log, exit, $instance, $fatalError, }: ProcessServiceDependencies<T>): Promise<ProcessService>;
