import { z } from "zod"; /** * Zod schema for validating package.json metadata. * @internal */ export declare const PackageSchema: z.ZodObject<{ name: z.ZodString; version: z.ZodString; description: z.ZodOptional; author: z.ZodOptional; }, z.core.$strip>>, z.ZodString]>>; license: z.ZodOptional; dependencies: z.ZodOptional>; }, z.core.$strip>; /** * Type representing the validated package.json metadata. * * @internal */ export type Package = z.infer; /** * Zod schema for the full Act Framework configuration object. * Includes package metadata, environment, logging, and timing options. * @internal */ declare const BaseSchema: z.ZodObject<{ name: z.ZodString; version: z.ZodString; description: z.ZodOptional; author: z.ZodOptional; }, z.core.$strip>>, z.ZodString]>>; license: z.ZodOptional; dependencies: z.ZodOptional>; env: z.ZodEnum<{ development: "development"; production: "production"; staging: "staging"; test: "test"; }>; logLevel: z.ZodEnum<{ debug: "debug"; error: "error"; fatal: "fatal"; info: "info"; trace: "trace"; warn: "warn"; }>; logSingleLine: z.ZodBoolean; sleepMs: z.ZodNumber; }, z.core.$strip>; /** * Type representing the validated Act Framework configuration object. */ export type Config = z.infer; /** * Gets the current Act Framework configuration. * * Configuration is loaded from package.json and environment variables, providing * type-safe access to application metadata and runtime settings. * * **Environment Variables:** * - `NODE_ENV`: "development" | "test" | "staging" | "production" (default: "development") * - `LOG_LEVEL`: "fatal" | "error" | "warn" | "info" | "debug" | "trace" * - `LOG_SINGLE_LINE`: "true" | "false" (default: "true") * - `SLEEP_MS`: Milliseconds for sleep utility (default: 100, 0 for tests) * * **Defaults by environment:** * - test: logLevel="error", sleepMs=0 * - production: logLevel="info" * - development: logLevel="trace" * * @returns The validated configuration object * * @example Basic usage * ```typescript * import { config } from "@rotorsoft/act"; * * const cfg = config(); * console.log(`App: ${cfg.name} v${cfg.version}`); * console.log(`Environment: ${cfg.env}`); * console.log(`Log level: ${cfg.logLevel}`); * ``` * * @example Environment-specific behavior * ```typescript * import { config } from "@rotorsoft/act"; * * const cfg = config(); * * if (cfg.env === "production") { * // Use PostgreSQL in production * store(new PostgresStore(prodConfig)); * } else { * // Use in-memory store for dev/test * store(new InMemoryStore()); * } * ``` * * @example Adjusting log levels * ```typescript * // Set via environment variable: * // LOG_LEVEL=debug npm start * * // Or check in code: * const cfg = config(); * if (cfg.logLevel === "trace") { * logger.trace("Detailed debugging enabled"); * } * ``` * * @see {@link Config} for configuration type */ export declare const config: () => Config; export {}; //# sourceMappingURL=config.d.ts.map