@samiyev/guardian
Version:
Research-backed code quality guardian for AI-assisted development. Detects hardcodes, secrets, circular deps, framework leaks, entity exposure, and 9 architecture violations. Enforces Clean Architecture/DDD principles. Works with GitHub Copilot, Cursor, W
78 lines • 2.42 kB
TypeScript
/**
* Pattern matcher for detecting specific value types
*
* Provides pattern matching for emails, IPs, paths, dates, UUIDs, versions, and other common hardcoded values
*/
export declare class ValuePatternMatcher {
private static readonly EMAIL_PATTERN;
private static readonly IP_V4_PATTERN;
private static readonly IP_V6_PATTERN;
private static readonly DATE_ISO_PATTERN;
private static readonly URL_PATTERN;
private static readonly UNIX_PATH_PATTERN;
private static readonly WINDOWS_PATH_PATTERN;
private static readonly API_KEY_PATTERN;
private static readonly UUID_PATTERN;
private static readonly SEMVER_PATTERN;
private static readonly HEX_COLOR_PATTERN;
private static readonly MAC_ADDRESS_PATTERN;
private static readonly BASE64_PATTERN;
private static readonly JWT_PATTERN;
/**
* Checks if value is an email address
*/
isEmail(value: string): boolean;
/**
* Checks if value is an IP address (v4 or v6)
*/
isIpAddress(value: string): boolean;
/**
* Checks if value is a date in ISO format
*/
isDate(value: string): boolean;
/**
* Checks if value is a URL
*/
isUrl(value: string): boolean;
/**
* Checks if value is a file path (Unix or Windows)
*/
isFilePath(value: string): boolean;
/**
* Checks if value looks like an API key
*/
isApiKey(value: string): boolean;
/**
* Checks if value is a UUID
*/
isUuid(value: string): boolean;
/**
* Checks if value is a semantic version
*/
isSemver(value: string): boolean;
/**
* Checks if value is a hex color
*/
isHexColor(value: string): boolean;
/**
* Checks if value is a MAC address
*/
isMacAddress(value: string): boolean;
/**
* Checks if value is Base64 encoded (min length 20 to avoid false positives)
*/
isBase64(value: string): boolean;
/**
* Checks if value is a JWT token
*/
isJwt(value: string): boolean;
/**
* Detects the type of value
*/
detectType(value: string): "email" | "url" | "ip_address" | "file_path" | "date" | "api_key" | "uuid" | "version" | "color" | "mac_address" | "base64" | null;
/**
* Checks if value should be detected as hardcoded
*/
shouldDetect(value: string): boolean;
}
//# sourceMappingURL=ValuePatternMatcher.d.ts.map