/** * Environment Management Utilities - TypeScript ES Module Implementation * * This module provides utilities specifically for managing test environments, * including environment variable manipulation and test isolation. These utilities * help create isolated, predictable test environments without side effects. * * Design philosophy: * - Environment isolation to prevent test interference * - Predictable test conditions with known values * - Easy setup and teardown of test environments * - Simple, focused functionality for environment management */ import { snapshotEnv, handleSnapshotError, attachMockSpies, makeLoggedMock, createScheduleMock, createQerrorsMock, createAxiosMock, resetMocks, initSearchTest, TestMockFactory, createTestMocks, setupTestEnvironment } from '../utils/testEnv.js'; import { setOfflineMode, isOfflineMode, getAxios, getQerrors, getEnvironmentState, createEnvironmentAdapters, clearOfflineCache } from '../utils/offlineMode.js'; import { reload, stubQerrors, createJsonRes, createRes } from '../utils/testHelpers.js'; declare const testEnv: { defaultEnv: import("../utils/testEnv/envManager.js").DefaultEnv; setTestEnv: () => boolean; saveEnv: () => Record; restoreEnv: (savedEnv: Record) => boolean; snapshotEnv: typeof snapshotEnv; handleSnapshotError: typeof handleSnapshotError; attachMockSpies: typeof attachMockSpies; makeLoggedMock: typeof makeLoggedMock; createScheduleMock: typeof createScheduleMock; createQerrorsMock: typeof createQerrorsMock; createAxiosMock: typeof createAxiosMock; resetMocks: typeof resetMocks; initSearchTest: typeof initSearchTest; createMockWhois: () => import("../utils/testEnv.js").MockWhoisResult; createMockOpenAI: () => import("../utils/testEnv.js").MockOpenAIResult; createMockNodemailer: () => import("../utils/testEnv.js").MockNodemailerResult; DEFAULT_MOCK_DATA: { whois: { success: import("../utils/testEnv.js").MockWhoisResponse; empty: import("../utils/testEnv.js").MockWhoisResponse; }; openai: { success: import("../utils/testEnv.js").MockOpenAIResponse; }; nodemailer: { success: { messageId: string; accepted: string[]; rejected: never[]; }; }; }; setupManualMocks: () => Promise; clearAllMocks: (...mocks: import("../utils/testEnv/serviceMocks.js").JestMockLike[]) => void; TestMockFactory: typeof TestMockFactory; factory: TestMockFactory; createTestMocks: typeof createTestMocks; setupTestEnvironment: typeof setupTestEnvironment; DEFAULT_TEST_CONFIG: { PORT: number; SECURITY: { REQUIRE_API_KEY: boolean; API_KEY: string; }; RATE_LIMITING: { ENABLED: boolean; WINDOW_MS: number; MAX_REQUESTS: number; }; TENSORFLOW: { ENABLE_MODEL_CACHING: boolean; MAX_MODEL_SIZE: number; CLEANUP_INTERVAL: number; }; }; }; declare const offlineMode: { setOfflineMode: typeof setOfflineMode; isOfflineMode: typeof isOfflineMode; getAxios: typeof getAxios; getQerrors: typeof getQerrors; getEnvironmentState: typeof getEnvironmentState; createEnvironmentAdapters: typeof createEnvironmentAdapters; clearOfflineCache: typeof clearOfflineCache; }; declare const testHelpers: { reload: typeof reload; moduleReloadLock: Set; stubQerrors: typeof stubQerrors; withMockConsole: (method: import("../utils/mockConsole.js").ConsoleMethod, fn: (spy: import("../utils/mockConsole.js").MockSpy) => T, options?: import("../utils/mockConsole.js").ConsoleMockOptions) => T; createJsonRes: typeof createJsonRes; createRes: typeof createRes; backupEnvVars: (keys?: string[]) => import("../utils/helpers/envManager.js").EnvBackup; restoreEnvVars: (backup: import("../utils/helpers/envManager.js").EnvBackup, keys?: string[]) => void; withSavedEnv: (fn: () => T, envVars?: Record) => T; generateKey: (lengthOrType?: number | string, prefix?: string) => string; }; export { testEnv, // environment variable management and test isolation offlineMode, // offline/online mode utility with automatic switching testHelpers }; //# sourceMappingURL=envUtils.d.ts.map