ed724c7170
* migrate to prisma v7 * fix prisma type imports * update prisma version in docker * fix prisma cli breaking things
28 lines
568 B
TypeScript
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;
|
|
}
|