aab-parser is a lightweight, asynchronous Android App Bundle (AAB) parser written entirely in TypeScript. It provides functionality to extract key manifest attributes from an AAB file, either as a strongly typed `Manifest` object (a subset of common attributes) or a raw JSON object with more comprehensive data. A key differentiator is its pure Node.js implementation, which means it does not require a Java Development Kit (JDK) installation, unlike many other AAB inspection tools. The current stable version is 1.0.1, released recently after its initial 1.0.0 debut, suggesting an early but active development phase with releases focused on stability and minor enhancements rather than a fixed cadence. It is primarily used for programmatic inspection of AAB metadata in build pipelines or analysis tools.
npm install aab-parserVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to asynchronously parse an Android App Bundle (AAB) file to extract its manifest information using `parseAabManifest`, showing the typed output and handling potential file errors.
For comprehensive manifest data, invoke `parseAabManifestJSON` which returns a plain object containing all parsed fields from the manifest XML.
Always use `await` with `parseAabManifest` and `parseAabManifestJSON` within an `async` function, or ensure your environment supports top-level `await`.
Adopt ESM `import { parseAabManifest, Manifest } from 'aab-parser';` for clarity and compatibility in TypeScript projects. Ensure your `tsconfig.json` and `package.json` are configured for ESM (e.g., `"type": "module"`).Wrap your code calling `parseAabManifest` or `parseAabManifestJSON` in an `async` function, or ensure your project is configured as an ESM module with Node.js version supporting top-level await (Node.js 14.8+).
Verify the file path is correct and accessible. Use an absolute path or ensure the relative path is correct from where your script is executed.
Always include error handling (`try...catch`) around AAB parsing calls. Log the error to understand the underlying cause. Ensure the AAB file is valid and not corrupt.
No dependency data recorded yet.