supa-seed
Version:
A constraint-aware, framework-agnostic database seeding framework with deep PostgreSQL business logic discovery and MakerKit integration support
42 lines • 1.61 kB
JavaScript
;
/**
* Business Logic Analysis Types
* Types for analyzing database business logic patterns and data flows
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.MAKERKIT_BUSINESS_LOGIC_PATTERNS = void 0;
// MakerKit-specific patterns
exports.MAKERKIT_BUSINESS_LOGIC_PATTERNS = [
{
name: 'auth_user_creation_trigger',
framework: 'makerkit',
pattern: /kit\.setup_new_user|handle_new_user|create_profile_for_user/i,
confidence: 0.95,
indicators: [
{ type: 'function_name', value: 'kit.setup_new_user', weight: 0.9 },
{ type: 'function_name', value: 'handle_new_user', weight: 0.8 },
{ type: 'trigger_name', value: 'on_auth_user_created', weight: 0.7 }
]
},
{
name: 'personal_account_business_logic',
framework: 'makerkit',
pattern: /is_personal_account.*true.*slug.*null/i,
confidence: 0.85,
indicators: [
{ type: 'constraint_pattern', value: 'accounts_slug_null_if_personal_account', weight: 0.9 },
{ type: 'table_structure', value: 'accounts.is_personal_account', weight: 0.7 }
]
},
{
name: 'tenant_scoped_data',
framework: 'makerkit',
pattern: /account_id.*foreign.*key|tenant.*isolation/i,
confidence: 0.75,
indicators: [
{ type: 'table_structure', value: 'account_id FK pattern', weight: 0.8 },
{ type: 'constraint_pattern', value: 'tenant_isolation', weight: 0.6 }
]
}
];
//# sourceMappingURL=business-logic-types.js.map