UNPKG

@whook/whook

Version:

Build strong and efficient REST web services.

29 lines (28 loc) 1.2 kB
import { type ResolveService, type LogService } from 'common-services'; export declare const WHOOK_PROJECT_PLUGIN_NAME: WhookPluginName; export declare const WHOOK_DEFAULT_PLUGINS: string[]; export declare const WHOOK_FOLDERS: readonly ["routes", "services", "wrappers", "consumers", "transformers", "commands", "crons"]; export type WhookPluginName = string & { _type?: 'whook_plugin'; }; export type WhookURL = string & { _type?: 'whook_url'; }; export type WhookPluginFolder = (typeof WHOOK_FOLDERS)[number]; export type WhookPluginsService = WhookPluginName[]; export type WhookResolvedPlugin = { mainURL: WhookURL; types: WhookPluginFolder[]; }; export type WhookResolvedPluginsService = Record<WhookPluginName, WhookResolvedPlugin>; export type WhookResolvedPluginsConfig = { WHOOK_PLUGINS?: WhookPluginsService; }; export type WhookResolvedPluginsDependencies = WhookResolvedPluginsConfig & { MAIN_FILE_URL: WhookURL; resolve: ResolveService; readDir: (path: URL) => Promise<string[]>; log: LogService; }; declare const _default: import("knifecycle").ServiceInitializer<WhookResolvedPluginsDependencies, WhookResolvedPluginsService>; export default _default;