import { type Tree } from '@nx/devkit'; import type { Expression, ObjectLiteralExpression, SourceFile } from 'typescript'; import type { NxComponentTestingOptions, NxCypressE2EPresetOptions } from '../../plugins/cypress-preset'; export declare const CYPRESS_CONFIG_FILE_NAME_PATTERN = "cypress.config.{js,ts,mjs,cjs}"; export declare const JIT_COMPILE_DISABLE_COMMENT: string[]; export declare function renderE2EPresetOptions(options: NxCypressE2EPresetOptions, baseUrl: string | undefined): { presetOptions: string; baseUrl: string | undefined; }; export declare function addDefaultE2EConfig(cyConfigContents: string, options: NxCypressE2EPresetOptions, baseUrl: string): Promise; /** * Adds the nxComponentTestingPreset to the cypress config file. * * Pass `presetImportPath` (e.g. `@nx/angular/plugins/component-testing`) to * have the matching `import` (ESM) or `const { ... } = require(...)` (CJS) * statement prepended automatically based on the detected module shape. * Without it, the caller is responsible for prepending the import - but * doing so unconditionally produces mixed-syntax files in CJS workspaces * (an ESM `import` followed by a CJS `module.exports`), so prefer passing * `presetImportPath`. * * Pass `cypressMajorVersion` to opt webpack setups out of `justInTimeCompile` * on Cypress 14+, where it defaults to `true` and can intermittently run 0 * tests in CI. The opt-out is emitted as an explicit `justInTimeCompile: false` * so it is visible and reversible. **/ export declare function addDefaultCTConfig(cyConfigContents: string, options?: NxComponentTestingOptions, presetImportPath?: string, cypressMajorVersion?: number | null): Promise; /** * Adds the mount command for Cypress * Make sure after calling this the correct import statement is added * to bring in the correct mount from cypress. **/ export declare function addMountDefinition(cmpCommandFileContents: string): Promise; export declare function getProjectCypressConfigPath(tree: Tree, projectRoot: string): string; export declare function resolveCypressConfigObject(cypressConfigContents: string): ObjectLiteralExpression | null; /** * Resolves the object literal an expression stands for in a Cypress config * file: the literal itself, the argument of a `defineConfig()` call, or a * variable declared at the top level of the file that holds either. Anything * else (a spread, a function call, an import) resolves to `null`. */ export declare function resolveObjectLiteral(expression: Expression, sourceFile: SourceFile, visitedIdentifiers?: Set): ObjectLiteralExpression | null;