-
Notifications
You must be signed in to change notification settings - Fork 3
/
ApmInterface.ts
60 lines (54 loc) · 1.3 KB
/
ApmInterface.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
import { SshHost } from "../SshHost.js"
import { Awaitable } from "../utils/base.js"
export interface AbstractPackageManager {
type: string
sshHost: SshHost
//### cache
/**
* @description Update package source cache
*/
updateCache(): Awaitable<void>
/**
* @description Clear package source cache
*/
clearCache(): Awaitable<void>
//### edit
/**
* @description Install defined packages
*/
install(...pkgs: string[]): Awaitable<void>
/**
* @description Uninstall defined packages
*/
uninstall(...pkgs: string[]): Awaitable<void>
//### maintenance
/**
* @description Upgrades all upgradable packages
*/
upgradeAll(): Awaitable<void>
/**
* @description Uninstall unused packages
*/
uninstallUnused(): Awaitable<void>
//### get
/**
* @description List of installed packages
*/
list(): Awaitable<string[]>
/**
* @description List upgradable packages
*/
upgradable(): Awaitable<string[]>
/**
* @description Returns a package description
*/
describe(pkg: string): Awaitable<AbstractPackage>
}
export interface AbstractPackage {
name: string,
version: string,
description?: string,
fields: {
[key: string]: string
}
}