import { z } from 'zod/v4'; import type { Container, Secret } from '@dagger.io/dagger'; /** * Generic configuration for DaggerEnv */ export type DaggerEnvConfig = { /** Arguments schema */ args: z.ZodObject; /** Environment variables schema */ env: z.ZodObject; /** Secrets schema */ secrets: z.ZodObject; /** Secret presets mapping preset names to arrays of secret names */ secretPresets: Record; /** Derived environment variables based on secret names */ derivedEnvVars: Record>; }; /** * Inferred options type from config */ export type DaggerOptionsFromConfig = { args: z.output; env: z.output; secrets: z.output; }; /** * Reusable Dagger environment abstraction */ export declare class DaggerEnv { private readonly config; private readonly optionsSchema; constructor(config: T); /** * Parse dagger options from a Secret */ parseDaggerOptions(options: Secret): Promise>; /** * Create a function that applies environment variables and secrets to a container * based on the provided Dagger options, secret presets, and additional secret names. */ getWithEnv(daggerOptions: Secret | DaggerOptionsFromConfig, secretPresets: Array>, secretNames?: Array, string>>): Promise<{ /** * Apply environment variables and secrets to a container */ withEnv: (con: Container) => Container; /** * Remove environment variables and secrets from a container */ withoutEnv: (con: Container) => Container; }>; /** * Get the options schema for this DaggerEnv instance */ getOptionsSchema(): z.ZodObject<{ args: T["args"]; env: T["env"]; secrets: T["secrets"]; }, z.core.$strip>; /** * Get available secret presets */ getSecretPresets(): Array; /** * Get secrets for a specific preset */ getPresetSecrets(preset: Extract): readonly string[]; } /** * Helper function to create a DaggerEnv instance with proper typing */ export declare function createDaggerEnv(config: T): DaggerEnv; //# sourceMappingURL=dagger-env.d.ts.map