class

Analyzer::Javascript::Hono

Inherits Analyzer::Javascript::JavascriptEngine < Analyzer < FileHelper < Reference < Object

Constants

HTTP_METHODS = ["get", "post", "put", "delete", "patch", "options", "head", "query"] of ::String
ON_ROUTE_CALL_PATTERN = /\.(?:\s|\n|\r)*on(?:\s|\n|\r)*\(/
ROUTE_CALL_RES = HTTP_METHODS.map do |m| {m, /\b(?:app|router|hono)\s*\.\s*#{m}\s*\(\s*['"]([^'"]+)['"]/} end.to_h

Compiled once — an interpolated regex literal would otherwise be rebuilt (full PCRE2 compile) for every method on every line.

Class methods

tech_name
Source

Instance methods

analyze
Source
line_to_endpoints(line : String) : Array(Endpoint)
Source
line_to_params(line : String) : Array(Param)
Source
tech

Instance-side view of the same declaration. The per-file rescues live on this base class, which has no way to name the analyzer that is running inside them, so a skipped file could not be attributed to a tech. Deriving it from analyzer_for keeps the name written exactly once.

Source