DenoAuditParser
API reference › Foxy › Audit › Parser › DenoAuditParser
Parses the human-readable report produced by deno audit.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
parse() | Parses a complete Deno audit report. | DenoAuditParser |
assertNotErrorDocument() protected final | Rejects a JSON document that represents a package manager error. | AbstractAuditParser |
assertOutputSize() protected final | Rejects audit output that exceeds the parser’s size limit. | AbstractAuditParser |
decodeObject() protected final | Decodes an audit JSON object after validating its size and shape. | AbstractAuditParser |
getAdvisoryId() protected final | Selects a GHSA identifier from the candidate or URL, falling back to the source identifier. | AbstractAuditParser |
getBoolean() protected final | Returns a required boolean field. | AbstractAuditParser |
getCves() protected final | Returns validated, normalized CVE identifiers. | AbstractAuditParser |
getGhsaId() protected final | Extracts and normalizes a GHSA identifier from a value or URL. | AbstractAuditParser |
getManagerName() protected | Returns the Deno manager name. | DenoAuditParser |
getNonNegativeInteger() protected final | Returns a required non-negative integer field. | AbstractAuditParser |
getObject() protected final | Converts a decoded JSON object into its property map. | AbstractAuditParser |
getOptionalString() protected final | Returns a sanitized optional string field, or null when absent or empty. | AbstractAuditParser |
getSeverity() protected final | Returns a supported normalized severity value. | AbstractAuditParser |
getSeverityCount() protected final | Returns the sum of severity counts and optionally validates the reported total. | AbstractAuditParser |
getSourceId() protected final | Returns a non-empty source identifier from a string or integer value. | AbstractAuditParser |
getString() protected final | Returns a required sanitized string field. | AbstractAuditParser |
getStringList() protected final | Returns a normalized list containing only strings. | AbstractAuditParser |
malformed() protected final | Creates a package-manager-specific malformed-output exception. | AbstractAuditParser |
sanitizeString() protected final | Replaces control characters and trims surrounding whitespace. | AbstractAuditParser |
uniqueStrings() protected final | Returns unique strings in deterministic order. | AbstractAuditParser |
Method details
Section titled “Method details”parse()
Section titled “parse() ”public function parse(string $output): arrayParses a complete Deno audit report.
Parameters
| Parameter | Type | Description |
|---|---|---|
$output | string |
Returns
array
getManagerName()
Section titled “getManagerName() ”protected function getManagerName(): stringReturns the Deno manager name.
Returns
string