Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
import api from "@/api"
+export interface PackageSummary {
+ // Name
+ name: string;
+
+ // Summary
+ summary: string;
+}
+
export interface Package {
// Name
name: string;
+ // NEVRA
+ nevra: string;
+
+ // EVR
+ evr: string;
+
+ // Arch
+ arch: string;
+
+ // UUID
+ uuid: string;
+
// Summary
summary: string;
+
+ // Description
+ description: string;
+
+ // License
+ license: string;
+
+ // Groups
+ groups: string[];
+
+ // URL
+ url: string;
+
+ // Packager
+ packager: string;
+
+ // Build Arches
+ build_arches: string[];
+
+ // (Installed) Size
+ size: number;
+
+ // Filesize
+ filesize: number;
+
+ // Dependencies
+ prerequires: string[];
+ requires: string[];
+ provides: string[];
+ conflicts: string[];
+ obsoletes: string[];
+ suggests: string[];
+ recommends: string[];
+
+ // Build ID
+ build_id: string;
+
+ // Build Host
+ build_host: string;
+
+ // Build Time
+ build_time: Date;
+}
+
+export interface File {
+ // Path
+ path: string;
+
+ // Mode
+ mode: number;
+
+ // Ownership
+ uname: string;
+ gname: string;
+
+ // Size
+ size: number;
+
+ // Creation & Modification Time
+ ctime: Date;
+ mtime: Date;
+
+ // MIME Type
+ mimetype: string;
+
+ // Capabilities
+ capabilities: string[];
+
+ // Is this a config file?
+ config: boolean;
+
+ // XXX Add Digests
}
// Fetch all packages
-export async function fetchPackages(): Promise<Package[]> {
+export async function fetchPackages(): Promise<PackageSummary[]> {
const response = await api.get("/v1/packages")
return response.data;
}
import { onMounted, ref } from "vue";
// API
- import type { Package } from "@/api/packages";
+ import type { PackageSummary } from "@/api/packages";
import { fetchPackages } from "@/api/packages";
// Components
import Section from "@/components/Section.vue";
// Create a list with all packages
- const packages = ref<Package[]>([]);
+ const packages = ref<PackageSummary[]>([]);
// Fetch all packages on load
onMounted(async () => {