/// <reference path="../adonis-typings/application.d.ts" />
import { RcFile, SemverNode, PreloadNode, AppEnvironments, ApplicationStates, ApplicationContract, AssetsDriver } from '@ioc:Adonis/Core/Application';
import { Logger } from '@adonisjs/logger';
import { Config } from '@adonisjs/config';
import { Profiler } from '@adonisjs/profiler';
import { Env } from '@adonisjs/env';
import * as helpers from '@poppinss/utils/build/helpers';
/**
 * The main application instance to know about the environment, filesystem
 * in which your AdonisJs app is running
 */
export declare class Application implements ApplicationContract {
    readonly appRoot: string;
    environment: AppEnvironments;
    helpers: typeof helpers;
    /**
     * Available after setup call
     */
    logger: Logger;
    profiler: Profiler;
    env: Env;
    config: Config;
    /**
     * Available after registerProviders call
     */
    private registrar;
    /**
     * An array of providers with ready and shutdown hooks.
     */
    private providersWithReadyHook;
    private providersWithShutdownHook;
    state: ApplicationStates;
    /**
     * Current working directory for the CLI and not the build directory
     * The `ADONIS_CLI_CWD` is set by the cli
     */
    readonly cliCwd?: string;
    /**
     * The name of the application picked from `.adonisrc.json` file. This can
     * be used to prefix logs.
     */
    readonly appName: string;
    /**
     * The application version. Again picked from `.adonisrc.json` file
     */
    readonly version: SemverNode | null;
    /**
     * `@adonisjs/core` version
     */
    readonly adonisVersion: SemverNode | null;
    /**
     * Reference to fully parser rcFile
     */
    readonly rcFile: RcFile;
    /**
     * The typescript flag indicates a couple of things, which can help tweak the tooling
     * and runtime behavior of the application as well.
     *
     * 1. When `typescript=true`, it means that the project is written using typescript.
     * 2. After compiling to Javascript, AdonisJs will set this value to `false` in the build folder.
     * 3. At runtime when `typescript=true`, it means the app is using ts-node to start.
     */
    readonly typescript: boolean;
    /**
     * A boolean to know if application has bootstrapped successfully
     */
    get isReady(): boolean;
    /**
     * A boolean to know if app is preparing to shutdown
     */
    isShuttingDown: boolean;
    /**
     * The namespace of exception handler that will handle exceptions
     */
    exceptionHandlerNamespace?: string;
    /**
     * The driver to use for assets bundling
     */
    assetsDriver?: AssetsDriver;
    /**
     * It is unknown until the `setup` method is called
     */
    nodeEnvironment: 'unknown' | 'development' | 'production' | 'test' | string;
    /**
     * An array of files to be preloaded
     */
    preloads: PreloadNode[];
    /**
     * A map of pre-configured directories
     */
    directoriesMap: Map<string, string>;
    /**
     * A map of directories aliases
     */
    aliasesMap: Map<string, string>;
    /**
     * A map of namespaces that different parts of apps
     * can use
     */
    namespacesMap: Map<string, string>;
    /**
     * Reference to the IoC container for the application
     */
    container: ApplicationContract['container'];
    constructor(appRoot: string, environment: AppEnvironments, rcContents?: any);
    /**
     * Verify the node version when defined under "engines" object in
     * "packages.json" file.
     */
    private verifyNodeEngine;
    /**
     * Resolve a given module from the application root. The callback is invoked
     * when the module is missing
     */
    private resolveModule;
    /**
     * Loads the rc file from the application root
     */
    private loadRcFile;
    /**
     * Loads the package.json file from the application root. Swallows
     * the exception when file is missing
     */
    private loadAppPackageJson;
    /**
     * Loads the package.json file for the "@adonisjs/core" package. Swallows
     * the exception when file is missing
     */
    private loadCorePackageJson;
    /**
     * Parses version string to an object.
     */
    private parseVersion;
    /**
     * Sets env variables based upon the provided application info.
     */
    private setEnvVars;
    /**
     * Setup container globals to easily resolve bindings
     */
    private setupGlobals;
    /**
     * Registering itself to the container
     */
    private registerItselfToTheContainer;
    /**
     * Normalizes node env
     */
    private normalizeNodeEnv;
    /**
     * Registering directory aliases
     */
    private registerAliases;
    /**
     * Loads the environment variables by reading and parsing the
     * `.env` and `.env.testing` files.
     */
    private loadEnvironmentVariables;
    /**
     * Load config and define the container binding
     */
    private loadConfig;
    /**
     * Setup logger
     */
    private setupLogger;
    /**
     * Setup profiler
     */
    private setupProfiler;
    /**
     * Setup helpers
     */
    private setupHelpers;
    /**
     * Return true when `this.nodeEnvironment === 'production'`
     */
    get inProduction(): boolean;
    /**
     * Opposite of [[this.isProduction]]
     */
    get inDev(): boolean;
    /**
     * Returns true when `this.nodeEnvironment === 'test'`
     */
    get inTest(): boolean;
    /**
     * Returns path for a given namespace by replacing the base namespace
     * with the defined directories map inside the rc file.
     *
     * The method returns a relative path from the application root. You can
     * use join it with the [[this.appRoot]] to make the absolute path
     */
    resolveNamespaceDirectory(namespaceFor: string): string | null;
    /**
     * Make path to a file or directory relative from
     * the application path
     */
    makePath(...paths: string[]): string;
    /**
     * Makes the path to a directory from `cliCwd` vs the `appRoot`. This is
     * helpful when we want path inside the project root and not the
     * build directory
     * @deprecated Use `makePath` instead
     */
    makePathFromCwd(...paths: string[]): string;
    /**
     * Make path to a file or directory relative from
     * the config directory
     */
    configPath(...paths: string[]): string;
    /**
     * Make path to a file or directory relative from
     * the public path
     */
    publicPath(...paths: string[]): string;
    /**
     * Make path to a file or directory relative from
     * the providers path
     */
    providersPath(...paths: string[]): string;
    /**
     * Make path to a file or directory relative from
     * the database path
     */
    databasePath(...paths: string[]): string;
    /**
     * Make path to a file or directory relative from
     * the migrations path
     */
    migrationsPath(...paths: string[]): string;
    /**
     * Make path to a file or directory relative from
     * the seeds path
     */
    seedsPath(...paths: string[]): string;
    /**
     * Make path to a file or directory relative from
     * the resources path
     */
    resourcesPath(...paths: string[]): string;
    /**
     * Make path to a file or directory relative from
     * the views path
     */
    viewsPath(...paths: string[]): string;
    /**
     * Makes path to the start directory
     */
    startPath(...paths: string[]): string;
    /**
     * Makes path to the tests directory
     */
    testsPath(...paths: string[]): string;
    /**
     * Makes path to the tmp directory. Since the tmp path is used for
     * writing at the runtime, we use `cwd` path to the write to the
     * source and not the build directory.
     */
    tmpPath(...paths: string[]): string;
    /**
     * Serialized output
     */
    toJSON(): {
        isReady: boolean;
        isShuttingDown: boolean;
        environment: AppEnvironments;
        nodeEnvironment: string;
        appName: string;
        version: string | null;
        adonisVersion: string | null;
    };
    /**
     * Switch application environment. Only allowed before the setup
     * is called
     */
    switchEnvironment(environment: AppEnvironments): this;
    /**
     * Performs the initial setup. This is the time, when we configure the
     * app to be able to boot itself. For example:
     *
     * - Loading environment variables
     * - Loading config
     * - Setting up the logger
     * - Registering directory aliases
     *
     * Apart from the providers, most of the app including the container
     * is ready at this stage
     */
    setup(): Promise<void>;
    /**
     * Register providers
     */
    registerProviders(): Promise<void>;
    /**
     * Booted providers
     */
    bootProviders(): Promise<void>;
    /**
     * Require files registered as preloads inside `.adonisrc.json` file
     */
    requirePreloads(): Promise<void>;
    /**
     * Start the application. At this time we execute the provider's
     * ready hooks
     */
    start(): Promise<void>;
    /**
     * Prepare the application for shutdown. At this time we execute the
     * provider's shutdown hooks
     */
    shutdown(): Promise<void>;
}
