When running the CLI with napi audit view
, the tool spins up a server on localhost with the following available resources.
Endpoints
GET /api/config
Returns the loaded napiConfig
used to initialize the service.
Input Types
None
Output Types
The types can be viewed here.GET /api/dependency-manifest
Returns the Dependency Manifest generated from the scanned files. This manifest describes the dependencies between files, functions, or modules as determined by static analysis.
Input Types
None
Output Types
The types can be viewed here.GET /api/audit-manifest
Returns the Audit Manifest, a higher-level view of architectural or dependency risk zones based on the dependency manifest and project config.
Input Types
None
Output Types
The types can be viewed here.POST /api/extractSymbol
Extracts specific symbols from source files and writes them to the configured output directory.
Input Types
[
{
"filePath": "src/utils/math.ts",
"symbols": ["add", "multiply"]
},
{ ... }
]
Output Types
{
"success": true | false,
"error": { ...ZodError }
}