import { Plugin, TailorDBNamespaceData } from "../../plugin/types.mjs"; import { LoadedConfig } from "./config-loader.mjs"; import "../services/application.mjs"; //#region src/cli/shared/tailordb-namespaces.d.ts /** * Namespace selection for {@link loadTailorDBNamespaces}: explicit namespace * names, or a selector deriving them from the loaded config and its plugins. * Returning `undefined` (or omitting the option) loads all owned namespaces. */ export type TailorDBNamespaceSelector = string[] | ((config: LoadedConfig, plugins: Plugin[]) => string[] | undefined); /** * Options for {@link loadTailorDBNamespaces}. */ export interface LoadTailorDBNamespacesOptions { /** Path to tailor.config.ts. Defaults to searching from the current directory. */ configPath?: string; /** Namespaces to load. Omit to load all owned namespaces. */ namespaces?: TailorDBNamespaceSelector; } /** * Result of {@link loadTailorDBNamespaces}. */ export interface LoadedTailorDBNamespaces { /** The loaded Tailor config. */ config: LoadedConfig; /** Plugins collected from the config module's plugin-array exports (typically `definePlugins()`). */ plugins: Plugin[]; /** Loaded TailorDB namespace data, in config order. */ namespaces: TailorDBNamespaceData[]; } /** * Load local TailorDB namespaces exactly as SDK generation/deploy sees them: * the config is loaded, user types are generated, and each selected * namespace's types are loaded with namespace plugins applied. * @param options - Namespace loading options. * @returns The loaded config and TailorDB namespace data. */ export declare function loadTailorDBNamespaces(options?: LoadTailorDBNamespacesOptions): Promise; //#endregion