chore: Update the backups

This commit is contained in:
BluJ
2023-04-24 14:07:13 -06:00
parent 0be8d9d5bc
commit 75ec297be1
7 changed files with 271 additions and 168 deletions

View File

@@ -0,0 +1,56 @@
export interface Container {
image: string;
mounts: Record<string, string>;
shmSizeMb?: number; // if greater
sigtermTimeout?: string; // if more than 30s to shutdown
}
export interface GenericManifest {
id: string;
title: string;
version: string;
releaseNotes: string;
license: string; // name of license
replaces: string[];
wrapperRepo: string;
upstreamRepo: string;
supportSite: string;
marketingSite: string;
donationUrl: string | null;
description: {
short: string;
long: string;
};
assets: {
icon: string; // file path
instructions: string; // file path
license: string; // file path
};
containers: Record<string, Container>;
volumes: Record<string, string>;
alerts: {
install: string | null;
uninstall: string | null;
restore: string | null;
start: string | null;
stop: string | null;
};
dependencies: Record<string, Dependency>;
}
export interface Dependency {
version: string;
description: string | null;
requirement:
| {
type: "opt-in";
how: string;
}
| {
type: "opt-out";
how: string;
}
| {
type: "required";
};
}

2
lib/manifest/index.ts Normal file
View File

@@ -0,0 +1,2 @@
export { setupManifest } from "./setupManifest";
export * as ManifestTypes from "./ManifestTypes";

View File

@@ -0,0 +1,8 @@
import { GenericManifest } from "./ManifestTypes";
export function setupManifest<
M extends GenericManifest & { id: Id },
Id extends string,
>(manifest: M): M {
return manifest;
}