Files
drop/server/internal/library/manifest/utils.ts
T
Husky ed724c7170 migrate to prisma v7 (#345)
* migrate to prisma v7

* fix prisma type imports

* update prisma version in docker

* fix prisma cli breaking things
2026-02-11 01:26:53 +00:00

28 lines
568 B
TypeScript

import type { JsonValue } from "@prisma/client/runtime/client";
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;
}