Add support for untracked files.

Untracked file glob patterns are stored in the servermeta.json. See the README for detailed information.
This commit is contained in:
Daniel Scalzi
2020-09-12 22:46:50 -04:00
parent 1a19df0e93
commit 24b0923903
14 changed files with 153 additions and 43 deletions

View File

@@ -1,5 +1,17 @@
import { Server } from 'helios-distribution-types'
export interface UntrackedFilesOption {
/**
* The subdirectory this applies to. Ex.
* [ 'files', 'forgemods' ]
*/
appliesTo: string[]
/**
* Glob patterns to match against the file.
*/
patterns: string[]
}
export interface ServerMetaOptions {
forgeVersion?: string
liteloaderVersion?: string
@@ -37,6 +49,9 @@ export function getDefaultServerMeta(id: string, version: string, options?: Serv
}
}
// Add empty untracked files.
servMeta.untrackedFiles = []
return servMeta
}
@@ -60,4 +75,6 @@ export interface ServerMeta {
version: string
}
untrackedFiles?: UntrackedFilesOption[]
}