import type { RelativePath } from '@-xun/fs'; import type { GenericPackage } from '@-xun/project-types'; import type { ParametersNoFirst, SyncVersionOf } from "../../../common/src/types.js"; import type { PackageFiles } from "../common.js"; /** * @see {@link gatherPackageFiles} */ export type GatherPackageFilesOptions = { /** * Use the internal cached result from a previous run, if available. * * Unless `useCached` is `false`, the results returned by this function will * always strictly equal (`===`) each other with respect to call signature. * * @see {@link cache} */ useCached: boolean; /** * If `true`, use the project root's `.gitignore` file exclusively to filter * out returned project files. * * @default true */ skipGitIgnored?: boolean; /** * Exclude paths from the result with respect to the given patterns, which are * interpreted **relative to the _project root_** according to gitignore * rules. * * This option can also be used together with * {@link GatherPackageFilesOptions.skipGitIgnored}. Also, since `ignore` is * appended to the final list of ignored files, negated globs can be used to * un-ignore files. */ ignore?: (string | RelativePath)[]; }; declare function gatherPackageFiles_(shouldRunSynchronously: false, package_: GenericPackage, options: GatherPackageFilesOptions): Promise; declare function gatherPackageFiles_(shouldRunSynchronously: true, package_: GenericPackage, options: GatherPackageFilesOptions): PackageFiles; /** * Asynchronously construct a {@link PackageFiles} instance containing * {@link AbsolutePath}s to every file under `package_`'s root. * * **NOTE: the result of this function is memoized! This does NOT _necessarily_ * mean results will strictly equal each other. See `useCached` in this specific * function's options for details.** To fetch fresh results, set the `useCached` * option to `false` or clear the internal cache with {@link cache.clear}. */ export declare function gatherPackageFiles(...args: ParametersNoFirst): Promise; export declare namespace gatherPackageFiles { /** * Synchronously construct a {@link PackageFiles} instance containing * {@link AbsolutePath}s to every file under `package_`'s root. * * **NOTE: the result of this function is memoized! This does NOT * _necessarily_ mean results will strictly equal each other. See `useCached` * in this specific function's options for details.** To fetch fresh results, * set the `useCached` option to `false` or clear the internal cache with * {@link cache.clear}. */ const sync: SyncVersionOf; } export {};