mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 18:31:54 +00:00
25 lines
659 B
TypeScript
25 lines
659 B
TypeScript
import { string } from "ts-matches";
|
|
import { Backups } from ".";
|
|
import { GenericManifest } from "../manifest/ManifestTypes";
|
|
import { BackupOptions } from "../types";
|
|
import { _ } from "../util";
|
|
|
|
export type SetupBackupsParams<M extends GenericManifest> = Array<
|
|
keyof M["volumes"] & string
|
|
>;
|
|
|
|
export function setupBackups<M extends GenericManifest>(
|
|
...args: _<SetupBackupsParams<M>>
|
|
) {
|
|
return Backups.volumes(...args).build();
|
|
}
|
|
|
|
export function setupBackupsOptions<M extends GenericManifest>(
|
|
options: Partial<BackupOptions>,
|
|
...args: _<SetupBackupsParams<M>>
|
|
) {
|
|
return Backups.with_options(options)
|
|
.volumes(...args)
|
|
.build();
|
|
}
|