mirror of
https://github.com/BillyOutlast/drop.git
synced 2026-02-04 00:31:17 +01:00
* feat: game specialisation, auto-guess extensions * fix: enforce specialisation specific schema at API level * fix: lint * feat: partial work on depot endpoints * feat: bump torrential * feat: dummy version creation for depot uploads * fix: lint * fix: types * fix: lint * feat: depot version import * fix: lint * fix: remove any type * fix: lint * fix: push update interval * fix: cpu usage calculation * feat: delta version support * feat: style tweaks for selectlaunch.vue * fix: lint
28 lines
569 B
TypeScript
28 lines
569 B
TypeScript
import type { JsonValue } from "@prisma/client/runtime/library";
|
|
|
|
export type DropletManifest = V2Manifest;
|
|
|
|
export type V2Manifest = {
|
|
version: "2";
|
|
size: number;
|
|
key: number[];
|
|
chunks: { [key: string]: V2ChunkData };
|
|
};
|
|
|
|
export type V2ChunkData = {
|
|
files: Array<V2FileEntry>;
|
|
checksum: string;
|
|
iv: number[];
|
|
};
|
|
|
|
export type V2FileEntry = {
|
|
filename: string;
|
|
start: number;
|
|
length: number;
|
|
permissions: number;
|
|
};
|
|
|
|
export function castManifest(manifest: JsonValue): DropletManifest {
|
|
return JSON.parse(manifest as string) as DropletManifest;
|
|
}
|