-
Notifications
You must be signed in to change notification settings - Fork 4
/
spec.ts
82 lines (68 loc) · 1.92 KB
/
spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
interface Manifest {
/** Contains launcher-specific information. */
launcher?: {
/**
* A Qt RCC file to be used for branding the launcher.
*
* Your RCC file can contain two files:
* - `logo.png` - 128px logo
* - `install_notice.html` - notice shown before an initial download
*/
branding?: string;
/**
* The version of the launcher that should be used by this
* manifest.
*/
version: string;
}
/**
* A list of all versions of the package. The first version entry is the
* latest version.
*/
versions: Version[];
}
/** The manifest to be used for the base content. */
interface BaseManifest extends Manifest {
/** A URL to the base content for use by webAO. */
web?: string;
}
/** Represents a single version of a package. */
interface Version {
version: string;
prev?: string;
executable?: string;
full?: Task[];
update?: Task[];
}
type Task = DownloadTask | DeleteTask | NoticeTask | MoveTask;
interface DownloadTask {
action: "dl";
url: string;
/** Represents a SHA-1 hash of a file. */
hash?: string;
}
interface DeleteTask {
action: "delete" | "deleteDir";
/**
* Specifies a target to perform the action on.
*
* NOTE: when implementing, do not attempt to process relative paths that
* escape the install directory!
*/
target: string | string[];
}
interface NoticeTask {
action: "notice";
msg: string;
/**
* Specifies if this notice should only be shown if the launcher's version
* is not equal to the one specified in the manifest (assuming there is a
* version specified in the manifest).
*/
versionCheck?: boolean;
}
interface MoveTask {
action: "move";
source: string;
target: string;
}