Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dx3mod/rpm-parser
RPM v3 package metadata parser in TypeScript.
https://github.com/dx3mod/rpm-parser
parser rpm
Last synced: about 2 months ago
JSON representation
RPM v3 package metadata parser in TypeScript.
- Host: GitHub
- URL: https://github.com/dx3mod/rpm-parser
- Owner: dx3mod
- License: mit
- Created: 2024-03-13T17:49:23.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-05-17T19:16:47.000Z (8 months ago)
- Last Synced: 2024-11-08T02:06:19.063Z (2 months ago)
- Topics: parser, rpm
- Language: TypeScript
- Homepage: https://npmjs.com/@dx3mod/rpm-parser
- Size: 64.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rpm-parser
RPM v3 package metadata parser in TypeScript with support for partial sync/stream parsing.
## Usage
Basic.
```ts
import { parseRpmPackage } from "@dx3mod/rpm-parser";const packageView = await parseRpmPackage(blob.stream());
packageView.name; // string
packageView.buildTime; // DatepackageView.raw.signature.entries.get(1004); // Entry
```Partial parsing.
```ts
parseRpmPackage(stream, {
// partial parsing of necessary header entries
select: {
tags: [
InfoTag.Name,
InfoTag.Os,
InfoTag.Arch,
InfoTag.Summery,
InfoTag.Size,
],
},
capture: {
payload: true,
},
});
```## See also
- [fastify-rpm-parser](https://github.com/dx3mod/fastify-rpm-parser)
## References
- [Package File Format](https://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/pkgformat.html)
- [rpm-rs/rpm](https://github.com/rpm-rs/rpm/)