# All files / src/classify classification-patterns.ts

100% Statements 9/9
100% Branches 0/0
100% Functions 0/0
100% Lines 9/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75

    13x

    13x

    13x

    13x

    13x

    13x

    13x

    13x

    13x

     /**
     * Classification pattern constants for file type detection.
     */

    /** Minimum exports to consider a file as a barrel export */
    export const BARREL_EXPORT_MIN_EXPORTS = 5;

    /** Token cost limit for barrel export detection */
    export const BARREL_EXPORT_TOKEN_LIMIT = 1000;

    /** Patterns for Lambda/API handler detection */
    export const HANDLER_NAME_PATTERNS = [
      'handler',
      '.handler.',
      '-handler.',
      'lambda',
      '.lambda.',
      '-lambda.',
    ];

    /** Patterns for service file detection */
    export const SERVICE_NAME_PATTERNS = [
      'service',
      '.service.',
      '-service.',
      '_service.',
    ];

    /** Patterns for email template detection */
    export const EMAIL_NAME_PATTERNS = [
      '-email-',
      '.email.',
      '_email_',
      '-template',
      '.template.',
      '_template',
      '-mail.',
      '.mail.',
    ];

    /** Patterns for parser/transformer detection */
    export const PARSER_NAME_PATTERNS = [
      'parser',
      '.parser.',
      '-parser.',
      '_parser.',
      'transform',
      'converter',
      'mapper',
      'serializer',
    ];

    /** Patterns for session/state management detection */
    export const SESSION_NAME_PATTERNS = ['session', 'state', 'context', 'store'];

    /** Next.js metadata export names */
    export const NEXTJS_METADATA_EXPORTS = [
      'metadata',
      'generatemetadata',
      'faqjsonld',
      'jsonld',
      'icon',
    ];

    /** Patterns for configuration file detection */
    export const CONFIG_NAME_PATTERNS = [
      '.config.',
      'tsconfig',
      'jest.config',
      'package.json',
      'aiready.json',
      'next.config',
      'sst.config',
    ];