//#region src/lib/patterns.d.ts /** * Branch-name pattern helpers. Patterns are GitHub-branch-protection style globs: * `*` matches one or more characters within a name segment. `**` is not supported (branch * names cannot contain `/` in Neon). */ /** Returns `true` when the pattern contains an unescaped wildcard. */ declare function isWildcardPattern(pattern: string): boolean; /** * Returns `true` if `branchName` matches `pattern`. Anchors at both ends. */ declare function matchPattern(pattern: string, branchName: string): boolean; /** * Substitute every `*` in `pattern` with `replacement`. When the pattern has no `*`, the * replacement is appended with a `-` separator so the caller still gets a unique name. * * Pure function. The returned string is **not** validated — callers compose it from * sources that already passed {@link validatePattern} (the pattern) and * {@link normalizeGitBranch}-style sanitization (the replacement). * * @example * fillPattern("preview-*", "andre-feature-a1b2c3") // → "preview-andre-feature-a1b2c3" * fillPattern("feat-*-staging", "x") // → "feat-x-staging" * fillPattern("specific", "x") // → "specific-x" */ declare function fillPattern(pattern: string, replacement: string): string; /** * Validate a branch pattern. Pure — returns either `{ ok: true }` or `{ error: string }`. * * Rules: * - Non-empty after trim, no leading/trailing whitespace. * - Length <= 256 (Neon branch name max). * - May contain `*`, ASCII letters/digits, and the punctuation Neon allows in branch names: * `-`, `_`, `.`, `/`. Whitespace and regex meta-characters other than `*` are rejected. */ declare function validatePattern(pattern: string): { ok: true; } | { error: string; }; //#endregion export { fillPattern, isWildcardPattern, matchPattern, validatePattern }; //# sourceMappingURL=patterns.d.ts.map