mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
create version graph to handle migrations (#2708)
* create version graph to handle migrations * Fix some version alpha test * connect dataVersion api * rename init fns * improve types and add tests * set data version after backup restore * chore: Add some types tests for version info * wip: More changes to versionInfo tests * wip: fix my stupid * update mocks * update runtime * chore: Fix the loop --------- Co-authored-by: Jade <2364004+Blu-J@users.noreply.github.com> Co-authored-by: J H <dragondef@gmail.com>
This commit is contained in:
@@ -8,6 +8,7 @@ export type SetupBackupsParams<M extends T.Manifest> = Array<
|
||||
>
|
||||
|
||||
export function setupBackups<M extends T.Manifest>(
|
||||
manifest: M,
|
||||
...args: _<SetupBackupsParams<M>>
|
||||
) {
|
||||
const backups = Array<Backups<M>>()
|
||||
@@ -36,6 +37,7 @@ export function setupBackups<M extends T.Manifest>(
|
||||
for (const backup of backups) {
|
||||
await backup.build(options.pathMaker).restoreBackup(options)
|
||||
}
|
||||
await options.effects.setDataVersion({ version: manifest.version })
|
||||
}) as T.ExpectedExports.restoreBackup
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user