import type { Helper } from "../helper-registry.js"; /** * Get the directory path segment from the given `filepath`. * * @example * {{dirname "docs/toc.md"}} * * * @param {unknown} filepath - The file path to extract the directory from. * @returns {string} The directory path segment for use in test reports. * * @remarks * Use in CTRF templates to group test results or artifacts by directory. * Use with: `{{dirname test.file}}` to show the test's directory. */ export declare const dirnameHelper: Helper; /** * Get the relative filepath from `a` to `b`. * * @example * {{relative a b}} * * * @param {unknown} a - The base path. * @param {unknown} b - The target path. * @returns {string} The relative path for use in test reports. * * @remarks * Use in CTRF templates to display relative links between test files or artifacts. * Use with: `{{relative test.suite.file test.file}}` to show file relationships. */ export declare const relativeHelper: Helper; /** * Get the file extension from the given `filepath`. * * @example * {{extname "docs/toc.md"}} * * * @param {unknown} filepath - The file path to extract the extension from. * @returns {string} The file extension for use in test reports. * * @remarks * Use in CTRF templates to filter or display test files by type. * Use with: `{{extname test.file}}` to show the file type. */ export declare const extnameHelper: Helper; /** * Get the "stem" (filename without extension) from the given `filepath`. * * @example * {{stem "docs/toc.md"}} * * * @param {unknown} filepath - The file path to extract the stem from. * @returns {string} The stem for use in test reports. * * @remarks * Use in CTRF templates to display test names without extensions. * Use with: `{{stem test.file}}` to show the test name. */ export declare const stemHelper: Helper; /** * Get the file name from the given `filepath`. * * @example * {{basename "docs/toc.md"}} * * * @param {unknown} filepath - The file path to extract the base name from. * @returns {string} The base name for use in test reports. * * @remarks * Use in CTRF templates to display just the file name of a test or artifact. * Use with: `{{basename test.file}}` to show the file name. */ export declare const basenameHelper: Helper; /** * Resolve an absolute path from the given `filepath`. * * @example * {{resolve "docs/toc.md"}} * * * @param {unknown} filepath - The file path to resolve. * @returns {string} The absolute path for use in test reports. * * @remarks * Use in CTRF templates to show the full path to a test file or artifact. * Use with: `{{resolve test.file}}` to show the absolute path. */ export declare const resolveHelper: Helper; /** * Get specific (joined) segments of a file path by passing a range of array indices. * * @example * {{segments "a/b/c/d" "2" "3"}} * * * {{segments "a/b/c/d" "1" "3"}} * * * {{segments "a/b/c/d" "1" "2"}} * * * @param {unknown} filepath - The file path to split into segments. * @param {unknown} start - The start index (string or number). * @param {unknown} end - The end index (string or number, inclusive). * @returns {string} Returns a single, joined file path. * * @remarks * Use in CTRF templates to extract subpaths for grouping or display. * Use with: `{{segments test.file "1" "2"}}` to show a subpath. */ export declare const segmentsHelper: Helper; /** * Get the directory path segment from the given `filepath` (alias for dirname). * * @example * {{absolute "docs/toc.md"}} * * * @param {unknown} filepath - The file path to extract the directory from. * @returns {string} The directory path segment for use in test reports. * * @remarks * Alias for dirname. Use in CTRF templates for grouping by directory. * Use with: `{{absolute test.file}}` to show the test's directory. */ export declare const absoluteHelper: Helper; export declare const pathHelpers: Helper[];