/// import { Integration } from '../../lib/Constants'; import type { ChildProcess } from 'node:child_process'; export declare const KEYS: { UP: string; DOWN: string; LEFT: string; RIGHT: string; ENTER: string; SPACE: string; }; export declare const TEST_ARGS: { AUTH_TOKEN: string; PROJECT_DSN: string; ORG_SLUG: string; PROJECT_SLUG: string; }; export declare const log: { success: (message: string) => void; info: (message: string) => void; error: (message: unknown) => void; }; /** * Creates an isolated test environment by copying a test application to a temporary directory. * Each call creates a NEW unique temporary directory, allowing multiple isolated environments * per test file (useful for tests that run the wizard multiple times with different configs). * * @param testAppName - Name of the test application folder (e.g., 'nextjs-16-test-app') * @returns Object with projectDir path and cleanup function */ export declare function createIsolatedTestEnv(testAppName: string): { projectDir: string; cleanup: () => void; }; export declare class ProcessRunner { taskHandle: ChildProcess; constructor(cmd: string, args: string[], opts?: { cwd?: string; debug?: boolean; }); /** * Waits for the task to exit with a given `statusCode`. * * @returns a promise that resolves to `true` if the run ends with the status * code, or it rejects when the `timeout` was reached. */ waitForStatusCode(statusCode: number | null, options?: { /** Timeout in ms */ timeout?: number; }): Promise; /** * Waits for the provided output with `.includes()` logic. * * @returns a promise that resolves to `true` if the output was found, `false` if the output was not found within the * timeout and `optional: true` is set, or it rejects when the timeout was reached with `optional: false` */ waitForOutput(output: string, options?: { /** Timeout in ms */ timeout?: number; /** Whether to always resolve after the timeout, no matter whether the input was actually found or not. */ optional?: boolean; }): Promise; kill(): void; } export declare function getWizardCommand(integration: Integration): string; /** * Create a file with the given content * * @param filePath * @param content */ export declare function createFile(filePath: string, content?: string): void; /** * Modify the file with the new content * * @param filePath * @param oldContent * @param newContent */ export declare function modifyFile(filePath: string, replaceMap: Record): void; /** * Read the file contents and check if it does not contain the given content * * @param {string} filePath * @param {(string | string[])} content */ export declare function checkFileDoesNotContain(filePath: string, content: string | string[]): void; /** * Read the file contents and check if it contains the given content * * @param {string} filePath * @param {(string | string[])} content */ export declare function checkFileContents(filePath: string, content: string | string[]): void; /** * Check if the file exists * * @param filePath */ export declare function checkFileExists(filePath: string): void; /** * Check if the file does not exist * * @param filePath */ export declare function checkFileDoesNotExist(filePath: string): void; /** * Check if the package.json lists the given package as a dependency or dev dependency * * @param projectDir * @param integration */ export declare function checkPackageJson(projectDir: string, packageName: string, devDependency?: boolean): void; /** * Check if the .sentryclirc contains the auth token * * @param projectDir */ export declare function checkSentryCliRc(projectDir: string): void; /** * Check if the .env.sentry-build-plugin contains the auth token * @param projectDir */ export declare function checkEnvBuildPlugin(projectDir: string): void; /** * Check if the sentry.properties contains the auth token * @param projectDir */ export declare function checkSentryProperties(projectDir: string): void; /** * Check if the project builds * Check if the project builds and ends with status code 0. * @param projectDir */ export declare function checkIfBuilds(projectDir: string): Promise; /** * Check if the project lints successfully * Runs `npm run lint` and expects status code 0. * @param projectDir */ export declare function checkIfLints(projectDir: string): Promise; /** * Check if the flutter project builds * @param projectDir */ export declare function checkIfFlutterBuilds(projectDir: string, expectedOutput: string, debug?: boolean): Promise; /** * Check if the React Native project bundles successfully for the specified platform. * Returns a boolean indicating if the process exits with status code 0. * @param projectDir The root directory of the React Native project. * @param platform The platform to bundle for ('ios' or 'android'). * @param debug runs the command in debug mode if true */ export declare function checkIfReactNativeBundles(projectDir: string, platform: 'ios' | 'android', debug?: boolean): Promise; /** * Check if the Expo project exports successfully for the specified platform. * Returns a boolean indicating if the process exits with status code 0. * @param projectDir The root directory of the Expo project. * @param platform The platform to export for ('ios', 'android', or 'web'). * @param debug runs the command in debug mode if true */ export declare function checkIfExpoBundles(projectDir: string, platform: 'ios' | 'android' | 'web', debug?: boolean): Promise; /** * Check if the project runs on dev mode * @param projectDir * @param expectedOutput */ export declare function checkIfRunsOnDevMode(projectDir: string, expectedOutput: string): Promise; /** * Check if the project runs on prod mode * @param projectDir * @param expectedOutput */ export declare function checkIfRunsOnProdMode(projectDir: string, expectedOutput: string, startCommand?: string): Promise;