UNPKG

@zerooneit/expressive-tea

Version:
91 lines (90 loc) 3.56 kB
/** * As Expressive Tea have some stages when is boot the application, this enum helps to attach plugin when use the Pour * or Plug decorations and this is the definition. * * <b>BOOT_DEPENDENCIES</b>: Used for some application dependencies, example, databases configuration or websocket settings. * * <b>INITIALIZE_MIDDLEWARES</b>: Used for application middlewares, example body-parser, cors, sessions express plugins. * * <b>APPLICATION</b>: Used internally to register all modules registered by Module decorator. * * <b>AFTER_APPLICATION_MIDDLEWARES</b>: Used to add middlewares after routers, commonly used for Error handling. * * <b>START</b>: This Stage is used to execute some code or attach middlewares before application starts and might be used to * settings something after plugins/middlewares registered. * * @inner * @export * @enum {number} * @summary Available Boot Stages */ export declare enum BOOT_STAGES { BOOT_DEPENDENCIES = 0, INITIALIZE_MIDDLEWARES = 1, APPLICATION = 2, AFTER_APPLICATION_MIDDLEWARES = 3, START = 4, ON_HTTP_CREATION = 5 } /** * This Determinate how the application is booting internally, this should not be modified unless you know what are you * doing, however, even that is the case should not be modified. The Order is the next one: * * <b><i>BOOT_DEPENDENCIES</i></b> --> <b><i>INITIALIZE_MIDDLEWARES</i></b> --> <b><i>APPLICATION</i></b> --> * <b><i>AFTER_APPLICATION_MIDDLEWARES</i></b> --> <b><i>START</i></b> * @inner * @type Array<BOOT_STAGES> * @constant * @summary Current Aplication Boot Order */ export declare const BOOT_ORDER: BOOT_STAGES[]; export declare const BOOT_STAGES_LIST: BOOT_STAGES[]; export declare const STAGES_INIT: { 0: any[]; 1: any[]; 2: any[]; 3: any[]; 4: any[]; }; export declare const EXPRESS_DIRECTIVES: string[]; export declare const BOOT_STAGES_KEY = "boot:stage-settings"; export declare const ROUTER_HANDLERS_KEY = "app:routes:handlers"; export declare const ROUTER_MIDDLEWARES_KEY = "app:routes:middlewares"; export declare const REGISTERED_MODEL_KEY = "app:models:registered"; export declare const REGISTERED_MODULE_KEY = "app:modules:registered"; export declare const PLUGINS_KEY = "boot:app-plugins"; export declare const REGISTERED_STATIC_KEY = "app:statics"; export declare const REGISTERED_DIRECTIVES_KEY = "app:directives"; export declare const ARGUMENTS_KEY = "app:routes:arguments"; export declare const ROUTER_ANNOTATIONS_KEY = "app:routes:annotations"; export declare const ROUTER_PROXIES_KEY = "app:routes:proxies"; export declare const PROXY_SETTING_KEY = "app:proxy:settings"; export declare const ARGUMENT_TYPES: { BODY: symbol; GET_PARAM: symbol; NEXT: symbol; QUERY: symbol; REQUEST: symbol; RESPONSE: symbol; }; export declare enum PROXY_METHODS { HOST = "host", PROXY_REQ_PATH_RESOLVER = "proxyReqPathResolver", FILTER = "filter", USER_RES_DECORATOR = "userResDecorator", USER_RES_HEADER_DECORATOR = "userResHeaderDecorator", SKIP_TO_NEXT_HANDLER_FILTER = "skipToNextHandlerFilter", PROXY_ERROR_HANDLER = "proxyErrorHandler", PROXY_REQ_OPT_DECORATOR = "proxyReqOptDecorator", PROXY_REQ_BODY_DECORATOR = "proxyReqBodyDecorator" } export declare enum PROXY_PROPERTIES { LIMIT = "limit", MEMOIZE_HOST = "memoizeHost", HTTPS = "https", PRESERVE_HOST_HDR = "preserveHostHdr", PARSE_REQ_BODY = "parseReqBody", REQ_AS_BUFFER = "reqAsBuffer", REQ_BODY_ENCODING = "reqBodyEncoding", TIMEOUT = "timeout" }