import { type ServiceProperties } from 'knifecycle'; import { type ImporterService, type LogService } from 'common-services'; import { type BaseAppEnv, type ProcessEnvConfig } from './ENV.js'; export type BaseAppConfig = ProcessEnvConfig; export interface AppConfig extends BaseAppConfig { } export interface AppConfigDependencies { APP_ENV: T; MAIN_FILE_URL: string; importer: ImporterService<{ default: AppConfig; }>; log?: LogService; } /** * Initialize the APP_CONFIG service according to the APP_ENV * @param {Object} services * The services `APP_CONFIG` depends on * @param {Object} services.APP_ENV * The injected `APP_ENV` value * @param {String} services.MAIN_FILE_URL * An URL pointing to the main file run * @param {Object} services.importer * A service allowing to dynamically import ES modules * @param {Object} [services.log=noop] * An optional logging service * @return {Promise} * A promise of a an object the actual configuration properties. */ declare function initAppConfig({ APP_ENV, MAIN_FILE_URL, importer, log, }: AppConfigDependencies): Promise; declare const _default: ServiceProperties & typeof initAppConfig; export default _default;