; JavaScript entry-point detection queries
; Same structure as TypeScript but uses identifier (not type_identifier) for classes

; === Lambda/serverless handler exports ===

(export_statement
  (lexical_declaration
    (variable_declarator
      name: (identifier) @name
      (#match? @name "^(handler|main|lambdaHandler)$")))) @node

; === Exported handler functions ===

(export_statement
  (function_declaration
    name: (identifier) @name
    (#match? @name "^(handler|main|lambdaHandler)$"))) @node

; === Express/Hono/Fastify app exports ===

(export_statement
  (lexical_declaration
    (variable_declarator
      name: (identifier) @name
      (#match? @name "^(app|server|router)$")))) @node

; === Default export ===

(export_statement
  "default"
  (identifier) @name) @node
