import { FileSystem } from '@servicenow/sdk-build-core'; import { type Ignore } from 'ignore'; /** Name of the ignore file honored, relative to the project root. */ export declare const NOW_PACK_IGNORE_FILE = ".nowpackignore"; /** * Builds an {@link Ignore} matcher from `.nowpackignore` file contents. * * The contents are parsed with the canonical `ignore` library, so full `.gitignore` semantics * are honored — anchoring, directory-only (`dir/`) patterns, negation (`!`), the parent-directory * re-inclusion rule, character ranges, and escaping. */ export declare function parseNowPackIgnore(content: string): Ignore; /** * Builds a keep/drop predicate from the project's `.nowpackignore` file. * * The `.nowpackignore` file is read from `rootDir` and honored like a `.gitignore`: matching * paths are dropped, while `!`-prefixed patterns can re-include previously ignored paths. * * The `.nowpackignore` file itself is always dropped so it is never bundled back into the zip, * regardless of the rules it contains. * * @returns a predicate that returns `true` for files that should be kept. When no * `.nowpackignore` file exists (or it defines no rules), the predicate keeps every file * except the ignore file itself. * @throws {Error} if a `.nowpackignore` file is present but cannot be read, or if its contents * cannot be parsed into a matcher — both fail the build rather than silently applying no rules. */ export declare function createNowPackIgnoreFilter(fs: FileSystem, rootDir: string): (relativePath: string) => boolean;