@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
105 lines • 3.08 kB
TypeScript
export declare const APP_CONSTANTS: {
readonly DEFAULT_TIMEOUT: 5000;
readonly MAX_RETRIES: 3;
readonly VERSION: "0.0.1";
};
export declare const ERROR_MESSAGES: {
readonly VALIDATION_FAILED: "Validation failed";
readonly NOT_FOUND: "Resource not found";
readonly UNAUTHORIZED: "Unauthorized access";
readonly INTERNAL_ERROR: "Internal server error";
readonly FAILED_TO_ANALYZE: "Failed to analyze project";
readonly FAILED_TO_SCAN_DIR: "Failed to scan directory";
readonly FAILED_TO_READ_FILE: "Failed to read file";
readonly ENTITY_NOT_FOUND: "Entity with id {id} not found";
};
/**
* Error codes
*/
export declare const ERROR_CODES: {
readonly VALIDATION_ERROR: "VALIDATION_ERROR";
readonly NOT_FOUND: "NOT_FOUND";
readonly UNAUTHORIZED: "UNAUTHORIZED";
readonly INTERNAL_ERROR: "INTERNAL_ERROR";
};
/**
* File extension constants
*/
export declare const FILE_EXTENSIONS: {
readonly TYPESCRIPT: ".ts";
readonly TYPESCRIPT_JSX: ".tsx";
readonly JAVASCRIPT: ".js";
readonly JAVASCRIPT_JSX: ".jsx";
};
/**
* TypeScript primitive type names
*/
export declare const TYPE_NAMES: {
readonly STRING: "string";
readonly NUMBER: "number";
readonly BOOLEAN: "boolean";
readonly OBJECT: "object";
};
/**
* TypeScript class and method keywords
*/
export declare const CLASS_KEYWORDS: {
readonly CONSTRUCTOR: "constructor";
readonly PUBLIC: "public";
readonly PRIVATE: "private";
readonly PROTECTED: "protected";
};
/**
* Example code constants for documentation
*/
export declare const EXAMPLE_CODE_CONSTANTS: {
readonly ORDER_STATUS_PENDING: "pending";
readonly ORDER_STATUS_APPROVED: "approved";
readonly CANNOT_APPROVE_ERROR: "Cannot approve";
};
/**
* Common regex patterns
*/
export declare const REGEX_PATTERNS: {
readonly IMPORT_STATEMENT: RegExp;
readonly EXPORT_STATEMENT: RegExp;
};
/**
* Placeholders for string templates
*/
export declare const PLACEHOLDERS: {
readonly ID: "{id}";
};
/**
* Violation severity levels
*/
export declare const SEVERITY_LEVELS: {
readonly CRITICAL: "critical";
readonly HIGH: "high";
readonly MEDIUM: "medium";
readonly LOW: "low";
};
export type SeverityLevel = (typeof SEVERITY_LEVELS)[keyof typeof SEVERITY_LEVELS];
/**
* Severity order for sorting (lower number = more critical)
*/
export declare const SEVERITY_ORDER: Record<SeverityLevel, number>;
/**
* Violation type to severity mapping
*/
export declare const VIOLATION_SEVERITY_MAP: {
readonly SECRET_EXPOSURE: "critical";
readonly CIRCULAR_DEPENDENCY: "critical";
readonly REPOSITORY_PATTERN: "critical";
readonly AGGREGATE_BOUNDARY: "critical";
readonly DEPENDENCY_DIRECTION: "high";
readonly FRAMEWORK_LEAK: "high";
readonly ENTITY_EXPOSURE: "high";
readonly ANEMIC_MODEL: "medium";
readonly NAMING_CONVENTION: "medium";
readonly ARCHITECTURE: "medium";
readonly HARDCODE: "low";
};
export * from "./rules";
export * from "./ast-node-types";
//# sourceMappingURL=index.d.ts.map