import { LoadedConfig } from "./config-loader.mjs"; import { SeedNamespaceConfig } from "../../plugin/builtin/seed/seed-type-processor.mjs"; //#region src/cli/shared/seed-context.d.ts /** * IdP `_User` seeding context, present when the config uses the built-in IdP * with a user profile type. */ export interface SeedIdpUserContext { /** IdP namespace the `_User` records belong to. */ idpNamespace: string; /** Server-side script that creates `_User` records from seed rows. */ seedScriptCode: string; /** Server-side script that lists every `_User` record to delete. */ listScriptCode: string; /** Server-side script that deletes one chunk of listed `_User` records. */ truncateScriptCode: string; } /** * Everything a seed run needs from the local config: the seed data location, * per-namespace seeding order, and IdP user context. */ export interface SeedContext { /** The loaded Tailor config. */ config: LoadedConfig; /** Absolute path to the seedPlugin output directory. */ distPath: string; /** Default machine user name from seedPlugin options, if configured. */ machineUserName?: string | undefined; /** Seed ordering information per TailorDB namespace. */ namespaces: SeedNamespaceConfig[]; /** IdP `_User` seeding context, or null when not applicable. */ idpUser: SeedIdpUserContext | null; } /** * Options for {@link loadSeedContext}. */ export interface LoadSeedContextOptions { /** Path to tailor.config.ts. Defaults to searching from the current directory. */ configPath?: string; } /** * Load the seed context from the local config. Requires `seedPlugin` to be * configured in the config's plugins. A relative `distPath` in the seedPlugin * options is resolved against the current working directory — the same base * `tailor generate` writes it to. * @param options - Seed context loading options. * @returns The seed context computed from the local config. */ export declare function loadSeedContext(options?: LoadSeedContextOptions): Promise; //#endregion export type { SeedNamespaceConfig };